opencode or Qwen Code: which to pick for working with many models

Both agents are open source and not tied to one vendor. How provider setup, configs, agents and spending differ when you use the same key.

5 min · · сравнение · IDE

opencode vs Qwen Code is a question for people who want an open-source terminal agent and freedom to choose a model. Neither tool is tied to one vendor, and both can read a project, edit files and run commands. The difference lies in how providers, configuration and agents are organized, while spending is almost entirely determined by the model, not the shell. Below is a comparison on practical points, without arguing "which is smarter": quality depends on the model and your task.

Details about the tools were checked against their official documentation at the time of writing; fast-moving projects change, so check current pages before configuring.

A short profile of each

opencode is a terminal agent with a TUI. Providers are connected through the AI SDK and the Models.dev catalogue (the documentation states more than 75 providers), and any OpenAI-compatible service can be added as a custom provider. Configuration lives in opencode.json: globally in ~/.config/opencode/ and per project at the repository root. It ships built-in Build and Plan agents and General, Explore and Scout subagents; custom agents are defined in the config or in markdown files.

Qwen Code is an open agent from the Qwen team; according to the README, the project was originally based on Google Gemini CLI and later developed independently. It needs Node.js 22+ and starts with the qwen command. It supports several protocols (OpenAI, Anthropic, Gemini, Qwen) and third-party providers, settings are stored in ~/.qwen/settings.json, and it has subagents, MCP and integrations with VS Code, Zed and JetBrains. The name does not mean it only works with Qwen models.

Comparison by features

FeatureopencodeQwen Code
LaunchTUI in the terminalthe qwen command in the project folder
Connecting a provider/connect and the provider section of opencode.json/auth and the modelProviders section of settings.json
Protocolsthrough the AI SDK: OpenAI-compatible, Anthropic and othersOpenAI, Anthropic, Gemini, Qwen
Model choice in a session/models/model
AgentsBuild and Plan, subagents, custom agents in config or .mdsubagents, agent settings in settings.json
Project configopencode.json at the project root.qwen/settings.json in the project
Editor integrationsyes (IDE mode, see the documentation for details)VS Code, Zed, JetBrains
Installationsee the installation page on the project sitenpm (Node.js 22+), Homebrew or an install script

The table cells describe whether a feature exists, not how good it is. If a feature is critical for you, test it on your own project.

Connecting Zukko in each

Both need a fetch_... key from the dashboard. The shortest path is the OpenAI-compatible format with the address https://api.zukko.pro/v1.

opencode

Add a custom provider to opencode.json:

bash
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "zukko": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Zukko",
      "options": {
        "baseURL": "https://api.zukko.pro/v1",
        "apiKey": "{env:ZUKKO_API_KEY}"
      },
      "models": {
        "claude-sonnet-5-5": { "name": "Claude Sonnet 5.5" },
        "gpt-6.1-sol": { "name": "GPT-6.1 Sol" },
        "deepseek-v4.1-flash": { "name": "DeepSeek V4.1 Flash" }
      }
    }
  }
}

The key is read from the ZUKKO_API_KEY environment variable so it does not end up in git. After launch, open /models: the provider's models appear in the list. In addition, opencode can use the Anthropic format through the anthropic provider: then the address must be https://api.zukko.pro/v1, not without /v1, otherwise requests go to a wrong path and return 404. Step-by-step instructions are in the opencode documentation and in the article on connecting opencode.

Qwen Code

The quick way, through environment variables:

bash
export OPENAI_API_KEY="fetch_your_key"
export OPENAI_BASE_URL="https://api.zukko.pro/v1"
export OPENAI_MODEL="claude-sonnet-5-5"
cd ~/my-project
qwen

For a permanent setup, describe models in ~/.qwen/settings.json in the modelProviders section; a ready example is in the article on Qwen Code CLI. If you want to use the Anthropic protocol in Qwen Code, first find out in its documentation how the tool builds the address (whether it adds /v1 itself), and only then set the base address.

Where the difference shows up in money

The tools themselves are free; you pay for model tokens. So the main spending question is which model and which API format.

An example for 18 October 2026. Assumption: an agent task sends 200,000 input tokens without cache in total across all steps and receives 40,000 output tokens. Formula: input × input price + output × output price.

ModelCalculationTotal per task
claude-sonnet-5-50.2 × $0.4 + 0.04 × $2$0.16
gpt-6.1-sol0.2 × $0.27 + 0.04 × $1.32$0.107
qwen3.8-max0.2 × $0.088 + 0.04 × $0.238$0.027
deepseek-v4.1-flash0.2 × $0.013 + 0.04 × $0.038$0.004

The gap between models here is tens of times; the shell itself does not change the token price, although agents may differ in step count and context size. One real difference in spending is tied to the API format. For Claude, the cache discount comes from the Anthropic format (/v1/messages); in the OpenAI format (/v1/chat/completions) all Claude input is billed at the input price. So for long agent sessions with Claude, find out which protocol your agent supports and check spending in the dashboard's Usage section. Details are in the article on cache with /v1/messages and /v1/chat/completions. For GPT models the cache is visible in both formats.

Do not forget about context: glm-5.3 and glm-5.3-flash have 128K, most other models in the table have 1M, and Grok has 256K. For agent sessions that matters. Current prices and the model list: GET https://api.zukko.pro/v1/models.

How to choose

Guidelines, not rules:

  • You want simple setup of your own OpenAI-compatible provider and a familiar TUI with Plan and Build modes: start with opencode.
  • You want one tool with several protocols, VS Code, Zed and JetBrains integrations, and npm installation suits you: try Qwen Code.
  • You already use one of them and are happy: do not switch for the sake of it, the key and balance are the same.

The most reliable way to decide: give both the same small task with the same model, and compare the result, the number of steps and the spending in the dashboard.

FAQ

Does Qwen Code work only with Qwen models?

No. It supports OpenAI-compatible APIs and other protocols, so through a gateway you can use Claude, GPT, DeepSeek and GLM in it. Qwen models are also in the Zukko catalogue, for example qwen3.8-max and qwen3.8-flash.

Can I keep both agents on one key?

Yes. A fetch_... key is not tied to a tool. For convenience, create separate keys with a daily limit: then the dashboard shows how much each agent spent.

Which agent is cheaper?

The tools are free. Cost is set by the model, the context size the agent carries, and the API format from the cache point of view. Compare the spending of two agents on the same task in the Usage section.

Do I need a Claude or ChatGPT subscription?

No, both agents work with an API key and you pay for tokens from the balance. Top-up is available via SBP (the payment page adds an 8.5% commission on top), crypto or MasterCard.

zukko

Pay 25×
less

for Claude Code & ChatGPT

One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.

Get API keyDocumentation

api.zukko.pro · fetch_*

opencode vs Qwen Code: agent comparison · Zukko