Qwen3.8-Max for Coding: Pricing, Benchmarks, and Tool Setup

Review Qwen3.8-Max API pricing and benchmarks, configure Qwen Code and Claude Code, and distinguish the hosted Model ID from open weights.

The stable Qwen3.8-Max release arrived 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. The names refer to different deployment paths: use the first in an API provider's model field and the second for self-hosted inference.

Need to test the hosted model without running your own GPU infrastructure? On August 13, the BetterToken catalog listed qwen3.8-max at 1.84permillioninputTokensand1.84 per million input Tokens and 5.52 per million output Tokens. Create your own API Key, run a short request, and verify the Model ID and Token usage in Workspace. This price is a dated snapshot, so check the catalog again before production use.

What changed after preview

The official Qwen repository has already published the weights and configuration of the post-trained model Qwen3.8-2.4T-A95B: 2.4 trillion parameters in total, 95 billion active, 262,144 native context Tokens with the ability to expand to 1,010,000. The repository is compatible with vLLM, SGLang and TokenSpeed.

The hosted model qwen3.8-max is based on these scales, but Qwen separately specifies vision input, non-thinking, an official set of tools and a default context of 1 million Tokens for it. Therefore, you cannot insert Qwen3.8-2.4T-A95B into the API configuration instead of qwen3.8-max or consider the local inference completely identical to the hosted API.

What do you chooseNameWhere to point itWhat do you get
Hosted APIqwen3.8-maxModel ID field in the API provider directoryManaged inference and additional hosted capabilities
Own inferenceQwen3.8-2.4T-A95BInference engine repository and configurationWeights under Qwen3.8-Max License and control over your infrastructure
Old previewqwen3.8-max-previewDo not use for new stable configurationHistorical API variant with a different contract

Preview was found in Token Plan and early configurations as qwen3.8-max-preview. It was subject to thinking restrictions that were not included in the stable contract. The most practical migration is to replace the Model ID, check the key type and endpoint, then re-run the minimal query. Simply changing the model string without checking the region can result in 401, 404 or no model.

Is it possible to run open weights locally

Yes: the repository contains weights and configuration for self-hosted inference. In practice, this is a server deployment rather than a model you load onto an ordinary workstation GPU. The MoE activates 95 billion parameters at each step, but you must store, distribute, and load far more data, plus the KV cache and memory required by precision, quantization, and the inference engine.

Don't size your equipment based on the number of active parameters alone. First select the engine, precision, context length and speed allowance, then check its hardware guide and make a separate memory estimate. For a one-time coding test, a hosted API usually requires less preparation; the local option makes sense when the team is ready to handle sharding, updates, and monitoring.

Libra has a separate Qwen3.8-Max License and not Apache 2.0. It permits use and modification, but contains additional terms for major commercial products, Model as a Service, and AI Work Assistant. Before public or commercial deployment, please review the full license for your scenario.

How much does Qwen3.8-Max cost?

Alibaba Model Studio publishes prices by region. They must be counted in the original currency, without passing off the conversion as an official tariff.

  • Beijing / Global: CNY 12 per 1 million input and CNY 36 per 1 million output Token.
  • Singapore: CNY 14.988 per 1 million input and CNY 44.965 per 1 million output Token.

For 200,000 input and 20,000 output Tokens, Beijing's calculation is:

0.2 × 12 + 0.02 × 36 = CNY 3.12.

For Singapore the same volume is CNY 3.8969. This is a pay-as-you-go calculation by Model Studio. Token Plan, subscription, and third-party gateway have a different billing unit and should not appear on the same comparison line.

With the BetterToken card the same amount costs:

0.2 × $1.84 + 0.02 × $5.52 = $0.4784.

Here you cannot compare the total numbers directly: one table is in CNY, the other in USD, and the cache and access conditions are different. The useful conclusion is different - first a specific provider and region are selected, then the same Token profile is calculated for it.

How to read the official benchmark table

The Qwen release shows the following coding results:

  • Terminal-Bench 2.1: 86.6.
  • SWE-bench Pro: 67.7.
  • DeepSWE 1.1: 56.6.
  • FrontierSWE: 73.5.
  • PaperBench: 93.0.
  • QwenSWEBench: 80.7.

This is vendor-reported data. For Terminal-Bench 2.1, Qwen specifies Claude Code, avg@10, five-hour timeout and max_tokens=131072. For SWE-bench Pro, Claude Code, temperature=1.0, top_p=0.95 and context 256K are specified; a separate timeout is not stated in this footnote. For competitors, a number of rows used their best published result. Some of the sets belong to Qwen and have no external reproduction.

