OpenCode Integration Guide

Applicable roles: Developers, Admin Users, Member Users Last updated: 2026-08-06

OpenCode allows you to register an OpenAI Compatible service as a standalone Provider. The Provider name is only used locally; this example uses myplatform.

Installation

On macOS, you can use Homebrew:

brew install anomalyco/tap/opencode

You can also install via npm:

npm install -g opencode-ai

Add a Provider

Create opencode.json in your project directory, or merge the same configuration into the user-level file:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "myplatform": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Custom Platform",
      "options": {
        "baseURL": "https://<your-api-endpoint>",
        "apiKey": "YOUR_API_KEY"
      },
      "models": {
        "deepseek-v4-flash": {
          "name": "DeepSeek V4 Flash"
        }
      }
    }
  }
}

Use the API endpoint shown on the console "API Key" page.

The object key deepseek-v4-flash is the call name sent to the platform, while name is only the display name within OpenCode. Do not commit project configuration containing real keys. For long-term use, store secrets using the environment variable method supported by your current OpenCode version.

Launch and Troubleshoot

Run opencode and select myplatform/deepseek-v4-flash in the model selector. If the model does not appear in the list, check the JSON and Provider key names first. If the model is selectable but requests fail, check the Base URL, key, and group permissions.

After completing text Q&A, test file reading and small modifications. Tool permission issues and API connection issues should be handled separately.