OpenRouter: “No allowed providers are available for the selected model” despite valid model and providers
I’m seeing repeated 404 errors from OpenRouter when using Agent Zero with various OpenRouter models, even though the models are valid and I’ve enabled the suggested providers on the OpenRouter side.
Environment
Agent Zero: latest public release (self‑hosted)
LLM provider: OpenRouter
Working baseline model: mistralai/mistral-large-2407 (this works fine)
Additional OpenRouter providers allowed: Mistral, Cloudflare, plus others I tried such as OpenInference
I have multiple API keys and per‑key limits configured in OpenRouter; the “production” key with Mistral Large 2407 is stable.
Problem
When I change the model in Agent Zero to use newer or cheaper OpenRouter models, I get this error: litellm.exceptions.NotFoundError: litellm.NotFoundError: NotFoundError: OpenrouterException - {"error":{"message":"No allowed providers are available for the selected model.","code":404,"metadata":{"available_providers":["google-ai-studio","liquid","arcee-ai","stepfun","open-inference","venice","nvidia"],"requested_providers":["openai","mistral","cloudflare"]}}}
I’ve also seen a similar error when trying openai/gpt-4.1-mini and openrouter/free.
Key points:
OpenRouter’s response shows available_providers for the chosen model as: ["google-ai-studio","liquid","arcee-ai","stepfun","open-inference","venice","nvidia"]
Agent Zero (via LiteLLM) is sending requested_providers: ["openai","mistral","cloudflare"]
There’s no overlap between those lists, so OpenRouter returns the 404 with "No allowed providers are available for the selected model."
From my side in the OpenRouter dashboard I’ve:
Allowed the providers suggested by the error (Mistral, Cloudflare, and even OpenInference, etc.). Verified that the same account and keys work fine directly with mistralai/mistral-large-2407.
Expected
When I configure Agent Zero with a valid OpenRouter model ID (e.g., openai/gpt-4.1-mini or openrouter/free) and a valid API key, the connector should either:
Let OpenRouter pick any available provider for that model, or
Respect the available_providers list (e.g., google-ai-studio, venice, open-inference, etc.) rather than forcing ["openai","mistral","cloudflare"].
Actual
Agent Zero appears to hard‑code or override requested_providers to ["openai","mistral","cloudflare"], which leads to a 404 for many newer OpenRouter models whose providers are different.
Request
Please update the OpenRouter integration so that:
It does not force requested_providers when calling OpenRouter, or
It aligns requested_providers with the model’s actual provider list from OpenRouter, or makes this configurable in the UI/settings.
A short doc/example showing the correct model string format for newer OpenRouter models (e.g., openai/gpt-4.1-mini) in Agent Zero would also help.
I’m happy to test any patch or config change you suggest; I already have a working baseline with mistralai/mistral-large-2407 to compare against.
Hi, just a quick follow‑up on this.
I am still seeing the same error message: “No allowed providers are available for the selected model.”
This is happening even though the model and provider I'm using are valid and work in other contexts.
Could you please advise whether there is a configuration change I should make on my side, or if this might be an issue with the current provider/model mapping in the project?
Thanks in advance for any guidance or update on this.
Never had this issue with openrouter...
Looks like you are not using openrouter as a provider? Can u give example of how u write the model? Also some models are of end of life now in march(at least on openrouter, like (openai o1)
Have u checked if there actually are any available providers(servers) for the models you are choosing? If you have. you should also check out the Guardrails setting in the menu(same menu as api keys, presets and so on) Make sure that u dont have ZDR endpoints Only or Ignore providers..(Or Allowed providers with the setting below "Always Enforce")
If you are using free models, try turning on free endpoints so they may train on your data(in case they request it)
openrouter/free isnt a model btw, it chooses between free models.(I have a site where people can test free models, and they are very unstable, giving errors a lot.. And most of them need an endpoint.. Not sure if agent zero support endpoints for training data.
For cheap models this shouldnt be a issue though.. U are still adding the api key to the openrouter field right? And not too the specific providers api field?
Iam sure iam not much help, but this is what i come up with from the little information u provided :)
I had the same error. In my case, the fix was to go to Settings -> Privacy -> Providers in OpenRouter and manually add the provider listed in the error message under available_providers.
Closing due to inactivity of 90 days.