anomalyco / anomalyco/opencode
403 error when routing OpenCode free tier models through OmniRoute MCP provider
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Description
When using OpenCode's free tier models (oc/mimo-v2.5-free, oc/big-pickle) routed through an OmniRoute MCP provider configured as an OpenAI-compatible provider in opencode.json, the following error is returned:
Error: [403]: Error from provider (Console): OpenCode's free tier can only be used from within OpenCode
Expected Behavior
The free tier models should be accessible when routed through a third-party provider (OmniRoute), since the API key and authentication are handled by the OmniRoute gateway, not directly by OpenCode's console.
Actual Behavior
The request is rejected with a 403 error indicating the free tier can only be used "from within OpenCode," even though the request is originating from an OpenCode session and the routing is handled by an external provider.
Environment
- OpenCode version: 2.0.10
- Provider: OmniRoute (OpenAI-compatible)
- Models affected: oc/mimo-v2.5-free, oc/big-pickle
Notes
The paid models from the same OmniRoute provider (e.g., codex/gpt-5.6-terra) work correctly. Only the free tier models are affected by this restriction. It appears the free tier validation checks the request origin rather than allowing proxied requests through configured providers.
Plugins
No response
OpenCode version
2.0.10
Steps to reproduce
- Configure an OmniRoute MCP server in ~/.config/opencode/opencode.json as a remote server with API key authentication
- Configure the OmniRoute provider as OpenAI-compatible with free tier models (oc/mimo-v2.5-free, oc/big-pickle)
- Set the default model to omniroute/oc/mimo-v2.5-free
- Start OpenCode and attempt to use the model
Screenshot and/or share link
Error: [403]: Error from provider (Console): OpenCode's free tier can only be used from within OpenCode
Operating System
Linux (Arch-based)
Terminal
OpenCode TUI v2.0.10
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.
Research direction
Start by locating the OpenAI-compatible provider path and the handling of oc/mimo-v2.5-free and oc/big-pickle requests. Reproduce the supplied OmniRoute configuration, compare it with a working paid model, and trace where the 403 is introduced. Done means the free-tier requests work through OmniRoute without regressing paid-model routing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100