OpenCode Setup Guide

OpenCode is an open-source AI coding agent for the terminal and desktop. This guide installs it, adds JZS Token as a provider, and picks a model.

What you need

FieldValueNotes
Base URLhttps://jzstoken.com/api/v1OpenAI-compatible endpoint. Keep /api/v1.
API Keysk-…From API Keys.
Model IDgpt-5.6-terraMust match the catalog exactly.

1. Install OpenCode

Pick one. When you are done, typing opencode in a terminal should start it.

MethodCommandWorks on
npmnpm install -g opencode-aiAny OS with Node.js 18+.
Homebrewbrew install anomalyco/tap/opencodemacOS and Linux.
Install scriptcurl -fsSL https://opencode.ai/install | bashmacOS and Linux.

The desktop app is on opencode.ai. It reads the same config as the terminal version.

2. Add JZS Token in CC Switch

Open the OpenCode tab

In CC Switch, select the OpenCode icon (1) and click + (2), or Add Provider in the middle of the empty list. Keep Custom Configuration selected on the next screen.

CC Switch OpenCode tab with no providers yet, the plus button and Add Provider highlighted

Fill in the provider

  1. Provider Key: a short ID, lowercase with hyphens, for example jzstoken. It becomes the provider name in OpenCode's model list.
  2. Provider Name: JZS Token.
  3. API Format: OpenAI Compatible.
  4. API Key: paste your key.
OpenCode provider form: provider key jzstoken, name JZS Token, API format OpenAI Compatible, API key masked

Scroll down and set:

  1. Base URL: https://jzstoken.com/api/v1.
  2. Models: click Add Model, enter the Model ID (for example gpt-5.6-terra) and a display name. Add one row per model you want to use.
Base URL https://jzstoken.com/api/v1 and a model row with ID gpt-5.6-terra and display name GPT-5.6 Terra

Click Add. Then click Add on the provider card itself. That writes the provider into OpenCode's opencode.json, and the button turns into Remove.

OpenCode provider card in CC Switch with its green Add button highlighted

3. Switch to the model in the terminal

  1. Run opencode in your project folder.
  2. Press Ctrl + P to open the command list.
OpenCode home screen in the terminal with the ctrl+p commands hint highlighted
  1. Type switch model and press Enter (shortcut: Ctrl + X, then M).
OpenCode command palette with Switch model highlighted
  1. Scroll to the jzstoken group, select your model and press Enter.
OpenCode Select model dialog with the jzstoken group and GPT-5.6 Terra selected

The prompt bar now shows the model and the provider. Start typing.

OpenCode prompt bar showing Build, GPT-5.6 Terra, jzstoken
💡 The desktop app works the same way: pick the model from the model selector at the bottom of the chat box.

Without CC Switch: edit opencode.json

OpenCode reads ~/.config/opencode/opencode.json (Windows: %USERPROFILE%\.config\opencode\opencode.json). Add a provider block like this, merging it with anything already in the file:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "jzstoken": {
      "name": "JZS Token",
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "https://jzstoken.com/api/v1",
        "apiKey": "sk-your-key-here"
      },
      "models": {
        "gpt-5.6-terra": { "name": "GPT-5.6 Terra" }
      }
    }
  }
}

Restart OpenCode, then switch models as in step 3.

Troubleshooting

ProblemFixDetails
"opencode: command not found"Open a new terminal.The npm or brew install folder must be on your PATH.
No jzstoken group in the model listClick Add on the card in CC Switch.Then quit and restart OpenCode.
Requests failCheck Base URL, key and model ID.Base URL is https://jzstoken.com/api/v1; the model ID must match the catalog.
Replies are slowTry a faster model.Compare speeds in the catalog.