Qwen3.8-Max 发布,主打编码与协作能力
Qwen3.8-Max: A New Bar for Coding and Cowork
Qwen 发布 Qwen3.8-Max,官方称其在编码与协作场景树立新标杆,模型名为 qwen3.8-max。该模型支持 enable_thinking 与 xhigh、medium、low 三档 reasoning_effort,上下文窗口为 1000000,并支持并行工具调用与文本、图像输入。官方同时给出 Claude Code、Codex、Qoder CLI、Qwen Code、OpenClaw 等编码助手的接入配置,其中 Qwen API 兼容 Anthropic API 协议与 OpenAI Responses 协议。
正文
当前显示原文,中文全文译文尚未就绪。
api_key = os . environ . get ( "DASHSCOPE_API_KEY" ) if not api_key : raise ValueError ( "DASHSCOPE_API_KEY is required. " "Set it via: export DASHSCOPE_API_KEY='your-api-key'" )
client = OpenAI ( api_key = api_key , base_url = os . environ . get ( "DASHSCOPE_BASE_URL" , "https://dashscope-intl.aliyuncs.com/compatible-mode/v1" , ), )
messages = [{ "role" : "user" , "content" : "Write a Python function to merge two sorted linked lists." }]
completion = client . chat . completions . create ( model = "qwen3.8-max" , messages = messages , extra_body = { "enable_thinking" : True , # "preserve_thinking": True, }, reasoning_effort = "xhigh" , # supported levels are xhigh, medium, and low stream = True , )
reasoning_content = "" answer_content = "" is_answering = False print ( " \n " + "=" * 20 + "Reasoning" + "=" * 20 + " \n " )
for chunk in completion : if not chunk . choices : print ( " \n Usage:" ) print ( chunk . usage ) continue
delta = chunk . choices [ 0 ] . delta
if hasattr ( delta , "reasoning_content" ) and delta . reasoning_content is not None : if not is_answering : print ( delta . reasoning_content , end = "" , flush = True ) reasoning_content += delta . reasoning_content
if hasattr ( delta , "content" ) and delta . content : if not is_answering : print ( " \n " + "=" * 20 + "Answer" + "=" * 20 + " \n " ) is_answering = True print ( delta . content , end = "" , flush = True ) answer_content += delta . content For more information, please visit the API doc . Coding Assistants # Qwen3.8-Max integrates seamlessly with popular agent frameworks and coding assistants: Claude Code # Qwen APIs support the Anthropic API protocol, enabling direct use with Claude Code : npm install -g @anthropic-ai/claude-code
export ANTHROPIC_MODEL = "qwen3.8-max" export ANTHROPIC_SMALL_FAST_MODEL = "qwen3.8-max" export ANTHROPIC_BASE_URL = https://dashscope-intl.aliyuncs.com/apps/anthropic export ANTHROPIC_AUTH_TOKEN =
claude Codex # Qwen APIs support the OpenAI Responses protocol, enabling use with Codex : In ~/.codex/model-catalog.local.json { "models" : [ { "slug" : "qwen3.8-max" , "display_name" : "qwen3.8-max" , "description" : "Model Studio: Qwen3.8-Max" , "default_reasoning_level" : "xhigh" , "supported_reasoning_levels" : [ { "effort" : "low" , "description" : "Fast responses with lighter reasoning" }, { "effort" : "medium" , "description" : "Greater reasoning depth for complex problems" }, { "effort" : "xhigh" , "description" : "Extra high reasoning depth for complex problems" } ], "context_window" : 1000000 , "effective_context_window_percent" : 95 , "supports_parallel_tool_calls" : true , "supports_image_detail_original" : true , "input_modalities" : [ "text" , "image" ], "shell_type" : "default" , "visibility" : "list" , "supported_in_api" : true , "priority" : 1 , "base_instructions" : "" , "support_verbosity" : false , "supports_reasoning_summaries" : false , "experimental_supported_tools" : [], "truncation_policy" : { "mode" : "bytes" , "limit" : 10000 } } ] } In ~/.codex/config.toml model_catalog_json = "~/.codex/model-catalog.local.json"
model_provider = "ModelStudio" model = "qwen3.8-max"
[ model_providers . ModelStudio ] name = "Model Studio" base_url = "https://dashscope-intl.aliyuncs.com/compatible-mode/v1" env_key = "OPENAI_API_KEY" wire_api = "responses" npm install -g @openai/codex
export OPENAI_API_KEY =
codex Qoder CLI # Qoder co-evolves with Qwen for agentic coding: curl -fsSL https://qoder.com/install | bash
qoder Qwen Code # Qwen Code is deeply optimized for the Qwen series: npm install -g @qwen-code/qwen-code@latest
qwen OpenClaw # Connect to OpenClaw via QwenCloud : curl -fsSL https://molt.bot/install.sh | bash
export DASHSCOPE_API_KEY =