Alibaba moved Qwen4-Max to general release on November 16, 2026, five days after a preview that only Token Plan subscribers could call. For Qwen4-Max coding agents, the launch-day facts are a stable model ID, qwen4-max; $1.50 per million input tokens and $4.50 per million output in the Singapore region; $0.075 per million for cached input; a 1M-token context window; and OpenAI- and Anthropic-compatible endpoints, so Claude Code and Codex reach it with a config change. Alibaba’s launch post calls it a “24/7 AI teammate.”
That pitch is about long runs, and long runs are where a team’s agents spend most of their tokens. This guide covers where a flagship at this price fits when your team already runs coding agents: setup, cache math, the rate-limit ceiling, staged releases with a person steering, and what to route to it. If you’d rather trial it against your current model first, our guide to testing a new coding model on your team’s real tasks used the Qwen4-Max preview as its example, and Sharkly runs both sides of that trial on one board.
TL;DR
Create a pay-as-you-go key in Singapore, where qwen4-max comes with 1 million free tokens. Point one Claude Code or Codex Runtime at the Singapore endpoint, put it behind one Agent, and give it long-context, long-running Tasks. Keep the prompt prefix stable so most input bills at the $0.075 cache rate. Split work longer than one run into staged releases a person reviews, and keep review on a model from another provider.
What’s confirmed on launch day
As of November 16, 2026, from Alibaba’s model page, pricing docs and Qwen4-Max guide:
| Item | Qwen4-Max |
|---|---|
| Model ID | qwen4-max (the preview stays separate as qwen4-max-preview) |
| Input / output per 1M tokens, Singapore | $1.50 / $4.50, with thinking billed as output |
| Cached input (implicit or explicit read) | $0.075 |
| Explicit cache write | $1.875 for a 5-minute TTL, $3 for 1 hour |
| Beijing and Global regions | $1.413 / $4.24, cache read $0.071 |
| Context | 1M tokens; max input 983,616 with thinking on |
| Max output | 131,072 non-thinking; 262,144 for thinking plus answer |
| Reasoning effort | low, high (default), xhigh |
| APIs | OpenAI-compatible, Anthropic-compatible, DashScope |
The model page lists a 393K maximum output; the docs say 131,072 and 262,144, and we follow the docs.
Alibaba’s benchmark claims come from its own runs. On Work360, its in-house benchmark of industry tasks, Qwen4-Max scored 52.69 against 47.74 for Qwen3.8-Max, and average cost per task fell from $4.43 to $1.67. Token use dropped about 24% at Xhigh effort and 35% at High on Work360, and about 48% and 49% on Terminal-Bench 4.0. We haven’t reproduced any of these.
One number belongs in every reviewer’s head. On Last Secure Code Bench, the share of functions that pass both functionality and security checks rose from 22.0% to 31.8%. That’s real progress, and it still means about two in three generated functions miss that bar on that benchmark.
Why $0.075 cached input matters more than the $1.50 headline
A coding agent resends its context on every turn of its tool loop: the system prompt, the tool definitions, the files it has already read. On a long Task, most input tokens are repeats, so the cache rate sets the bill.

