{"slug": "opencode-v2-config-relax-ai-beta-provider-only", "title": "OpenCode V2 config — Relax AI (Beta) provider only", "summary": "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.", "body_md": "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.\n\nThe matching config lives in [`opencode-relax-beta.jsonc`](https://gist.github.com/mpvii/43c9acb469a259e92c5eb90f2ff0aeda#file-opencode-relax-beta-jsonc).\n\nAlways prefer the pages above for the latest download links — version numbers in this guide may lag behind.\n\nOpen the `.dmg`, drag **OpenCode** into **Applications**, then launch it.\n\nRun the installer, then launch **OpenCode**.\n\nThe desktop app auto-updates to the latest version and runs its own bundled V2 server.\n\nThe desktop app can install the `opencode` command-line tool for you:\n\n1. From the app menu, choose **Install CLI…**\n2. Wait for the **“CLI Installed”** confirmation.\n\nIt installs `opencode` to `~/.opencode/bin/opencode` (the same location as the standalone installer) and sets up your `PATH`.\n\nOpen a **new terminal** afterward so `PATH` picks it up, then verify:\n\n```\nopencode --version   # should report v2.x\n```\n\nPick **one**:\n\n```\n# curl (recommended)\ncurl -fsSL https://opencode.ai/v2/install | bash\n\n# or Homebrew\nbrew install anomalyco/tap/opencode-v2\n\n# or npm\nnpm install -g @opencode/cli\n```\n\nWindows package managers are not officially supported — use **npm** or a **standalone binary**.\n\n```\n# npm (requires Node.js installed)\nnpm install -g @opencode/cli\n```\n\nOr download a standalone binary and add it to your `PATH`:\n\nOpenCode reads its **global** config from a file named `opencode.json` (or `opencode.jsonc`) inside the `opencode` config directory:\n\n| OS | Config file location | \n|---|---|\n| **macOS** | `~/.config/opencode/opencode.json` | \n| **Windows** | `%USERPROFILE%\\.config\\opencode\\opencode.json`(that's `C:\\Users\\<You>\\.config\\opencode\\opencode.json` ) | \n\nSave [`opencode-relax-beta.jsonc`](https://gist.github.com/mpvii/43c9acb469a259e92c5eb90f2ff0aeda#file-opencode-relax-beta-jsonc) to that path **as `opencode.json`**.\n\n```\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"model\": \"relax-beta/DeepSeek-V4-Pro\",\n  \"providers\": {\n    \"relax-beta\": {\n      \"name\": \"Relax AI (Beta)\",\n      \"package\": \"@opencode/ai/providers/openai-compatible\",\n      \"settings\": {\n        \"baseURL\": \"https://api.beta.relax.ai/v1\"\n      },\n      \"models\": {\n        \"DeepSeek-V4-Pro\": {\n          \"name\": \"DeepSeek V4 Pro\"\n        },\n        \"DeepSeek-V41-Flash\": {\n          \"name\": \"DeepSeek V41 Flash\"\n        }\n      }\n    }\n  }\n}\n```\n\nBoth `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.\n\nInstead 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.\n\n⚠️ **Workshop key — temporary.** Use this key for the workshop:\n\n```\nrak_8aa54e52e1a2b0bf8bae412c556b10f8498759ab1953339616f5fdca0e27d2ad\n```\n\nIt is a **temporary key** and will be **revoked later this week**.\n\n```\nopencode auth login relax-beta --method key\n```\n\nPaste the workshop key above when prompted. Verify it's stored:\n\n```\nopencode auth list\n```\n\n`relax-beta` should show `API key  stored`.\n\n**Desktop-app users:** you can do the same from the command palette — run `/connect`, choose **Relax AI (Beta)**, and paste the key.\n\n1. 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.\n2. Open the model picker (`/models` ) — you should see**DeepSeek V4 Pro** and**DeepSeek V41 Flash** from**Relax AI (Beta)** .\n\nThat's it.", "url": "https://wpnews.pro/news/opencode-v2-config-relax-ai-beta-provider-only", "canonical_source": "https://gist.github.com/mpvii/43c9acb469a259e92c5eb90f2ff0aeda", "published_at": "2026-09-19 21:36:37+00:00", "updated_at": "2026-09-22 10:25:34.323859+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-products"], "entities": ["OpenCode", "Relax AI", "DeepSeek", "DeepSeek V4 Pro", "DeepSeek V41 Flash", "Homebrew", "npm"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/opencode-v2-config-relax-ai-beta-provider-only", "markdown": "https://wpnews.pro/news/opencode-v2-config-relax-ai-beta-provider-only.md", "text": "https://wpnews.pro/news/opencode-v2-config-relax-ai-beta-provider-only.txt", "jsonld": "https://wpnews.pro/news/opencode-v2-config-relax-ai-beta-provider-only.jsonld"}}