Back to guides
Compare·September 21, 2026·10 min read

Gemini CLI vs Qwen Code: protocols, plans and total cost

The same program, forked: one speaks four API protocols and lets a model entry point at a base URL of your own, the other speaks Google's native protocol only — and both headline free tiers closed during 2026.

Last reviewed on .

Gemini CLI and Qwen Code are origin and fork of the same program, and the choice between them now turns on one asymmetry: Qwen Code speaks four API protocols and lets a model entry point at a base URL of your own, while Gemini CLI speaks Google's native protocol only. Qwen Code's README states it "was originally based on Google Gemini CLI v0.8.2" and stopped syncing with upstream at its own v0.1. Both clients are Apache-2.0 and cost nothing; both lost their headline free tier during 2026; so the real decision is which billing relationship you want to be inside.

Two names to separate first. QwenLM/Qwen3-Coder is the open-weight model family — its benchmark scores and parameter counts belong to the model, not to the client at QwenLM/qwen-code. And eliben/gemini-cli is a different, archived, third-party Go program; Google's is google-gemini/gemini-cli, which the GitHub API reported as archived: false with a push on September 21, 2026.

What you are actually comparing, on September 21, 2026

Gemini CLIQwen Code
MaintainerGoogleQwen team, Alibaba
LicenceApache-2.0 (GitHub API)Apache-2.0 per the repository; the npm record carries no license field
Latest releasev0.60.0, published September 15, 2026npm 0.24.3, published September 21, 2026
Stars107,11228,046
Free tierConsumer sign-in stopped serving June 18, 2026Qwen OAuth free tier discontinued April 15, 2026
Live paid entryGemini Code Assist Standard/Enterprise licence, Gemini API key, Gemini Enterprise Agent Platform keyAlibaba ModelStudio plans and keys, nine named third-party providers, or any OpenAI-compatible endpoint

Repository and package facts from the GitHub and npm APIs for both projects — @google/gemini-cli and @qwen-code/qwen-code — checked September 21, 2026. Both ship fast — Gemini CLI also publishes preview and nightly npm channels — so verify the version in your own environment rather than trusting any number printed on a page.

Three traps in official sources are worth naming. Gemini CLI's README on main still advertises a "Free tier: 60 requests/min and 1,000 requests/day with personal Google account", four months after Google's May 19 announcement said that route would stop serving on June 18, 2026. The official geminicli.com quota table contradicts its own banner on the same page. And Antigravity, the successor Google names, is a different product: its pricing page shows a $0 Individual tier and prints no price at all for Pro or Ultra, so third-party blog figures for those tiers are not sourced here. Gemini CLI quota works through which path still carries an allowance.

Who should pick which

Pick Qwen Code if the endpoint is the decision. Its model-providers reference defines four protocols — openai, anthropic, gemini and vertex-ai — and its auth docs name DeepSeek, Grok, MiniMax, Z.AI, Kimi, Idealab, ModelScope, OpenRouter and Requesty as supported third-party routes, plus "any OpenAI-compatible endpoint". Bring-your-own-endpoint is a sanctioned path there, not a workaround — with the limit the same page states, that a baseUrl has to be compatible with the API format of the transport its entry declares. If you expect to switch model families over the next year, that is the whole argument.

Pick Gemini CLI if you are already inside Google's billing. If your organisation holds Gemini Code Assist licences, the CLI is an included feature of both paid editions per Google's Cloud pricing page, and its Enterprise bullet promises "increased daily usage limits" for CLI and agent-mode work. A Gemini API key works too. What you give up is choice: nothing in the v0.60.0 auth enum speaks a non-Google protocol.

Pick on plan shape if the budget is fixed. Qwen Code's flat-rate route is a $50 monthly Alibaba Coding Plan with request caps; Gemini CLI's is a licence whose fee Google prints per hour and sells through the Gemini Admin console or its sales team. Whether an individual — as opposed to an organisation — can self-serve a Gemini Code Assist Standard licence is not something any page checked here confirms or denies, so treat it as unverified before you plan around it.

Pick Qwen Code if you need surfaces beyond a terminal. Its README advertises a desktop app, VS Code, Zed and JetBrains plugins, Telegram, DingTalk, WeChat and Feishu channels, TypeScript, Python and Java SDKs, and an experimental qwen serve daemon speaking HTTP and SSE. Those are the vendor's claims about its own product; none were exercised here, and the vendor marks the web UI and daemon experimental.

What should not decide it: subagents, hooks and skills. A code search across both repositories' docs/ directories on September 21, 2026 found all three documented on both sides, so they are table stakes rather than a differentiator.

Workflow: what the fork kept, and where they parted

