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

  1. 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.
  2. 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 the packinggoods provider beside it.
  3. Or pick it in OpenCodeOnce the provider is there, packinggoods’s models are in OpenCode’s own /models list under packinggoods, so you can switch there too.

The same from a terminal:

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.

Zhipu GLM Coding Plan. When you add Zhipu GLM or Z.ai, pick the plan your key is for. A Coding Plan key has its own endpoints, and sent to the pay-as-you-go one it is told it has no balance.

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.

SubscriptionModels areFrom a terminal
Claude (Pro, Max, Team)claude/…packinggoods accounts add claude
packinggoods opencode claude/claude-opus-5-5
ChatGPT (Plus, Pro, Business)codex/…packinggoods accounts add codex
packinggoods opencode codex/gpt-5.5
GitHub Copilotcopilot/…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.

KeySet to
modelpackinggoods/<provider>/<model>
small_modelThe same form, when you set one
provider.packinggoods.npm@ai-sdk/openai-compatible
provider.packinggoods.options.baseURLhttp://127.0.0.1:3425/v1
provider.packinggoods.options.apiKeyThe gateway’s key
provider.packinggoods.modelsEvery 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

A shorter model list

By default OpenCode is shown every model you have in packinggoods. To show it only some providers or groups:

Terminal
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:

Terminal
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.