Search docs...

Start typing to search documentation

opencode
OpenCode

OpenCode Setup Guide

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

Overview

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

Quick Config

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

text
Base URL: https://oao.ai.id/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 OAO Store 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": {
        "oao store-live": {
          "name": "OAO Store",
          "npm": "@ai-sdk/openai-compatible",
          "options": {
            "apiKey": "YOUR_API_KEY",
            "baseURL": "https://oao.ai.id/v1"
          },
          "models": {
            "auto-regular": {},
            "auto-uncensored": {},
            "auto-vip": {},
            "claude-fable-5": {},
            "claude-haiku-5.5": {}
          }
        }
      }
    }

    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.

auto-regularauto-uncensoredauto-vipclaude-fable-5claude-haiku-5.5

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 "openai" on its own: OpenCode ships that id in its registry, so newer models will be missing. The "-live" suffix above avoids the clash.
  • Use exact model ids from the OAO Store 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