DimensionGemini CLIQwen Code
SurfacesTerminal, plus the VS Code companion its README documentsTerminal, desktop, experimental web UI, editor plugins, chat channels, ACP daemon
Headlessgemini -p "...", with --output-format json or stream-jsonqwen -p "...", plus three SDKs
Sandboxgemini -s; same four benefit bullets in its docsSame concept inherited from the fork; macOS Seatbelt default profile permissive-open
Environment prefixGEMINI_*QWEN_*, with the docs admitting some sandbox variables used GEMINI_* historically
Endpoint configEnvironment variables only: GOOGLE_GEMINI_BASE_URL, GOOGLE_VERTEX_BASE_URLStructured modelProviders in settings.json, hot-reloaded without a restart
Built-in searchGoogle Search grounding, billed separatelyHost-gated; the gate was not re-checked in this pass

Documentation read on main for both projects, and Gemini CLI source at released tag v0.60.0, on September 21, 2026. The sandbox row is documentation similarity, not tested equivalence of behaviour.

Models and endpoints: the asymmetry that decides it

Gemini CLI's configuration reference documents GOOGLE_GEMINI_BASE_URL as overriding "the default base URL for Gemini API requests (when using gemini-api-key authentication)", requiring HTTPS unless it points at localhost. Two limits follow. It is unreachable from the Google sign-in path, so it never raises, extends or resets a Google-side allowance — it swaps you onto a different billing relationship. And in the v0.60.0 source, setting it alone selects an AuthType.GATEWAY that appears in no published documentation page found here; the request still leaves as Google's native call with an x-goog-api-key header. Treat that as source, not a feature contract.

Qwen Code inverts every one of those. Its /auth command lists three top-level options — Alibaba ModelStudio, Third-party Providers and Custom Provider — while Anthropic and Gemini routes are defined in modelProviders rather than in the dialog. Credentials are never written into settings; the runtime reads them from process.env[envKey]. Three documented traps are worth reading before you commit: a provider id that is neither built in nor mapped through the top-level providerProtocol setting has its whole entry "skipped with a warning"; providerProtocol is read once at startup and needs a restart while modelProviders hot-reloads; and any API key value reaching a Vertex entry "switches the Google SDK to Vertex Express mode, which ignores the project, the location and your ADC credentials".

One caution on defaults, both directions. Gemini CLI v0.60.0's DEFAULT_GEMINI_MODEL constant is gemini-2.5-pro and Qwen Code's DEFAULT_QWEN_MODEL is coder-model, but neither constant is what answers you: the Gemini side passes a requested id through a resolver that rewrites it from context such as release channel and preview access, and on the Qwen side the same string coder-model is also the value of DEFAULT_QWEN_FLASH_MODEL, so it does not name a specific model version either. Name the model explicitly if the rate matters.

Kunavo serves no embedding model, so neither client's embedding default — gemini-embedding-001 on the Gemini side, text-embedding-v4 on the Qwen side — can be pointed here, and any indexing step needs its own provider.

Plans and token rates on one yardstick

RoutePublished priceWhat it buys
Both clients$0, Apache-2.0The software only; all cost is inference
Alibaba Coding Plan Pro (international)$50 per monthUp to 6,000 requests per 5 hours, 45,000 per week, 90,000 per month
Gemini Code Assist Standard$0.031232877 per hour, monthly commitment; $0.026027397 per hour on a 12-month commitmentLicence including Gemini CLI, bought via the Gemini Admin console or sales
Gemini Code Assist Enterprise$0.073972603 per hour, monthly commitment; $0.061643836 per hour on a 12-month commitmentSame plus "increased daily usage limits"
Gemini API, gemini-3.1-pro-preview$2.00 in / $12.00 out per 1M for prompts of 200k tokens or less; $4.00 / $18.00 above thatMetered key; the Free Tier column reads "Not available"
Gemini API, gemini-3.8-flash$0.75 / $3.75 per 1M through December 31, 2026, then $1.50 / $7.50Metered key; the 2027 step-up is printed on the page today
Alibaba, qwen3-coder-plus (Singapore)$1 / $5 up to 32K; $1.8 / $9 to 128K; $3 / $15 to 256K; $6 / $60 to 1MPay as you go, priced by request input length
Alibaba, qwen3-coder-next (Singapore)$0.3 / $1.5 up to 32K; $0.5 / $2.5 to 128K; $0.8 / $4 to 256KNo 256K-and-above tier listed

