Skip to main content
Getting Started

Latest model: Qwen3.8-Flash

Learn about the Qwen3.8-Flash model — its next-gen architecture, capabilities, specs, and how to get started

Qwen3.8-Flash features a next-generation architecture (an early preview of Qwen4) with 125B total parameters and only 6B activated per token. Trained at less than 1/9 the cost of Qwen3.7-Plus, it delivers frontier performance surpassing Claude Opus 4.6 in coding and office tasks. Natively supports 1M context, multimodal understanding of text, images, and video, and excels in agentic coding, long-horizon office automation, and multimodal understanding. Model ID: qwen3.8-flash

Highlights

Next-gen architecture — Systematic upgrades along attention, residual, embedding, and optimization: GDN + QSA hybrid attention efficiently "remembers" and precisely "retrieves," achieving 7.6x speedup at 1M-token prefill; Gated Residual expands the information stream into 4 parallel branches; N-gram Embedding adds 51B parameters at near-zero extra compute; the Muon optimizer further improves convergence. Agentic coding — SWE-bench Pro 62.5 (surpassing Claude Opus 4.6's 53.4), DeepSWE 1.1 at 58.7, SWE-bench Multilingual 81.0. Can autonomously build and iterate coding tools, independently completing real multi-day projects. Office and tool use — CoWorkBench 73.9 (long-horizon office automation), JobBench 55.7 (professional tasks), Toolathlon 73.5 (real-world tool use). Covers hundreds of professional scenarios across legal, finance, and design, continuously planning and iterating through closed feedback loops over thousands of interactions. Multimodal agent — AndroidWorld 84.5 (mobile use), MathVision 95.7 (visual math), LVBench 76.6 (long video understanding). Native visual understanding runs through the full plan-execute-verify flow, cross-page understanding of long documents and autonomously catching interface issues. For full 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 Marketplace.

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-flash",
  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-Flash 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-flash, 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-Flash 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-Flash and many other models, more cost-effective than pay-as-you-go billing.