fix(openrouter): remove litellm_prefix to prevent double-prefixed model names

With custom_llm_provider kwarg handling routing, the openrouter/ prefix
caused model names like anthropic/claude-sonnet-4-6 to become
openrouter/anthropic/claude-sonnet-4-6, which OpenRouter API rejects.
This commit is contained in:
Xubin Ren
2026-03-15 02:27:43 +00:00
committed by Xubin Ren
parent 5ccf350db1
commit 350d110fb9
2 changed files with 7 additions and 1 deletions

View File

@@ -98,7 +98,7 @@ PROVIDERS: tuple[ProviderSpec, ...] = (
keywords=("openrouter",),
env_key="OPENROUTER_API_KEY",
display_name="OpenRouter",
litellm_prefix="openrouter", # claude-3 → openrouter/claude-3
litellm_prefix="", # routing handled by custom_llm_provider kwarg; no prefix needed
skip_prefixes=(),
env_extras=(),
is_gateway=True,