anomalyco / anomalyco/opencode
Upstream request failed: [404] No allowed providers available for selected model despite provider.only whitelist
@jlongster is already working on this.
Since Aug 28, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Summary
When using a model via Console (Models.dev), opencode fails with a 404 'No allowed providers are available for the selected model' error. Even though the selected model IS among the served providers, the provider.only preference whitelists a provider that does not actually serve the model, so every request fails.
Error
Error from provider (Console): Upstream request failed: [404] No allowed providers are available for the selected model. Providers serving xiaomi/mimo-v2.5-20260422: gmicloud, deepinfra, xiaomi, parasail, streamlake, novita, but your request's provider.only preference permits only: tencent.
[retrying in 4s attempt #3] Retry Error
Expected behavior
opencode should either (a) fall back to one of the providers that actually serves the selected model, or (b) surface a clearer, actionable error instead of retrying the request 3+ times with a 404. The current behavior hides the root cause (an incompatible provider.only preference vs. the model's actual providers) behind a generic retry loop.
Plugins
No response
OpenCode version
No response
Steps to reproduce
- Select model xiaomi/mimo-v2.5-20260422 (served by gmicloud, deepinfra, xiaomi, parasail, streamlake, novita).
- Set a provider.only preference that whitelists only 'tencent' (a provider that does NOT serve this model).
- Send a message.
- Observe repeated 404 errors with retry loop: '[retrying in 4s attempt #3]'.
Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
Windows Terminal
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.