Prices read September 21, 2026 from Google Cloud, the Gemini API pricing page, Alibaba's Coding Plan page and its model pricing table. Four caveats carry real money. Google prints the licence fee hourly behind a monthly toggle that did not render in the page source read here, so multiplying by 730 hours gives roughly $22.80 and $19.00 for Standard and $54.00 and $45.00 for Enterprise — that is arithmetic on Google's hourly figures, not a monthly price read verbatim. Alibaba's China column is a separate commercial offer from the Singapore column, not a currency conversion, and mixing them produces a wrong answer. The cheap Coding Plan Lite tier still quoted in social posts closed to new subscriptions on March 20, 2026 and to renewals and upgrades on April 13, 2026. And a Coding Plan is not "the price of Qwen Code": Alibaba lists Claude Code, Cline and Cursor among its supported tools, so quota another client spends is quota Qwen Code no longer has.

One more live line item on the Gemini side: Google Search grounding, which Gemini CLI ships as a built-in tool, is priced at 5,000 free search requests per month shared across Gemini 3.x models and $14 per 1,000 requests after that.

A worked estimate for one session

This is illustrative token arithmetic, not a measured task cost and not a bill ceiling. Assume one session that sends 200,000 uncached input tokens and receives 12,000 output tokens, with every individual request small enough to stay in each vendor's lowest length tier. Caching, tool calls and retries are excluded.

RouteRate per 1M, in / outEstimate for the assumed session
Gemini API, gemini-3.1-pro-preview$2.00 / $12.00$0.544
Gemini API, gemini-3.8-flash$0.75 / $3.75$0.195
Alibaba, qwen3-coder-plus$1.00 / $5.00$0.260
Alibaba, qwen3-coder-next$0.30 / $1.50$0.078
Gemini 3.8 Flash, on Kunavo inside Qwen Code$0.525 / $2.625$0.137
Gemini 3.1 Pro, on Kunavo inside Qwen Code$0.70 / $4.20$0.190
Claude Haiku 4.5, on Kunavo inside Qwen Code$0.40 / $2.00$0.104
Claude Sonnet 4.6, on Kunavo inside Qwen Code$1.20 / $6.00$0.312

Two readings. First, the tier boundary moves more money than the vendor choice does: the same session on qwen3-coder-plus rises from $0.260 to $0.468 once requests cross 32K of input, which an agent loading several files does routinely. Second, a rate comparison is not an outcome comparison — no benchmark comparing these two clients exists, and a model that needs three attempts can cost more than a dearer one that needs a single pass.

The Kunavo rows are live catalog rates for models you would run through Qwen Code's openai protocol; Kunavo sells no Qwen text model, so it is not a cheaper route to Qwen inference. Its catalog amount is a billing floor rather than a cap: when the upstream reports its charge, the bill is the greater of catalog cost and upstream cost times the applicable markup. The minimum top-up is $10 in prepaid credit, which is a funding minimum rather than a subscription — see billing details.

Migration cost, both directions

Going from Gemini CLI to Qwen Code is the cheaper move, and the fork is why: the command surface, the sandbox concept and the general shape of a session were inherited, so the mental model largely transfers. What does not transfer automatically is configuration. Gemini CLI keeps its endpoint in environment variables; Qwen Code keeps it in a structured settings.json block, and the docs warn that an earlier preview shape wrapping models in { protocol, models } "has been reverted" and is silently skipped in a $version: 4 file. Copying a config from an old tutorial is the most likely way to lose an afternoon.

Going the other way costs more, because you give up every non-Google endpoint at once. If your reason for moving is a Code Assist licence you already pay for, that can be worth it. If your reason is a free quota you read about, check the date on the page you read it from first.

One caveat that applies to both directions and is not resolvable from published pages: whether an unpaid Gemini API key still works inside Gemini CLI after June 18, 2026. Google's May 19 post says the CLI remains reachable via paid keys; no first-party page found here settles the unpaid case, so do not budget against it.

Setting up the third-party route

If Qwen Code plus a gateway is the answer, Kunavo publishes a configuration reference for it: declare the endpoint under modelProviders with the built-in openai provider id — so no providerProtocol mapping is needed — point baseUrl at the /v1 root rather than the full chat-completions path, and read the key from an environment variable. That is a published setup guide, not a compatibility test: Qwen Code has not been runtime-tested against Kunavo's endpoint here, and Qwen Code's own docs note that the responses wire API has no endpoint detection and no automatic fallback, so start on chat completions. Keep a working route available, run one bounded task, then read what your account actually recorded. Start at the Qwen Code integration guide, compare the plan routes in Qwen Code pricing, and create a Kunavo account when you are ready to fund a key.

Choosing against a third client instead? Qwen Code vs Claude Code and OpenAI-compatible API cover the neighbouring decisions.

FAQ

Is Qwen Code just a rebranded Gemini CLI?

