Search docs...

Start typing to search documentation

opencode
OpenCode

OpenCode Setup Guide

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

Overview

OpenCode reads providers from a JSON config. Add Inferio with the OpenAI-compatible adapter to use any Inferio model.

Quick Config

Paste these into the client. Your key auto-fills when signed in.

text
Base URL: https://newapi.c.dabbo.net/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

    Open your OpenCode config in a text editor. Create the file if it does not exist.

    powershell
    $f = "$env:USERPROFILE\.config\opencode\opencode.json"
    md -Force (Split-Path $f) | Out-Null; New-Item $f -ea 0 | Out-Null; Invoke-Item $f

    Sign in to auto-fill your API key

  2. 2
    Replace the file contents

    Add the Inferio provider block to your config. Merge it into the existing file, keeping any mcp or agent blocks you already have.

    json
    {
      "$schema": "https://opencode.ai/config.json",
      "provider": {
        "inferio-live": {
          "name": "Inferio",
          "npm": "@ai-sdk/openai-compatible",
          "options": {
            "apiKey": "YOUR_API_KEY",
            "baseURL": "https://newapi.c.dabbo.net/v1"
          },
          "models": {
    
          }
        }
      }
    }

    Sign in to auto-fill your API key

  3. 3
    Verify the models load

    Save the file and run opencode models in a terminal. Every id you listed should appear, prefixed with your provider key.

  4. 4
    Pick a model

    Open the model picker and switch to your new model. The adapter handles streaming and tool calling.

Recommended models

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

Gotchas

  • OpenCode has no live model discovery for OpenAI-compatible providers. Every model you want must be listed in the "models" block by exact id.
  • Do not name the provider key "unorouter". That id exists in the models.dev registry. Use "inferio" (or another unused id) and set the OpenAI-compatible base URL to https://newapi.c.dabbo.net/v1.
  • Use exact model ids from the Inferio catalog. Strip any leading provider prefix a copy-paste added, and keep the :free suffix where the id has one.
  • A custom provider key with no "models" block loads zero models, so the provider disappears from the picker entirely.
Generate API KeyModels