From f268e1311ed0c8cc26a6ce0659713fd8fe8ac5fe Mon Sep 17 00:00:00 2001 From: Ahmed Allam Date: Sun, 6 Sep 2026 18:02:18 +0000 Subject: [PATCH] Revert "fix(models): reasoning support follows the model, not the route" This reverts commit 110b40e05a75a7b0e494f41add1232d4b35df9f4. --- strix/config/models.py | 12 +----------- tests/test_models.py | 14 -------------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/strix/config/models.py b/strix/config/models.py index 49fa00cc..3babbe37 100644 --- a/strix/config/models.py +++ b/strix/config/models.py @@ -837,17 +837,7 @@ def model_supports_reasoning(model_name: str) -> bool: entry = litellm.model_cost.get(name) if entry is None and "/" in name: entry = litellm.model_cost.get(name.rsplit("/", 1)[1]) - if entry is not None: - return bool(entry.get("supports_reasoning")) - # Reasoning is a property of the model, not of the route: a model only - # mapped under other providers (``zai/glm-5.3`` for ``openai/glm-5.3``) - # still reasons through an OpenAI-compatible gateway. - bare_name = name.rsplit("/", 1)[-1] - return any( - bool(candidate.get("supports_reasoning")) - for key, candidate in litellm.model_cost.items() - if key.endswith(f"/{bare_name}") and isinstance(candidate, dict) - ) + return bool(entry and entry.get("supports_reasoning")) def is_recommended_or_frontier_model(model_name: str) -> bool: diff --git a/tests/test_models.py b/tests/test_models.py index 0535f70d..cd11819a 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -12,7 +12,6 @@ from strix.config.models import ( _NonStreamingModel, _TurnGuardModel, is_recommended_or_frontier_model, - model_supports_reasoning, request_timeout_extra_args, routes_through_litellm, supports_strict_tool_schemas, @@ -24,19 +23,6 @@ def test_recommended_models_are_accepted(model_name: str) -> None: assert is_recommended_or_frontier_model(model_name) -@pytest.mark.parametrize( - "model_name", - ["openai/glm-5.3", "glm-5.3", "hosted_vllm/glm-5.3", "openai/kimi-k3", "openai/qwen3.8-max"], -) -def test_reasoning_support_follows_the_model_not_the_route(model_name: str) -> None: - assert model_supports_reasoning(model_name) - - -def test_reasoning_support_rejects_unknown_models() -> None: - assert not model_supports_reasoning("openai/no-such-model-xyz") - assert not model_supports_reasoning("openai/gpt-4.1") - - def test_request_timeout_extra_args_positive() -> None: assert request_timeout_extra_args(300) == {"timeout": 300} assert request_timeout_extra_args(10) == {"timeout": 10}