opencode on Mingles Router

Run opencode on Mingles Router

opencode builds providers on the Vercel AI SDK, so an OpenAI-compatible endpoint is a few lines of JSON and no plugin.

Pick your model and paste your key — every command and value on this page updates live.

Endpoint: https://router.mingles.ai/v1 · key stays in your browser · no key entered? commands show <your-key>.

Add the provider

1. Put the key in the environment

opencode resolves {env:NAME} at load, so the config file stays shareable:

shell
export MINGLES_API_KEY="<your-key>"

2. Add the block to opencode.json

opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "mingles": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Mingles Router",
      "options": {
        "baseURL": "https://router.mingles.ai/v1",
        "apiKey": "{env:MINGLES_API_KEY}"
      },
      "models": {
        "deepseek-ai/DeepSeek-V4-Flash-0731": {
          "name": "deepseek-ai/DeepSeek-V4-Flash-0731",
          "limit": { "context": 128000, "output": 8192 }
        }
      }
    }
  }
}

3. Select it

Run /models in opencode and the provider is in the list.

Exact values

options.baseURL https://router.mingles.ai/v1
options.apiKey <your-key>
model id deepseek-ai/DeepSeek-V4-Flash-0731
limit.context 128000

Switch model

The models map takes as many entries as you like — one line each, switchable with /models mid-session.

Before you file a bug: read the limits

Reasoning models spend the output budget on internal thinking, output is capped at 8192 tokens, there is no KV cache, and there are no built-in web tools. Most “it broke on Mingles Router” reports are one of these. See Model limits & behavior →

Frequently asked

Why @ai-sdk/openai-compatible and not @ai-sdk/openai? +

The openai-compatible package makes no assumptions about OpenAI-only features, which is what you want against a third-party endpoint. It is the package opencode’s own docs use for this case.