Skip to documentation

OpenCode

Configure a custom Chat Completions provider.

Updated November 3, 2026

Install the client

OpenCode 1.19.5 was exercised with two requests, streamed output and a client-side tool/result round trip against a synthetic local response. This is client/protocol evidence, not live provider or production billing verification. Install this version from the official npm package; review changes before updating.

bash
npm install -g opencode-ai@1.19.5
opencode --version

Before you begin

Open a fresh terminal, configure a scoped key and list the models available to your account before using the client. The shared setup includes Bash and PowerShell commands.

Configure the provider

Merge the generated provider block into your existing opencode.json. Keep your other providers. The configuration reads the key from the environment, not the project file. Select notholy/MODEL_ID using /models.

Check the client boundary

Use @ai-sdk/openai-compatible for Chat Completions. Client tools execute on your machine under OpenCode permissions. Provider compatibility is not permission to run commands. Start in a disposable repository and verify a small text request before enabling tools.

Client configuration

Select a published model to generate configuration. Confirm your account can use it with GET /v1/models before sending a request.

json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "notholy": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "NotHoly",
      "options": {
        "baseURL": "https://api.notholy.com/v1",
        "apiKey": "{env:NOTHOLY_API_KEY}"
      },
      "models": {
        "notholy-pulse": {
          "name": "NotHoly Pulse Flash",
          "limit": {
            "context": 1048576,
            "output": 131072
          }
        }
      }
    }
  },
  "model": "notholy/notholy-pulse"
}

Configuration reference: a generated snippet is not a full client certification. Check the compatibility notes above. Keep API keys in your private environment.