Docs · Guide
Use DeepSeek, Kimi, GLM or your Claude and ChatGPT subscription in OpenCode
OpenCode reaches a model through a provider in its config. packinggoods adds one provider, named packinggoods, that leads to a gateway on your computer. Every model you have in packinggoods is listed under it: DeepSeek, Kimi, GLM and Qwen keys, and the models of a Claude, ChatGPT or Copilot sign-in.
The gateway runs at 127.0.0.1:3425. OpenCode sends it OpenAI Chat Completions, and packinggoods passes each request on in the API its provider speaks, translating the request and the reply where they differ, streaming and tool calls included. OpenCode’s own providers stay as they were, next to packinggoods’s.
Chinese models
DeepSeek, Kimi and Kimi Code, Zhipu GLM (pay as you go or Coding Plan), Z.ai, MiniMax and Qwen.
Subscriptions
Claude Pro/Max, ChatGPT Plus/Pro and GitHub Copilot, signed in once in packinggoods.
Anything else
Any OpenAI- or Anthropic-compatible URL and key, Ollama and LM Studio.
Set it up
- Add the providerIn packinggoods’s Providers tab, press + Add provider, pick DeepSeek, Kimi, Zhipu GLM, MiniMax or Qwen, paste your API key and save. packinggoods asks the vendor which models it serves.
- Pick the model for OpenCodeIn the Agents tab, click the model on OpenCode’s row and choose one, such as
deepseek/deepseek-v4-pro. packinggoods writes"model": "packinggoods/deepseek/deepseek-v4-pro"into OpenCode’s config, with thepackinggoodsprovider beside it. - Or pick it in OpenCodeOnce the provider is there, packinggoods’s models are in OpenCode’s own
/modelslist underpackinggoods, so you can switch there too.
The same from a terminal:
packinggoods provider add deepseek sk-… packinggoods models # every model, as provider/model packinggoods opencode deepseek/deepseek-v4-pro # OpenCode's model packinggoods opencode small deepseek/deepseek-v4-flash # its small_model
OpenCode’s small_model is a field of its own on the row, so it can run on a cheaper model than the main one.
Subscriptions
Sign in once in packinggoods, from + Add provider or a terminal, and the subscription’s models are listed under packinggoods in OpenCode like any other. No API key.
| Subscription | Models are | From a terminal |
|---|---|---|
| Claude (Pro, Max, Team) | claude/… | packinggoods accounts add claudepackinggoods opencode claude/claude-opus-5-5 |
| ChatGPT (Plus, Pro, Business) | codex/… | packinggoods accounts add codexpackinggoods opencode codex/gpt-5.5 |
| GitHub Copilot | copilot/… | packinggoods accounts add copilot |
Requests on a Claude subscription run through the Claude Code installed on your computer, so keep it installed. Copilot gives you a code to enter on GitHub’s page. Several accounts of one subscription can share the load and fail over; see Subscriptions in any agent.
What changes in opencode.json
packinggoods writes to the config file OpenCode reads from its config folder, $OPENCODE_CONFIG_DIR when that is set and ~/.config/opencode otherwise: the first of opencode.jsonc, opencode.json and config.json that exists, or a new opencode.json. It changes only these keys; your other settings stay.
| Key | Set to |
|---|---|
model | packinggoods/<provider>/<model> |
small_model | The same form, when you set one |
provider.packinggoods.npm | @ai-sdk/openai-compatible |
provider.packinggoods.options.baseURL | http://127.0.0.1:3425/v1 |
provider.packinggoods.options.apiKey | The gateway’s key |
provider.packinggoods.models | Every model packinggoods lists for OpenCode |
Each model carries its context window and output limit, so OpenCode knows when to compact; whether it takes images; its reasoning levels; and its price. packinggoods keeps the list up to date as you add providers and accounts. With OpenCode 2 installed, packinggoods writes OpenCode 2’s own keys instead: the provider under providers.packinggoods and the small model as agents.title.model. OpenCode in a WSL distro on Windows is set up the same way, in the distro’s ~/.config/opencode.
Reasoning levels and cost
- Reasoning levels. A model’s reasoning efforts are written as its variants in OpenCode, each one asking for that
reasoningEffort. A model that offers fast processing, such as a GPT model from a ChatGPT plan, also gets afastvariant for each level. - Cost. packinggoods writes each model’s price per million tokens, input, output, cache read and cache write, so OpenCode’s session cost counts, where without it every model costs 0.
- Prompt caching. packinggoods turns on OpenCode’s prompt cache key for its provider, so a provider that caches by it keeps the cache between turns.
A shorter model list
By default OpenCode is shown every model you have in packinggoods. To show it only some providers or groups:
packinggoods visible opencode deepseek,claude # only these providers packinggoods visible opencode all # every model again
A model left out of the list still answers when OpenCode asks for it by name.
Switch back
On OpenCode’s row in packinggoods, the model picker lists OpenCode’s own providers too, the ones signed in in its auth.json. Pick one of them, or run:
packinggoods opencode default
It puts back the model and small_model OpenCode had before packinggoods, and takes the packinggoods provider out of the file.
By provider: DeepSeek · Kimi and Kimi Code · GLM Coding Plan · Volcengine Ark · Tencent Cloud · Baidu Qianfan · SiliconFlow · ModelScope · Huawei Cloud MaaS · Xiaomi MiMo · StepFun · LongCat · Qwen · MiniMax · Anthropic · OpenAI · Gemini · Grok · Mistral · OpenRouter · GitHub Copilot · Ollama
OpenCode Go and ClinePass in Claude Code, Codex and other agents
FAQ
How do I use DeepSeek in OpenCode?
Add DeepSeek with your API key in packinggoods, then pick a DeepSeek model on OpenCode’s row in the Agents tab, or run packinggoods opencode deepseek/deepseek-v4-pro. packinggoods adds a packinggoods provider to opencode.json and sets the model.
Can I use Kimi or GLM in OpenCode?
Yes. Add Kimi or Zhipu GLM in packinggoods and pick its model for OpenCode. For a GLM Coding Plan key, pick the Coding Plan when you add it, since it has its own endpoints.
Can I use my Claude Pro or Max subscription in OpenCode?
Yes. Sign in to Claude in packinggoods (packinggoods accounts add claude) and pick a claude/… model for OpenCode. Requests on a Claude subscription run through the Claude Code installed on your computer, so keep it installed.
Can I use my ChatGPT Plus or Pro subscription in OpenCode?
Yes. Sign in to ChatGPT in packinggoods (packinggoods accounts add codex) and pick a codex/… model, such as codex/gpt-5.5. Its reasoning levels show as the model’s variants in OpenCode.
Which file does packinggoods change?
OpenCode’s config in ~/.config/opencode (or $OPENCODE_CONFIG_DIR): the first of opencode.jsonc, opencode.json and config.json, or a new opencode.json. It sets model and small_model and adds provider.packinggoods; other settings stay.
How do I switch back to OpenCode’s own model?
Pick one of OpenCode’s own models on its row in packinggoods, or run packinggoods opencode default. It puts back the model and small_model you had and removes packinggoods’s provider.
Other agents: Models in Claude Code, Models in Codex, Models in Gemini CLI, OpenClaw on any model, OpenChamber on any model. Stuck? Ask on Discord.