Skip to content

403 error when routing OpenCode free tier models through OmniRoute MCP provider #50084

Description

@marcelloinfoweb

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

  1. Configure an OmniRoute MCP server in ~/.config/opencode/opencode.json as a remote server with API key authentication
  2. Configure the OmniRoute provider as OpenAI-compatible with free tier models (oc/mimo-v2.5-free, oc/big-pickle)
  3. Set the default model to omniroute/oc/mimo-v2.5-free
  4. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions