SupaNexus

OpenCode

Register SupaNexus as a custom OpenAI-compatible provider in opencode.json, then pick models with /models.

1. Get a SupaNexus API key

Sign in to the Developer Console, open your project → API Keys, create a key, and copy the secret immediately (shown once). One project key works across OpenAI-compatible and Anthropic-compatible clients.

2. Install OpenCode

Install the OpenCode CLI for your platform, then confirm opencode is on PATH.

# see https://opencode.ai for current installers
opencode --version

3. Connect a custom provider

Run /connect, choose Other, and enter a memorable provider ID (e.g. supanexus). Paste your SupaNexus API key when prompted. Then create or edit opencode.json in the project (or global config) with @ai-sdk/openai-compatible and baseURL ending in /v1.

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "supanexus": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "SupaNexus",
      "options": {
        "baseURL": "<BASE_URL>/v1",
        "apiKey": "sk-snx-..."
      },
      "models": {
        "deepseek/deepseek-chat": {
          "name": "DeepSeek Chat"
        },
        "anthropic/claude-3-5-sonnet": {
          "name": "Claude 3.5 Sonnet"
        }
      }
    }
  }
}

4. Pick a catalog model ID

Use exact IDs from the SupaNexus Models marketplace or GET /v1/models (for example deepseek/deepseek-chat, anthropic/claude-3-5-sonnet). Do not invent vendor-only slugs from other gateways.

5. Select the model and run

Start OpenCode in your repo, run /models, and choose a SupaNexus model under your provider. Send a small coding task to verify tool calls and streaming.

cd /path/to/your/project
opencode
> /models

6. Troubleshooting

Provider missing in /models: confirm opencode.json is in the directory you launched from (or the documented global path) and that models keys match catalog IDs. Auth errors: apiKey must be the project secret; baseURL must include /v1. Prefer openai-compatible for Chat Completions; use @ai-sdk/openai only if you specifically need /v1/responses.

Setup guide →