You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow selection of inference provider when using OpenRouter #1010
I'm not aware of existing configuration options to configure a specific provider when using OpenRouter.
I think implementing a provider selector (similar to the model selector) would be a good QoL improvement (especially now to avoid low throughput kimi k2 providers)
The provider selector could be opened with a shortcut when an OpenRouter model is currently selected.
I don't know how much implementation effort this would result in, but I think it is manageable and doable through existing OpenRouter API endpoints:
I found using only yielded better error messages (docs: https://openrouter.ai/docs/features/provider-routing#allowing-only-specific-providers), and it said "No allowed providers are available for the selected model". I then noticed in the error log given above that the max tokens were specified in the request, I checked models.dev and kimi k2 on openrouter has an output limit of 32,768 but groq only has 16384, so on a whim I changed it and it now works.
Additionally, I used the only param to try and force cerebras with Qwen3 Coder, but I got an error message about how it doesn't support tool calls (which tracks because the OR listing for cerebras Qwen3 Coder does not list tools as a support parameter).
Reacted by Giuseppe Rota, Nathanael Bonfim, Mike Staub and Abod
Note: cerebras is not a reliable provider on openrouter - I found the speed greatly varies. groq is more consistently fast.
Looking at https://models.dev/?search=kimi-k2 - it lists providers, but when using a meta provider like openrouter there is no way to define the actual provider there.
Thanks to @Arbyy at least it showed me an error message, instead of just nothing.
If someone still faces the same issue of empty responses even with Arbby config, try to use the full model's id like this "moonshotai/kimi-k2-0905" instead.
It would be much better if the openrouter provider/plugin listed the provider prefixes, imho, as well as a * prefix, like */model-name for when you'll accept that model from any provider.
For future reference: was having the same issue as the others in Spain. Doing the same payment process through my phone instead (iPhone, Safari) had no issues whatsoever with the card details (no Apple Pay, though I assume that would have worked too).
Activity
OneAbodFTW commentedon Jul 15, 2025
I could work on this
nathabonfim59 commentedon Jul 16, 2025
I was able to make it work, thanks to this issue:
In order, you can put whatever provider is available in the model page. You can use options from provider options as well.
{ "$schema": "https://opencode.ai/config.json", "provider": { "openrouter": { "options": { "name": "OpenRouter" }, "models": { "moonshotai/kimi-k2": { "name": "KIMI K2", "options": { "OpenRouter": { "provider": { "order": [ "together/fp8", "baseten/fp4", "groq" ], "allow_fallbacks": false } } } } } } } }Flexinos commentedon Jul 20, 2025
If i only leave "groq" as an option I get:
AI_APICallError: No endpoints found for moonshotat/kimi-k2
Which doesn't really make sense. In the OpenRouter activity logs I can see that the request arrived, but ended with reason "stop"
ivanbokii commentedon Jul 30, 2025
Not sure what I'm doing wrong, but I can see that OpenRouter delegates execution to various providers despite explicitly instructed to use cerebras:
I suspect that params weren't actually passed to OpenRouter.
grota commentedon Aug 1, 2025
can confirm that with this config (limiting kimi-k2 to only groq) it does not work, while changing only
groq -> basetenmakes it work 🤷🏼♂️ :Here's the (trimmed and beautified) log:
Arbyy commentedon Aug 2, 2025
I've gotten it working for kimi k2 with groq:
{ "$schema": "https://opencode.ai/config.json", "provider": { "openrouter": { "moonshotai/kimi-k2": { "options": { "provider": { "only": ["groq"] }, "max_tokens": 16384 } } } } } }I found using
onlyyielded better error messages (docs: https://openrouter.ai/docs/features/provider-routing#allowing-only-specific-providers), and it said "No allowed providers are available for the selected model". I then noticed in the error log given above that the max tokens were specified in the request, I checked models.dev and kimi k2 on openrouter has an output limit of32,768but groq only has16384, so on a whim I changed it and it now works.Additionally, I used the
onlyparam to try and force cerebras with Qwen3 Coder, but I got an error message about how it doesn't support tool calls (which tracks because the OR listing for cerebras Qwen3 Coder does not list tools as a support parameter).khalido commentedon Aug 14, 2025
In case this helps anyone - I found
The below config worked for me, which I verified by looking at openrouter activity to see it actually used these providers.
{ "$schema": "https://opencode.ai/config.json", "provider": { "openrouter": { "models": { "qwen/qwen3-coder": { "name": "fast qwen3-coder", "options": { "provider": { "only": ["cerebras"] }, "max_tokens": 32000 } }, "moonshotai/kimi-k2": { "name": "fast kimi k2", "options": { "provider": { "only": ["groq"] }, "max_tokens": 16000 } } } } } }Note: cerebras is not a reliable provider on openrouter - I found the speed greatly varies. groq is more consistently fast.
Looking at https://models.dev/?search=kimi-k2 - it lists providers, but when using a meta provider like openrouter there is no way to define the actual provider there.
OneAbodFTW commentedon Oct 30, 2025
Thanks to @Arbyy at least it showed me an error message, instead of just nothing.
If someone still faces the same issue of empty responses even with Arbby config, try to use the full model's id like this "moonshotai/kimi-k2-0905" instead.
niebloomj commentedon Feb 15, 2026
Is this issue related to why I don't see openrouter/auto in the list of models?
github-actions commentedon Apr 17, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
lee-b commentedon May 10, 2026
It would be much better if the openrouter provider/plugin listed the provider prefixes, imho, as well as a * prefix, like */model-name for when you'll accept that model from any provider.
fix(web): stabilize Den onboarding flow with app routes (anomalyco#1010)
cbossaers commentedon Sep 1, 2026
For future reference: was having the same issue as the others in Spain. Doing the same payment process through my phone instead (iPhone, Safari) had no issues whatsoever with the card details (no Apple Pay, though I assume that would have worked too).