Take one turn at Singapore prices: a 200,000-token prefix that hits the cache, 5,000 new input tokens and 3,000 output tokens. That costs about $0.036. The same turn with no cache hit costs about $0.32, roughly nine times more.
| Model | Input / output per 1M | Cached input |
|---|---|---|
| Qwen4-Max (Singapore) | $1.50 / $4.50 | $0.075 |
| Qwen3.8-Max (Singapore) | $2 / $6 | $0.25 implicit, $0.17 explicit read |
| Kimi K3.1 Pro (as of Oct 26) | $2 / $10 | $0.20 |
Against Qwen3.8-Max, list input and output fell 25%, and the implicit cache rate fell 70%. Three habits keep the cache working:
- Keep the system prompt and tool list identical across a Task. A timestamp at the top of the prompt breaks every prefix match.
- Alibaba says implicit caching doesn’t guarantee hits. Explicit breakpoints do, with a minimum prefix of 1,024 tokens, through Chat Completions, Responses or Anthropic Messages. Check
cached_tokensin the usage block on a test call to see what your Runtime gets. - When an Agent pauses for review longer than five minutes, the 1-hour cache write ($3) can beat paying the full input rate again.
Sharkly does not sell tokens. The model bill stays on your QwenCloud account, which is the point of bring-your-own-key.
Set up Qwen4-Max on one Runtime first
Step 1: a key in the right region
Per the free quota page, Singapore pay-as-you-go accounts get 1 million free tokens per model, valid for 90 days. For a model released after you signed up, the clock starts on the model’s release date. You need payment details on file, and the quota covers real-time calls only, not batch or built-in tool fees.
Keys are region-specific, and Token Plan keys use a different base URL (token-plan.maas.qwencloudapi.com). Mixing the two is the first error Alibaba’s Claude Code guide troubleshoots. Test from the Computer that will run the work:
curl https://ap-southeast-1.maas.qwencloudapi.com/compatible-mode/v1/chat/completions \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "qwen4-max", "reasoning_effort": "low",
"messages": [{"role": "user", "content": "Reply with the word ok."}]}'
Step 2: Claude Code or Codex
Claude Code. Alibaba’s Claude Code guide says to set the Opus tier to qwen4-max and keep the context limit at 983,616 tokens:
{
"env": {
"ANTHROPIC_BASE_URL": "https://ap-southeast-1.maas.qwencloudapi.com/apps/anthropic",
"ANTHROPIC_AUTH_TOKEN": "YOUR_QWENCLOUD_API_KEY",
"ANTHROPIC_MODEL": "qwen4-max",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "qwen4-max",
"CLAUDE_CODE_MAX_CONTEXT_TOKENS": "983616"
}
}
If long output gets cut off, add CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000. The guide’s samples map the Haiku and Sonnet tiers to smaller Qwen models; point them wherever you want lighter subagent work to go.
Codex. The Codex guide uses the Responses API. In ~/.codex/config.toml:
model_provider = "QwenCloud"
model = "qwen4-max"
[model_providers.QwenCloud]
name = "QwenCloud"
base_url = "https://ap-southeast-1.maas.qwencloudapi.com/compatible-mode/v1"
env_key = "OPENAI_API_KEY"
wire_api = "responses"
This provider block reads your QwenCloud key from OPENAI_API_KEY, not DASHSCOPE_API_KEY.
Step 3: one Agent in Sharkly
Per the Agents docs, an Agent follows its Runtime’s model unless you pick another on its Model row or set specify model: model-name in Custom arguments. Each Agent has its own environment variables, and a matching Agent variable overrides the Runtime default. That’s the right home for the key.
Watch the shared-Computer trap: ~/.claude/settings.json and ~/.codex/config.toml are per user, so editing them moves every Claude Code or Codex Agent on that Computer to Qwen. We haven’t run qwen4-max through a Sharkly Runtime end to end yet, so test on one Agent first.
Rate limits: 5M tokens a minute is about five full-context turns
Alibaba’s rate limits page gives Qwen4-Max a fixed 30,000 requests and 5,000,000 tokens per minute in Frankfurt, Hong Kong, Tokyo and US (Virginia). Singapore and Beijing use dynamic tiers of 5M, 10M and 20M tokens per minute, adjusted monthly from your past spend.
A full-context turn sends up to 983,616 tokens, so five of them in one minute fill the 5M floor across every Agent on that account. The docs don’t say whether cached tokens count toward that limit, so plan as if they do. Over the limit, you get an HTTP 429.
Sharkly won’t throttle for you. An Agent working in a temporary directory defaults to 50% of the Computer’s concurrency limit, so set Max concurrency (assigned tasks) on each Qwen Agent to what the account can carry. Runs over that limit wait in the queue, 24 hours by default.
Staged releases with a person steering
Live Delivery is Alibaba’s name for a pattern: the agent ships a usable first version early, then improves it release by release while a person reviews and redirects. Alibaba open-sourced it as the Qwen-Live-Delivery-Plugin (Apache-2.0, version 0.1.0). At launch, it runs in Codex CLI only, on Linux and macOS with Node.js 22+, with a local browser workbench and time budgets up to 7 days.

The pattern works on a board without the plugin:
- Create a parent Task for the goal and a sub-task per release. The first release is the smallest usable version, with written acceptance criteria.
- Each run ends by handing back for review. Per the task execution docs, those hand-offs surface in Task Chats.
- The reviewer steers with a comment that @mentions the Agent, or continues in the task’s chat. A plain comment doesn’t start a run.
- Each Agent has a per-Task run timeout, so a multi-day job becomes several bounded runs on one record instead of one long process nobody checks.
We haven’t tested the plugin inside a Sharkly-dispatched Codex Runtime. Its workbench is a separate local surface, so if you use both, decide which one holds the review record. A million-token run is a review problem before it’s a speed win.
What to route to Qwen4-Max, and what to keep elsewhere
Give it: Tasks that read a lot to change a little, cross-module changes in a large repository, long runs split into staged releases, and bugs where a screenshot or screen recording helps, since it takes image and video input.
Keep elsewhere: quick edits where a fast model finishes first, as in our Gemini 4 Hydrogen guide, and review. A reviewer from another provider doesn’t share the worker’s blind spots, which is the case we made for mixed-model Crews.
Write the routing rule down, as in matching models to tasks, so the next person routes the same way. The Gemini 4 Carbon post covers keeping that rule stable while models change underneath it.
Keep the board, swap the model
Next month another flagship will post another price cut. Keep assignment, context, progress, results and review in one place, and Qwen4-Max becomes a value on one Agent instead of a migration. Agents research, execute, test and report. People set direction and accept the result.
Your next step: put Qwen4-Max on one Agent, give it one long Task from this week’s backlog split into two releases, and review both. Sharkly is free to start, and you bring your own coding agents and your own QwenCloud key. Set up your first Agent at sharkly.ai.
FAQ
What is the Qwen4-Max model ID?
qwen4-max for the general release. The preview remains a separate model, qwen4-max-preview, with its own Token Plan benefits.
How much does Qwen4-Max cost?
In Singapore, $1.50 per million input tokens, $4.50 output and $0.075 cached input. Beijing and Global regions charge $1.413, $4.24 and $0.071.
Is there a free tier for Qwen4-Max?
Singapore pay-as-you-go accounts get 1 million free tokens for real-time calls, valid for 90 days, after you add payment details. Other regions bill from the first token.
Does Qwen4-Max work with Claude Code and Codex?
Yes. Alibaba publishes setup guides for Claude Code, Codex and OpenCode, using the Anthropic-compatible and OpenAI-compatible endpoints.
Does the Live Delivery plugin work with Claude Code?
Not at launch. Version 0.1.0 supports Codex CLI only, and wider harness support is on its to-do list.
Is Qwen4-Max open source?
Alibaba says smaller Qwen4 models are coming to open source, with no names or dates. The launch post doesn’t announce open weights for Qwen4-Max.



