Skip to main content
Getting Started

Latest model: Qwen3.8-Max

Learn about the Qwen flagship model Qwen3.8-Max — its capabilities, specs, and how to get started

Qwen3.8-Max is a 2.4-trillion-parameter MoE flagship delivering a comprehensive leap in coding and professional work. Autonomously codes and delivers complete projects spanning 10+ days. Handles hundreds of specialized tasks across legal, financial, design, and other professional domains, producing production-grade results end-to-end in a single conversation. Native visual understanding runs through the full cycle of planning, execution, and verification, enabling deep semantic analysis of ultra-long documents and extended video content. In long-horizon tasks, plans autonomously, iterates through closed feedback loops, and continuously evolves. Model ID: qwen3.8-max

Highlights

Coding — From an empty repository, it independently completes real multi-day projects: it can set up and iterate on a self-evolving coding harness, and independently reproduce academic papers and improve upon them. Office assistant — Covers hundreds of professional scenarios including legal, finance, UI design, and healthcare. It can read through large volumes of documents in a single pass for compliance review, or dispatch multiple sub-agents from a one-line request to run quantitative backtests, delivering production-grade results end-to-end in a single conversation. Long-horizon tasks — It continuously plans and iterates in a closed loop across thousands of interactions rather than sticking to a fixed strategy. It refactors chip logic from scratch and passes verification, and in long-running e-commerce simulation it significantly outperforms the previous flagship. Multimodal agent — Native vision understanding runs through the entire plan-execute-verify flow: cross-page understanding of long financial reports, organizing long videos into searchable memory, and autonomously catching and fixing interface and visual issues during execution. For full cases and evaluation data, see the release blog.

Capabilities and specs

ParameterValueParameterValue
Context length1,000,000 tokensMax thinking tokens262,144 tokens
Max input length991,808 tokensMax output length131,072 tokens
Max input length (thinking mode)983,616 tokensMax output length (thinking mode)131,072 tokens
For pricing details, see the model gallery.

Quick start

import os
from openai import OpenAI

client = OpenAI(
  api_key=os.getenv("DASHSCOPE_API_KEY"),
  base_url="https://dashscope-intl.aliyuncs.com/compatible-mode/v1"
)

response = client.chat.completions.create(
  model="qwen3.8-max",
  messages=[
    {"role": "user", "content": "Solve the longest increasing subsequence problem using dynamic programming, and analyze the time complexity."}
  ]
)
print(response.choices[0].message.content)

Usage

Thinking

Thinking mode is enabled by default. Use reasoning_effort to control reasoning intensity:
ValueDescriptionBest for
xhigh (default)Maximum reasoning depthMath proofs, architecture design, complex coding
mediumBalance reasoning and speedEveryday development, doc generation
lowFast responseSimple Q&A, information extraction
max and high are automatically mapped to xhigh. In thinking mode, temperature defaults to 0.6; smaller values are automatically adjusted to 0.6. To disable thinking entirely, set enable_thinking=false — the model answers directly and no longer returns reasoning_content.

Multimodal understanding

Qwen3.8-Max understands images, videos, and text jointly, suited to agent scenarios where visual information informs decisions.
  • Image understanding: pass image_url content and the model analyzes the image directly. Supports screenshot analysis, design restoration, document OCR, and more. High-resolution images are compressed by default; use vl_high_resolution_images and max_pixels to raise the visual token budget and preserve more detail.
  • Video understanding: pass a video URL and the model auto-extracts frames for analysis. Use fps to control frame rate, balancing detail capture and cost. Suited to content moderation, tutorial summaries, meeting notes, and more.
See Image and video understanding for details.

Function calling and thinking

When thinking is enabled during function calling, the model first reasons about which tools to call and how to use returned results, then generates the answer; the response includes reasoning_content before each tool call. In multi-turn tool calling, pass reasoning_content back together with the rest — omitting it reduces accuracy. In multi-turn conversations, the model does not read reasoning_content from history by default; preserve_thinking is enabled by default for qwen3.8-max, appending the reasoning to the next input. See Thinking and Function calling for the full rules.

Context cache

Context cache caches the common prefix of overlapping requests, avoiding redundant computation to lower cost and speed up responses without affecting answer quality:
ModeDescription
Implicit cacheAutomatic; the system identifies and caches common prefixes, but hits are not guaranteed
Explicit cacheManually created; guaranteed hit and lower latency
Session cacheResponses API only; add x-dashscope-session-cache: enable to the request header
See Context cache for usage and billing details.

Use in coding tools

To use Qwen3.8-Max in coding tools such as Claude Code, Codex, and OpenCode, we recommend subscribing to Token Plan — a single Credits-based subscription that supports Qwen3.8-Max and many other models, more cost-effective than pay-as-you-go billing.