查看中文版 →

Deutsche Version ansehen →

Открыть русскую версию →

Ver versión en español →

Log inChoose a plan
Blog · Setup guides

How to Use Claude in OpenCode

OpenCode 2 changed how custom providers are configured, and the custom provider form in the desktop settings will not save. This guide connects CodingPass with a single opencode.jsonc.

This guide connects CodingPass to OpenCode 2: one key for Claude, GPT, and open-weight models like DeepSeek and Kimi, sharing a single config between the CLI and desktop app. If you only want the step-by-step reference, the OpenCode setup guide covers that; this post also explains what OpenCode 2 is.

What OpenCode is

OpenCode is an open-source coding agent hosted at anomalyco/opencode on GitHub under the MIT license. It is not tied to a single model vendor: it ships a set of free models that work without an account, and also connects to APIs from OpenAI, Anthropic, xAI, and others, or existing ChatGPT Plus / Pro and GitHub Copilot subscriptions. OpenCode itself is free; any usage charges come from the provider you connect.

There are several entry points:

  • Terminal UI: runs in any shell, an editor's built-in terminal, or on a remote server
  • Desktop app: supports macOS, Windows, and Linux with tabbed sessions, diff review, and a built-in browser preview
  • Others: a web interface (opencode pair), mobile apps, and an SDK

Starting with OpenCode 2, a shared background service runs by default and all of these clients connect to it—so a session started in the terminal stays visible in the desktop app. As of November 18, the latest release is v2.3.2.

Once connected to CodingPass, a group of CodingPass models appears in your model list. On November 18, GET https://codingpass.ai/v1/models returned 26 models across Claude (Sonnet 5.5, Opus 5.5, Fable 5.2, and more), GPT (GPT-6.2 Sol, GPT-6.1 Terra, and more), Gemini, Grok, and open-weight models including DeepSeek, Kimi, GLM, Qwen, MiniMax, MiMo, and Hy4. Check the Models page to see which models your plan includes.

Setup walkthrough

Prerequisites

  • Install OpenCode 2 so that opencode --version outputs v2.x.
  • Open the Keys page in the CodingPass dashboard and create a key with the tool set to OpenCode.

1. Write the config file

Save the following to ~/.config/opencode/opencode.jsonc. Claude and open-weight models use the Anthropic package, while GPT uses the Responses package:

~/.config/opencode/opencode.jsonc
{  "$schema": "https://opencode.ai/config.json",  "model": "codingpass/claude-sonnet-5-5",  "providers": {    "codingpass": {      "name": "CodingPass",      "env": ["CODINGPASS_API_KEY"],      "package": "@opencode/ai/providers/anthropic",      "settings": { "baseURL": "https://codingpass.ai/v1" },      "models": {        "claude-sonnet-5-5": { "name": "Claude Sonnet 5.5" },        "claude-opus-5-5": { "name": "Claude Opus 5.5" },        "deepseek-v4.1-flash": { "name": "DeepSeek V4.1 Flash" },        "kimi-k2.7-code": { "name": "Kimi K2.7 Code" }      }    },    "codingpass-openai": {      "name": "CodingPass (OpenAI)",      "env": ["CODINGPASS_API_KEY"],      "package": "@opencode/ai/providers/openai-compatible/responses",      "settings": { "baseURL": "https://codingpass.ai/v1" },      "models": {        "gpt-6.2-sol": { "name": "GPT-6.2 Sol" },        "gpt-6.1-terra": { "name": "GPT-6.1 Terra" }      }    }  }}

baseURL must include /v1 or requests will return 404. Add or remove entries under models to match your plan—look up exact model IDs on the Models page.

2. Set your key

Terminal
opencode service set env CODINGPASS_API_KEY cp-live-…

This stores the key in the OpenCode background service environment, so both the CLI and the desktop app can read it.

3. Pick a model and send a message

Restart OpenCode, run /models, select Claude Sonnet 5.5 under CodingPass, and send any message. If it replies, you are connected.

Terminal
opencode/models
OpenCode terminal UI showing Say hi in five words, reply Hello there, nice to meet you!, and Build · Claude Sonnet 5.5 CodingPass at the bottom
OpenCode 2.3.2 terminal UI running Claude Sonnet 5.5 under CodingPass.

Desktop app

Download the desktop app from opencode.ai/desktop. It reads the same config file and key with no extra setup—just pick a CodingPass model from the model selector next to the input box.

OpenCode desktop app session showing Say hi in five words, reply Hello there, nice to meet you!, and CodingPass / Claude Sonnet 5.5 in the model selector below the input box
The desktop app needs no separate setup; CodingPass appears directly in the model selector.
Boarding

Keep OpenCode. Fix the monthly bill.

One opencode.jsonc puts Claude, GPT and open-weight models in /models. No surprise charges, cancel anytime.

  • Request ID on every response
  • Full refund if you've used 5% or less
  • No surprise charges
Choose GoOpenCode guide

$10/mo until you cancel.