Qwen3.7 Max
Alibaba's closed, large-context reasoning model with tool calling. Its standout result is software repair on SWE-bench Verified, near the top of the tested models.
Spec sheet
- Family
- Qwen
- Released
- 21 May 20266 months ago
- Weights
- Closed
- Context window
- 1M tokens
- Largest response
- 131k tokens
- Accepts
- text
- Supports
- tools, reasoning, structured output
- Knowledge cutoff
- –
- Intelligence index
- 65.9#36
- Input price
- $1.48 / 1M
- Output price
- $4.42 / 1M
- Blended price (3:1)
- $2.21 / 1M
- Index points per $
- 29.8#66
- Speed
- 72 tokens/sec#82
- Popularity
- #141 of 194by usage
- Providers
- 3
Benchmarks
Score · rank among models testedThe tick on each bar marks the registry median; hover over a bar for the numbers. Sources and how the index is computed: methodology.
Providers and prices
$ per 1M tokens · from genai-prices| Provider | Gateway | Pydantic AI model string | Input | Cached input | Output | Blended |
|---|---|---|---|---|---|---|
| Novita | BYOK | – | $1.25 | $0.25 | $3.75 | $1.88 |
| OpenRouter | BYOK | openrouter:qwen/qwen3.7-max | $1.48 | $0.29 | $4.42 | $2.21 |
| Together AI | BYOK | together:Qwen/Qwen3.7-Max | $2.5 | $0.5 | $7.5 | $3.75 |
The cheapest provider is highlighted. Blended price assumes three input tokens for each output token.
Example code
# /// script # dependencies = ["pydantic-ai"] # /// import os from pydantic_ai import Agent os.environ['OPENROUTER_API_KEY'] = '...' agent = Agent('openrouter:qwen/qwen3.7-max', instructions='Be concise, reply with one sentence.') result = agent.run_sync('Where does "hello world" come from?') print(result.output)
# /// script # dependencies = ["pydantic-ai"] # /// import os from pydantic import BaseModel from pydantic_ai import Agent os.environ['OPENROUTER_API_KEY'] = '...' class CityLocation(BaseModel): city: str country: str agent = Agent('openrouter:qwen/qwen3.7-max', output_type=CityLocation) result = agent.run_sync('Where were the olympics held in 2012?') print(result.output) #> city='London' country='United Kingdom'
# /// script # dependencies = ["pydantic-ai"] # /// import os import random from pydantic_ai import Agent, RunContext os.environ['OPENROUTER_API_KEY'] = '...' agent = Agent( 'openrouter:qwen/qwen3.7-max', deps_type=str, instructions="You're a dice game, roll the die and see if it matches the user's guess.", ) @agent.tool_plain def roll_dice() -> str: """Roll a six-sided die and return the result.""" return str(random.randint(1, 6)) @agent.tool def get_player_name(ctx: RunContext[str]) -> str: """Get the player's name.""" return ctx.deps result = agent.run_sync('My guess is 4', deps='Anne') print(result.output)
# /// script # dependencies = ["pydantic-ai"] # /// import asyncio import os from pydantic_ai import Agent os.environ['OPENROUTER_API_KEY'] = '...' agent = Agent('openrouter:qwen/qwen3.7-max') async def main(): async with agent.run_stream('Explain prompt caching in three bullet points.') as response: async for text in response.stream_text(delta=True): print(text, end='', flush=True) asyncio.run(main())
export OPENROUTER_API_KEY='...' uvx pax --model 'openrouter:qwen/qwen3.7-max'
# npm install -g @earendil-works/pi-coding-agent export OPENROUTER_API_KEY='...' pi --model 'openrouter/qwen/qwen3.7-max'
# npm install -g @openai/codex export OPENROUTER_API_KEY='...' codex --model 'qwen/qwen3.7-max' \ -c model_provider='openrouter' \ -c model_providers.openrouter.name='Novita' \ -c model_providers.openrouter.base_url='https://api.openrouter.example/v1' \ -c model_providers.openrouter.env_key='OPENROUTER_API_KEY'
// npm install ai @ai-sdk/openai-compatible import { createOpenAICompatible } from '@ai-sdk/openai-compatible' import { generateText } from 'ai' process.env.OPENROUTER_API_KEY = '...' const openrouter = createOpenAICompatible({ name: 'openrouter', baseURL: 'https://api.openrouter.example/v1', apiKey: process.env.OPENROUTER_API_KEY, }) const { text } = await generateText({ model: openrouter('qwen/qwen3.7-max'), system: 'Be concise, reply with one sentence.', prompt: 'Where does "hello world" come from?', }) console.log(text)
Ask Qwen3.7 Max a question with a Pydantic AI agent and print the answer. Run it with uv run hello.py.
Get validated, typed output from Qwen3.7 Max by giving the agent a Pydantic model. Run it with uv run structured_output.py.
Give Qwen3.7 Max two tools to call, one of which reads the agent's dependencies. Run it with uv run tools.py.
Stream Qwen3.7 Max's reply to the terminal as it is generated. Run it with uv run streaming.py.
Chat with Qwen3.7 Max in your terminal using pax, the TUI for pydantic-ai-harness. Coming soon.
Use Qwen3.7 Max as the model behind the pi coding agent, with your own Novita key.
Run OpenAI's Codex CLI on Qwen3.7 Max, which Novita serves over an OpenAI-compatible API.
Call Qwen3.7 Max from TypeScript with the Vercel AI SDK.
Compare
Score against blended price per 1M tokens (log scale). Qwen3.7 Max GLM 5.3 Flash other models
About Qwen3.7 Max
Description written by an LLM from the data on this pageAlibaba's closed, large-context reasoning model with tool calling. Its standout result is software repair on SWE-bench Verified, near the top of the tested models.
Qwen3.7 Max is a closed-weight model from Alibaba, released May 2026, and it accepts text input only. It offers a 1M token context window, responses up to 131k tokens, reasoning mode, tool calling and structured output. It is available through Novita, OpenRouter and Together AI.
Its overall intelligence index of 65.9 sits above the registry median of 59.5, and its SWE-bench Verified score of 77.3% ranks sixth of 23 tested. Results elsewhere are mostly close to the median: GPQA Diamond at 90.9%, OTIS Mock AIME at 95.6% and FrontierMath at 64.6% are all within about a point or two of it, while SciCode at 49.5% is slightly below. Its blended price of $2.21 per million tokens is well above the median of $1.01, so cost is the main trade-off.
Strengths
- SWE-bench Verified 77.3%, 6th of 23 tested
- Intelligence index 65.9, 37th of 114 and above the median
- SimpleQA Verified 55.8%, 27th of 76, well above the median
- 1M token context window with responses up to 131k tokens
Weaknesses
- Blended price of $2.21 per million tokens, above the registry median
- SciCode 49.5%, 54th of 96, slightly below the median
- Accepts text input only
Best for
Coding agents and long-document tasks that need a 1M context window and tool calling.