From 2bddfcbd93e70b1582f353ca234fba8b061c9baf Mon Sep 17 00:00:00 2001 From: dajiaohuang Date: Wed, 7 Oct 2026 14:48:20 +0800 Subject: [PATCH] Fix Claude models routing to Responses API causing not_found_error (fixes #1369) resolve_api_type() was checking LiteLLM catalog for /v1/responses support but falling through to 'responses' for unknown/new models. Models routed through LiteLLM (non-OpenAI providers like anthropic/*) must always use chat_completions since /v1/responses is OpenAI-specific. Add an explicit routes_through_litellm() check before the catalog lookup. --- strix/config/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/strix/config/models.py b/strix/config/models.py index 4ce6dc86..50d991ff 100644 --- a/strix/config/models.py +++ b/strix/config/models.py @@ -668,10 +668,13 @@ def resolve_api_type(model_name: str, settings: Settings) -> ApiType: An explicit ``STRIX_API_TYPE`` wins. Otherwise the model decides: Responses when LiteLLM's catalog lists ``/v1/responses`` for it, chat completions for - everything else. + everything else. Models routed through LiteLLM (non-OpenAI providers) always + use chat completions because the Responses endpoint is OpenAI-specific. """ if settings.llm.api_type is not None: return settings.llm.api_type + if routes_through_litellm(model_name): + return "chat_completions" if _RESPONSES_ENDPOINT in _catalog_supported_endpoints(model_name): return "responses" return "chat_completions"