diff --git a/agent/anthropic_adapter.py b/agent/anthropic_adapter.py index b58535914b3..740986203d4 100644 --- a/agent/anthropic_adapter.py +++ b/agent/anthropic_adapter.py @@ -1076,9 +1076,12 @@ def normalize_model_name(model: str, preserve_dots: bool = False) -> str: # These must not be converted to hyphens. See issue #12295. if _is_bedrock_model_id(model): return model - # OpenRouter uses dots for version separators (claude-opus-4.6), - # Anthropic uses hyphens (claude-opus-4-6). Convert dots to hyphens. - model = model.replace(".", "-") + # Only convert dots to hyphens for Anthropic/Claude models. + # Non-Anthropic models (gpt-5.4, gemini-2.5, etc.) use dots + # as part of their canonical names. See issue #17171. + _lower = model.lower() + if _lower.startswith("claude-") or _lower.startswith("anthropic/"): + model = model.replace(".", "-") return model