cd /news/ai-tools/opencode-v2-config-relax-ai-beta-pro… · home › topics › ai-tools › article
[ARTICLE · art-136863] src=gist.github.com ↗ pub= topic=ai-tools verified=true sentiment=· neutral

OpenCode V2 config — Relax AI (Beta) provider only

A developer published a configuration guide for setting up OpenCode V2 with a single custom provider, Relax AI (Beta), authenticated via a saved account rather than environment variables or shell API keys. The walkthrough covers installing the desktop app or CLI, placing an opencode.json config file that points to Relax AI's OpenAI-compatible endpoint, and storing a temporary workshop key with the `opencode auth login` command to expose the DeepSeek V4 Pro and DeepSeek V41 Flash models in the model picker.

by read2 min views10 publishedSep 19, 2026

Set up OpenCode V2 with a single custom provider: Relax AI (Beta), authenticated with a saved account — no environment variables or API keys in your shell config.

The matching config lives in opencode-relax-beta.jsonc.

Always prefer the pages above for the latest download links — version numbers in this guide may lag behind.

Open the .dmg, drag OpenCode into Applications, then launch it.

Run the installer, then launch OpenCode.

The desktop app auto-updates to the latest version and runs its own bundled V2 server.

The desktop app can install the opencode command-line tool for you:

  1. From the app menu, choose Install CLI…
  2. Wait for the “CLI Installed” confirmation.

It installs opencode to ~/.opencode/bin/opencode (the same location as the standalone installer) and sets up your PATH.

Open a new terminal afterward so PATH picks it up, then verify:

opencode --version   # should report v2.x

Pick one:

curl -fsSL https://opencode.ai/v2/install | bash

brew install anomalyco/tap/opencode-v2

npm install -g @opencode/cli

Windows package managers are not officially supported — use npm or a standalone binary.

npm install -g @opencode/cli

Or download a standalone binary and add it to your PATH:

OpenCode reads its global config from a file named opencode.json (or opencode.jsonc) inside the opencode config directory:

OS Config file location
macOS ~/.config/opencode/opencode.json
Windows %USERPROFILE%\.config\opencode\opencode.json(that's C:\Users\<You>\.config\opencode\opencode.json )

Save opencode-relax-beta.jsonc to that path as opencode.json.

{
  "$schema": "https://opencode.ai/config.json",
  "model": "relax-beta/DeepSeek-V4-Pro",
  "providers": {
    "relax-beta": {
      "name": "Relax AI (Beta)",
      "package": "@opencode/ai/providers/openai-compatible",
      "settings": {
        "baseURL": "https://api.beta.relax.ai/v1"
      },
      "models": {
        "DeepSeek-V4-Pro": {
          "name": "DeepSeek V4 Pro"
        },
        "DeepSeek-V41-Flash": {
          "name": "DeepSeek V41 Flash"
        }
      }
    }
  }
}

Both opencode.json and opencode.jsonc are valid. To use a different directory, set the OPENCODE_CONFIG_DIR environment variable. Run opencode debug paths to print the config directory OpenCode is actually using.

Instead of exporting a key in your shell, store it once with the CLI. OpenCode keeps it in its local database and reads it on every request — nothing depends on environment variables.

⚠️ Workshop key — temporary. Use this key for the workshop:

rak_8aa54e52e1a2b0bf8bae412c556b10f8498759ab1953339616f5fdca0e27d2ad

It is a temporary key and will be revoked later this week.

opencode auth login relax-beta --method key

Paste the workshop key above when prompted. Verify it's stored:

opencode auth list

relax-beta should show API key stored.

Desktop-app users: you can do the same from the command palette — run /connect, choose Relax AI (Beta), and paste the key.

  1. Reload the config (run opencode reload ) or quit and reopen the desktop app — config changes are read on reload/restart, while saved accounts apply immediately.
  2. Open the model picker (/models ) — you should seeDeepSeek V4 Pro andDeepSeek V41 Flash fromRelax AI (Beta) .

That's it.

── more in #ai-tools 4 stories · sorted by recency
── more on @opencode 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/opencode-v2-config-r…] indexed:0 read:2min 2026-09-19 · —