From dd1f816f7c20dce8dcbe8aeedd94fe2733ec1ffb Mon Sep 17 00:00:00 2001 From: 0xallam Date: Sun, 7 Jun 2026 22:51:09 +0300 Subject: [PATCH] Cover bare claude-/gemini- shorthands in env mirror MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit normalize_model_name expands `claude-*` and `gemini-*` shorthands into `litellm/anthropic/...` and `litellm/gemini/...` at routing time, but the mirror helper was looking at the raw pre-normalization name — bare shorthands had no `/` and hit the early return, so ANTHROPIC_API_KEY / GEMINI_API_KEY were never populated for those users. Run the same normalization inside the mirror helper so the provider prefix is consistent with what LiteLLM actually sees downstream. --- strix/config/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strix/config/models.py b/strix/config/models.py index a0be563..9cf14cb 100644 --- a/strix/config/models.py +++ b/strix/config/models.py @@ -61,7 +61,7 @@ def configure_sdk_model_defaults(settings: Settings) -> None: def _mirror_api_key_to_provider_env(model_name: str | None, api_key: str) -> None: if not model_name: return - name = model_name.strip() + name = normalize_model_name(model_name) for prefix in ("litellm/", "any-llm/"): if name.lower().startswith(prefix): name = name[len(prefix) :]