Skip to content

Qwen Code CLI: unlimited Qwen3.8 Max

Qwen Code is Alibaba’s open-source coding CLI. It speaks the OpenAI API, so it can point at CheapestInference’s Chat Completions endpoint and run Qwen3.8 Max — the model the tool was built around — with unlimited usage during your reserved time blocks, for a flat monthly fee instead of per-token billing.

  1. Install the CLI (Node.js 22+):
Terminal window
npm install -g @qwen-code/qwen-code@latest
  1. Subscribe to the Flagship Pool and copy your subscriber key (sk-...) from the dashboard.
  2. Export these variables in your shell (or put them in your shell profile):
Terminal window
export OPENAI_API_KEY="sk-..." # your subscriber key
export OPENAI_BASE_URL="https://api.cheapestinference.com/v1"
export OPENAI_MODEL="qwen3.8-max"
  1. Run qwen. In the interactive /auth dialog pick the OpenAI-compatible provider — it reads the variables above.

Instead of shell variables, put the endpoint in ~/.qwen/settings.json so every session picks it up:

{
"modelProviders": {
"openai": [
{
"id": "qwen3.8-max",
"name": "Qwen3.8 Max (CheapestInference)",
"baseUrl": "https://api.cheapestinference.com/v1",
"envKey": "OPENAI_API_KEY"
}
]
},
"security": { "auth": { "selectedType": "openai" } },
"model": { "name": "qwen3.8-max" }
}
  • The native pairing: Qwen Code’s prompts and tool-calling are tuned for the Qwen family; Qwen3.8 Max is the strongest member.
  • 1M context + vision: whole-repo sessions without aggressive compaction, and screenshots/diagrams in the same conversation.
  • Flat price: coding agents are token-hungry. During your time blocks there is no per-token meter — see Unlimited Subscriptions.

Does Qwen Code work with any OpenAI-compatible API?

Section titled “Does Qwen Code work with any OpenAI-compatible API?”

Yes — that’s the supported path. Set OPENAI_BASE_URL, OPENAI_API_KEY and OPENAI_MODEL (or the modelProviders block in ~/.qwen/settings.json) and Qwen Code sends its requests there. CheapestInference’s /v1 endpoint implements the Chat Completions surface it expects, including streaming and tool calls.

How is this different from a Qwen coding plan?

Section titled “How is this different from a Qwen coding plan?”

Qwen’s own coding plans bundle the official CLI with usage quotas; a CheapestInference Flagship subscription gives you qwen3.8-max with unlimited usage during your reserved time blocks, plus Kimi K3 on the same key — and the same key also works in Claude Code, Cline or any other tool. Background: Qwen coding plans, explained.

A flat monthly subscription to the Flagship Pool — see current prices. No per-token billing during your blocks; for what per-token rates look like elsewhere, the LLM API pricing comparison tracks them monthly.

  • Your Flagship Pool subscription also covers Kimi K3 — change OPENAI_MODEL to kimi-k3 to switch, no new key needed.
  • Any pool works with any OpenAI-compatible tool: the same three variables configure OpenCode, Roo Code and Aider or Cline.
  • Prefer Claude Code as the harness? See the Claude Code guide — the API also speaks the Anthropic dialect.