Qwen3.8-Max for Coding: Cost, Benchmarks, and Setup
Evaluate Qwen3.8-Max pricing, benchmarks and tool setup, and distinguish the hosted API model from the Qwen3.8-2.4T-A95B open weights.
Contents
Qwen released the stable Qwen3.8-Max on August 3, 2026 with the hosted model ID qwen3.8-max. On August 13, Qwen also released the Qwen3.8-2.4T-A95B weights. These names belong to different deployment paths: use the first in a provider’s API model field and the second when preparing self-hosted inference.
Want to test the hosted model without operating GPU infrastructure? On August 13, 2026, the BetterToken model catalog listed qwen3.8-max at $1.84 per million input tokens and $5.52 per million output tokens. Create your own API key, run one fixed task, and verify the model and usage in Workspace. Recheck the catalog before production because availability and prices can change.
Stable release versus preview
The official Qwen repository now contains the post-trained weights and configuration. It describes 2.4 trillion total parameters, 95 billion active parameters, a native 262,144-token context, and extension up to 1,010,000 tokens. The artifacts are compatible with vLLM, SGLang, and TokenSpeed.
The hosted qwen3.8-max service is based on those weights, but Qwen separately lists vision input, non-thinking mode, built-in tools, and a default one-million-token context for the hosted service. Do not put Qwen3.8-2.4T-A95B into an API request that expects qwen3.8-max, and do not assume self-hosted inference has the same feature contract.
| Deployment | Name to use | Where it belongs | Main trade-off |
|---|---|---|---|
| Hosted API | qwen3.8-max | API provider model field | Managed inference and hosted features |
| Self-hosted inference | Qwen3.8-2.4T-A95B | Model repository and inference engine | Infrastructure control and operations work |
| Old preview | qwen3.8-max-preview | Do not use for a new stable setup | Historical API contract |
When migrating from qwen3.8-max-preview, update the model ID, verify the key type and region, and send a minimal request. A model-name change without matching the regional endpoint can produce authentication or model-not-found errors that say nothing about coding quality.
Decide whether self-hosting is realistic
The weights are available, but this is a server-scale deployment rather than a normal workstation download. MoE activates 95 billion parameters per step, while storage, loading, sharding, KV cache, precision, quantization, and inference-engine overhead all affect the real memory requirement. Active parameters alone are not a hardware calculator.
Choose the engine, precision, context length, throughput target, and quantization first; then size hardware from that engine’s current guide. A hosted API usually has lower setup cost for a short coding evaluation. Self-hosting becomes relevant when the team is prepared to operate sharding, upgrades, monitoring, and capacity.
The weights use the separate Qwen3.8-Max License, not Apache 2.0. It permits broad use and modification but adds conditions for large commercial products, Model as a Service, and AI Work Assistant businesses. Review the full license for your deployment.
Calculate the regional API price
Alibaba Model Studio publishes pay-as-you-go prices by region. The current pricing table lists CNY 12 input and CNY 36 output per million tokens for Beijing and global deployments. Singapore lists CNY 14.988 input and CNY 44.965 output.
For 200,000 input tokens and 20,000 output tokens, the Beijing/global calculation is:
0.2 × 12 + 0.02 × 36 = CNY 3.12.
The Singapore calculation is CNY 3.8969. Keep the source currency. Do not mix a Token Plan, a subscription quota, or a third-party gateway price into the same pay-as-you-go row without a shared denominator.
Read the benchmark footnotes
Qwen reports 86.6 on Terminal-Bench 2.1, 67.7 on SWE-bench Pro, 56.6 on DeepSWE 1.1, 73.5 on FrontierSWE, and 93.0 on PaperBench. These are vendor-reported scores. The release notes describe different harnesses, token budgets, timeouts, and competitor result sources across the table.
Use each benchmark only for the capability it measures. A PaperBench score does not predict the outcome of a repository issue, and a small leaderboard difference does not reveal tool-call errors, latency, or manual correction cost.
Configure Qwen Code
In the Model Studio console, select the intended region, open the API-KEY page, and create a normal pay-as-you-go key for that region. A Token Plan key is created in a separate section and is not interchangeable with the pay-as-you-go endpoint. Copy a new key when it is shown and store it in an environment variable:
export DASHSCOPE_API_KEY="YOUR_API_KEY"
Qwen Code supports modelProviders with an OpenAI-compatible endpoint. Put a global profile in ~/.qwen/settings.json, or use .qwen/settings.json in a repository root when the profile should apply only to that project. Reference the environment-variable name in JSON rather than the key itself:
{
"modelProviders": {
"openai": [
{
"id": "qwen3.8-max",
"name": "Qwen3.8-Max",
"baseUrl": "https://dashscope-us.aliyuncs.com/compatible-mode/v1",
"envKey": "DASHSCOPE_API_KEY"
}
]
}
}
Use a key from the same region as the endpoint. A project settings file overrides the user file, so check both if Qwen Code selects an unexpected model. The provider configuration guide treats nested provider configuration as an atomic value, so back up the file and review the diff before replacing an existing profile.
- Create the regional pay-as-you-go key, export
DASHSCOPE_API_KEY, and add the provider entry to the chosen settings file. - Restart Qwen Code, select
qwen3.8-max, run one read-only file task, and verify the effective model before permitting changes.
Configure Claude Code
Model Studio also documents Anthropic-compatible endpoints. For the US region, the minimal environment is:
export ANTHROPIC_BASE_URL="https://dashscope-us.aliyuncs.com/apps/anthropic"
export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"
export ANTHROPIC_MODEL="qwen3.8-max"
Restart Claude Code and run a harmless read-only task. Confirm the model, one tool call, and usage. Protocol compatibility does not make Qwen an Anthropic model or guarantee identical agent behavior.
Check failures at the correct layer
Qwen Code issue #7332 concerned the preview model and an enable_thinking=false request; it should not be generalized to the stable API. Other reports describe relative-path behavior in an Anthropic-compatible setup and an image attachment not reaching the VS Code companion. Treat each as a versioned reproduction, then separate four layers: API authentication, thinking/tools serialization, harness path or attachment handling, and the model’s final instruction following.
Run three fixed repository tasks with the same commit, tools, timeout, and pass criteria. Record reasoning mode, input and output tokens, tool errors, tests, and manual corrections. That measures the cost of an accepted change rather than the cost of a token in isolation.