A single rating cannot be derived from this. For example, 93.0 on PaperBench does not mean that the model is automatically better on the issue fix in the real repository. First look at what ability the test measures, then at the harness, effort, number of attempts and method of assessment.

What one independent test showed

Trilogy AI compared Qwen preview and Kimi K3 on the same architectural analysis task: a frozen repository of 269 files, the same time limit and the same result type. The result of StackPerf is 80 versus 83 in favor of Kimi. Qwen made 44 tool calls without an error, and Kimi made 53 with two failures recovered.

This is a useful process photograph, but only one run of one job. It shows that a small gap in scores can be accompanied by different behavior of tools. It does not prove that one model is stronger in all coding scenarios.

Where Qwen3.8-Max fits in

The model should be included in the test if the task requires:

  • go through a large number of files and collect an architectural picture;
  • execute a multi-step plan with tools;
  • work with text, images or documents in the same context;
  • prepare diff and check several readiness conditions;
  • keep business rules together with code for a long time.

For small edits, it is reasonable to compare low and higher reasoning. If the quality improvement doesn't pay for the latency and Token output, heavy mode shouldn't be the default.

Setting up Qwen Code

First, in the Model Studio console, select a region, open the API-KEY page and create a regular pay-as-you-go key for that region. The Token Plan key is created in a separate section and is not interchangeable with the pay-as-you-go endpoint. Copy the new key immediately after creation and save it in an environment variable:

export DASHSCOPE_API_KEY="YOUR_API_KEY"

Qwen Code supports modelProviders and OpenAI-compatible provider. To configure in all projects, open ~/.qwen/settings.json; For just one repository, use .qwen/settings.json in its root. In JSON, specify the variable name, not 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" } ] } }

The Endpoint above refers to the US region and is given as an official example. For Beijing, Singapore, Tokyo or Frankfurt, take the address from the Model Studio table and use the same region key. The project file overlaps the user file, so if there is an unexpected model, check both levels.

In the Qwen Code documentation, the provider configuration is described as atomic: nested generationConfig and other fields are replaced entirely, rather than merging one key at a time. Before changing, save the existing provider records and check the diff so as not to delete the working setting of another model.

Save the file, restart Qwen Code, select qwen3.8-max, issue a read request for one file and check the model name in the response or metadata. Only then allow changes.

Setting up Claude Code

Model Studio provides an Anthropic-compatible endpoint. For the US region, a minimal example looks like this:

export ANTHROPIC_BASE_URL="https://dashscope-us.aliyuncs.com/apps/anthropic" export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY" export ANTHROPIC_MODEL="qwen3.8-max"

For another region, replace the Base URL with the official regional address and use the appropriate key. After restart, give a short task without changing files and check the actual Model ID. Do not mix Token Plan key with pay-as-you-go endpoint.

Anthropic-compatible means that the protocol is compatible, not that Qwen becomes an Anthropic model or gets identical behavior to Claude Code. You need to check tool call, file recording, error recovery and usage.

What errors have already been reproduced

Issue Qwen Code #7332 refers to preview: the internal request sent enable_thinking=false to the model, which then only accepted thinking, and received 400. This signal is useful for migration, but does not describe the current stable API.

In Qwen3 issue #1883, the user Anthropic-compatible endpoint reported that the agent tried to write the relative path directly to /tmp; the absolute path became the bypass. In Qwen Code issue #7489, VS Code Companion inserted a link to the image name, but did not transfer the image itself. Both cases depend on the version of the client and the harness.

When analyzing such problems, separate four layers:

  1. The API accepted the Model ID and key.
  2. The client correctly passed thinking and tools.
  3. Harness resolved the path and attachment correctly.
  4. The model followed the instructions.

If you immediately call everything a “model error,” it will be difficult to correct the configuration.

How to test the model on your task

Take three repositories or three issues of different types. Freeze commit, tools, time limit and PASS criteria. For each run, save:

  • reasoning mode;
  • input and output Token;
  • time until the first useful change;
  • number of tool calls and errors;
  • test results;
  • number of manual corrections.

This test is more useful than a general leaderboard. It will show not only the ability to write code, but also the price of the completed task - this is what the team pays.

Ready to optimize your LLM workflow?

Join thousands of developers building faster, smarter, and more cost-effective AI applications with BetterToken.