• UnoRouterUNOROUTER
Documentation
  • AI Applications
Coding agents
  • opencodeOpenCode Setup Guide
  • Kilo CodeKilo Code Setup Guide
  • Zed IDE Setup Guide
  • ClineCline Setup Guide
  • RooCodeRoo Code Setup Guide
  • continue-devContinue.dev Setup Guide
Character & fiction clients
  • SillyTavernSillyTavern Integration Guide
  • janitor-aiJanitor.AI Integration Guide
  • risuaiRisuAI Integration Guide
  • Chub / Venus Integration Guide
  • nevikaNevika Integration Guide
Chat clients
  • librechatLibreChat Integration Guide
  • OpenWebUIOpen WebUI Integration Guide
  • LobeHubLobeChat Integration Guide
  • AnythingLLM Integration Guide
  • CherryStudioCherry Studio Integration Guide
  • typingmindTypingMind Integration Guide
  • BoltAI Integration Guide
  • Page Assist Integration Guide
  • chatboxChatbox Integration Guide
  • Big-AGI Integration Guide
CLI tools
  • aiderAider Setup Guide
  • cc-switchCC Switch Integration Guide
  • Claude CodeClaude Code Integration
  • CodexOpenAI Codex CLI Setup Guide
  • GeminiGemini CLI Integration
  • openclawOpenClaw Integration
  • Hermes AgentHermes Agent Integration
  • ModelContextProtocolMCP Server Setup Guide
Navigate
  • Models
  • Rankings
  • Inspector
  • Pricing
  • Chat
  • Status

Search docs...

Start typing to search documentation

PlatformIntegrationsChat
opencode
OpenCode

OpenCode Setup Guide

Add UnoRouter as a custom provider in OpenCode and pick any model as the active coding agent.

Overview

OpenCode reads its providers from a JSON config file. Add UnoRouter as a custom provider with the OpenAI-compatible adapter and you can pick any UnoRouter model as the active model.

Quick Config

Drop these values into the client. Your key auto-fills when you are signed in.

text
Base URL: https://api.unorouter.com/v1
API Key: YOUR_API_KEY

Sign in to auto-fill your API key

Compatibility

Chat CompletionsStreamingTool calling

Step-by-step setup

  1. 1
    Open the OpenCode config file

    Press Ctrl + O inside OpenCode and paste the path. On Windows, replace YOUR_USER with your Windows username.

    text
    C:/Users/YOUR_USER/.config/opencode/opencode.json

    Sign in to auto-fill your API key

  2. 2
    Replace the file contents

    Wipe the file and paste the UnoRouter provider block. Drop in your UnoRouter API key and pick any model from the catalog.

    json
    {
      "$schema": "https://opencode.ai/config.json",
      "provider": {
        "unorouter": {
          "name": "UnoRouter",
          "npm": "@ai-sdk/openai-compatible",
          "discoverModels": true,
          "options": {
            "apiKey": "YOUR_API_KEY",
            "baseURL": "https://api.unorouter.com/v1"
          }
        }
      }
    }

    Sign in to auto-fill your API key

  3. 3
    Save and reload

    Press Ctrl + S to save, then Ctrl + Shift + P and run Developer: Reload Window. OpenCode picks up the new provider on reload.

  4. 4
    Pick a model

    Open the model picker in OpenCode and switch to the model you added. The OpenAI-compatible adapter handles streaming and tool calling automatically.

Recommended models

Free models that work well here. Paste any model id into the client.

agnes-2.0-flash:freeallam-2-7b:freebielik-11b-v3.0-instruct:freebig-pickle:freecodestral-latest:free

Gotchas

  • !With "discoverModels": true, OpenCode auto-fetches the full UnoRouter catalog from /v1/models on startup, so every model (including new ones) shows up in the picker without listing them by hand.
  • !If Developer: Reload Window does not show your provider, double check the JSON saved without trailing commas.
  • !Use exact model ids from the UnoRouter catalog. Strip any leading provider prefix if a copy-paste added one.
  • !On older OpenCode without auto-discovery, add a "models" block listing the exact ids you need (e.g. {"gemini-3.1-flash-lite": {}}) and restart.
Generate API KeyModels

On this page

Overview
Quick Config
Compatibility
Setup steps
Open the OpenCode config file
Replace the file contents
Save and reload
Pick a model
Recommended models
Gotchas