From dd1ae9eab9c66745ba634a790dda3e4dd60c6f16 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 11:25:05 +0000 Subject: [PATCH] test: exempt OpenAI-compatible openrouter routes from Anthropic sampling-param flag check --- tests/test_litellm/test_claude_fable_5_config.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_litellm/test_claude_fable_5_config.py b/tests/test_litellm/test_claude_fable_5_config.py index 3a9ebf65bbb..5f15bde3fe5 100644 --- a/tests/test_litellm/test_claude_fable_5_config.py +++ b/tests/test_litellm/test_claude_fable_5_config.py @@ -215,13 +215,14 @@ def test_adaptive_thinking_detected_for_fable_5(local_model_cost_map, model): def test_sampling_params_flag_on_all_models_that_removed_them(cost_map): """Fable 5 and Opus 4.7/4.8 reject ``top_p``/``top_k``/``temperature != 1``; the drop/raise gating is cost-map driven, so every variant must carry an - explicit ``supports_sampling_params: false``. The perplexity route is - exempt: it is OpenAI-compatible and maps sampling params upstream.""" + explicit ``supports_sampling_params: false``. The perplexity and openrouter + routes are exempt: they are OpenAI-compatible and map sampling params + upstream rather than going through the Anthropic gating.""" variants = [ k for k in cost_map if any(v in k for v in ("claude-fable-5", "claude-opus-4-7", "claude-opus-4-8")) - and not k.startswith("perplexity/") + and not k.startswith(("perplexity/", "openrouter/")) ] assert variants, "no matching entries found in cost map" missing = [