What happened?
In LiteLLM Admin UI, when adding a model with provider OpenRouter, I selected openrouter/google/gemini-2.5-flash directly from the provider model list/dropdown.
When I click Test Connect, the request fails with:
OpenrouterException - {"error":{"message":"openrouter/google/gemini-2.5-flash is not a valid model ID","code":400},"user_id":"..."}
This does not appear to be a manual input error, because the model was selected from the OpenRouter model list in the UI.
Why this seems incorrect
As of March 30, 2026, google/gemini-2.5-flash still exists on OpenRouter:
https://openrouter.ai/google/gemini-2.5-flash
So either:
- LiteLLM Admin UI is surfacing a stale or invalid OpenRouter model ID.
- The
Test Connect flow is sending a model name format that OpenRouter rejects.
- There is a mismatch between what the dropdown returns and what the backend/OpenRouter expects.
Reproduction
- Open LiteLLM Admin UI.
- Go to
Models + Endpoints -> Add Model.
- Choose provider:
OpenRouter.
- Select model from the provider model list:
openrouter/google/gemini-2.5-flash.
- Click
Test Connect.
Actual result
Connection test fails with:
OpenrouterException - {"error":{"message":"openrouter/google/gemini-2.5-flash is not a valid model ID","code":400}}
Expected result
If the model is selectable from the OpenRouter list, Test Connect should succeed, or the UI should not offer that model.
API request shown by the UI
curl -X POST \
https://openrouter.ai/api/v1/chat/completions \
-H 'HTTP-Referer: https://litellm.ai' \
-H 'X-Title: LiteLLM' \
-H 'Authorization: Bearer <redacted>' \
-H 'Content-Type: application/json' \
-d '{
"model": "openrouter/google/gemini-2.5-flash",
"messages": [
{
"role": "user",
"content": "hello"
}
]
}'
Environment
- LiteLLM version:
v1.82.3
- Provider:
OpenRouter
- Flow: Admin UI -> Add Model -> select from list -> Test Connect
Notes
This looks related to earlier OpenRouter model ID issues, but this specific bug is about a model selected directly from the Admin UI list still failing validation.
What happened?
In LiteLLM Admin UI, when adding a model with provider
OpenRouter, I selectedopenrouter/google/gemini-2.5-flashdirectly from the provider model list/dropdown.When I click
Test Connect, the request fails with:This does not appear to be a manual input error, because the model was selected from the OpenRouter model list in the UI.
Why this seems incorrect
As of March 30, 2026,
google/gemini-2.5-flashstill exists on OpenRouter:https://openrouter.ai/google/gemini-2.5-flash
So either:
Test Connectflow is sending a model name format that OpenRouter rejects.Reproduction
Models + Endpoints->Add Model.OpenRouter.openrouter/google/gemini-2.5-flash.Test Connect.Actual result
Connection test fails with:
Expected result
If the model is selectable from the OpenRouter list,
Test Connectshould succeed, or the UI should not offer that model.API request shown by the UI
Environment
v1.82.3OpenRouterNotes
This looks related to earlier OpenRouter model ID issues, but this specific bug is about a model selected directly from the Admin UI list still failing validation.