test: exempt OpenAI-compatible openrouter routes from Anthropic sampling-param flag check

This commit is contained in:
Devin AI 2026-07-13 11:25:05 +00:00
parent ed5eebee35
commit dd1ae9eab9

View file

@ -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 = [