It started as a fork and is no longer a copy. Qwen Code's own README states that the project "was originally based on Google Gemini CLI v0.8.2" and that "Starting from Qwen Code v0.1, we stopped syncing with upstream and began independent development as a multi-protocol, multi-platform agent framework" (read September 21, 2026). Gemini CLI's current stable release is v0.60.0, dozens of minor versions past the fork point, so the two codebases have been diverging for a long time. The inheritance still shows in places: Qwen Code's sandbox documentation notes that some sandbox environment variables historically used a GEMINI_ prefix and that all new ones use QWEN_.

Can Gemini CLI run Qwen models, or Qwen Code run Gemini models?

Only one direction works, as documented. Qwen Code's model-providers reference defines four protocols — openai, anthropic, gemini and vertex-ai — so Google models are a built-in route there, although the Anthropic and Gemini routes are settings-file features rather than /auth dialog entries. Gemini CLI has no equivalent: in its v0.60.0 source the auth enum contains oauth-personal, gemini-api-key, vertex-ai, cloud-shell, compute-default-credentials and gateway, with no OpenAI-compatible and no Anthropic member, and a GitHub code search for OPENAI_BASE_URL across the repository returns zero results. Both statements are documentation and source read on September 21, 2026, not runtime tests.

Does either one still have a free tier?

Both headline free tiers were withdrawn in 2026. Qwen Code's auth documentation states that "The Qwen OAuth free tier was discontinued on 2026-04-15" and that cached tokens may work briefly before new requests are rejected. Google announced on May 19, 2026 that on June 18, 2026 Gemini CLI would "stop serving requests for Google AI Pro and Ultra, as well as those using it free of charge using Gemini Code Assist for individuals". Tutorials quoting 2,000 free Qwen requests a day or 1,000 free Gemini requests a day describe routes that no longer serve. The only zero-cost allowance verifiable on September 21, 2026 was the free quota on Alibaba's model pricing table — 1 million tokens per model, offered in Singapore only and dated 90 days from Model Studio activation, model release or application approval, whichever is later. That is a trial, not a recurring tier.

Which is cheaper to run, Gemini CLI or Qwen Code?

Neither client charges anything; both are Apache-2.0 open source per their repositories, so the whole comparison is the inference bill behind them. On published list rates checked September 21, 2026, Alibaba's qwen3-coder-next in Singapore was the lowest posted rate of the routes compared here at $0.30 per million input and $1.50 per million output for requests up to 32K, against $2.00 and $12.00 for gemini-3.1-pro-preview on prompts of 200k tokens or less. But the cheapest listed rate and the lowest cost to finish a task are different claims, and no benchmark comparing these two clients exists. Two structural traps matter more than the headline: Alibaba prices by request input length, so qwen3-coder-plus jumps from $1/$5 to $1.8/$9 once a request passes 32K, and Alibaba's China and Singapore columns are separate commercial offers with materially different numbers.

Is Gemini CLI discontinued?

No, but its consumer entry is. The repository is live and unarchived, shipping weekly: GitHub reported archived false with a push on September 21, 2026, and stable v0.60.0 was published September 15, 2026. What closed is the sign-in path — Google's own deprecation notice says Google AI Pro, Google AI Ultra and free Gemini Code Assist for individuals stopped being served on June 18, 2026, and geminicli.com carries a banner saying the CLI was replaced by Antigravity CLI on that date for unpaid and Google One users. Google's Cloud pricing page still lists Gemini CLI as an included feature of both paid Gemini Code Assist editions, so the product is supported on paid paths. Treat the repository README's "60 requests/min and 1,000 requests/day with personal Google account" as uncorrected text, not a live allowance.

Can I point either client at a third-party gateway such as Kunavo?

Qwen Code yes as documented, Gemini CLI no. Qwen Code's openai protocol takes a base URL you supply, as long as it speaks the API format that route expects, and Kunavo publishes a setup reference for it; that is a configuration guide, not a compatibility test, and Qwen Code has not been runtime-tested against Kunavo's endpoint. Gemini CLI's GOOGLE_GEMINI_BASE_URL is documented on the gemini-api-key path, and in v0.60.0 source setting it selects a gateway auth type; on either reading the request still leaves as Google's native call with an x-goog-api-key header, so an OpenAI-compatible or Anthropic Messages endpoint is not a drop-in target for it — that is an inference from protocol shape and route inventory rather than an observed rejection. Note also that the plans documentation for Google Antigravity, the successor Google points Gemini CLI users to, lists among the things it does not currently support "Bring-your-own-key or bring-your-own-endpoint for additional rate limits".

Repositories, npm records, official pricing pages and both projects' documentation checked September 21, 2026; Gemini CLI behaviour read at released tag v0.60.0 and Qwen Code documentation on branch main. Neither client was installed or run, no benchmark comparing the two exists, and every dollar figure above is either a published third-party rate or illustrative token arithmetic on Kunavo's live catalog.