LiteLLMLiteLLM/ MODELS

GLM 5.2 vs Qwen4 Max

As of December 6, 2026, Qwen4 Max costs 7% more per input token than GLM 5.2 ($1.50 vs $1.40 per 1M) and has a 992K-token context window versus 1M.

Prices from LiteLLM's price fileChecked

GLM 5.2 vs Qwen4 Max side by side

Headline prices in US dollars per 1M tokens: each model's own lab where it sells it, otherwise its cheapest provider. Source: LiteLLM model price file, as of December 6, 2026.
GLM 5.2Qwen4 Max
Input, per 1M tokens$1.40$1.50
Output, per 1M tokens$4.40$4.50
Cache read, per 1M tokens$0.26$0.075
Cache write, per 1M tokens$0$1.875
Context window1,000,000 tokens991,808 tokens
Max output128,000 tokens131,072 tokens
Image inputYesYes
Tool callingYesYes
Structured output (JSON)YesYes
Prompt cachingYesYes
ReasoningYesYes
Providers on LiteLLM283
Price shown is fromZ.aiAlibaba Cloud Model Studio
Added to LiteLLMJune 2026November 16, 2026

Cheapest provider for each

Benchmark scores

From the Epoch AI Benchmarking Hub (CC BY 4.0), data as of November 20, 2026. Some results were run by Epoch and others collected by Epoch from each benchmark's own leaderboard, linked in the first column. Each model's best reported reasoning setting is shown in brackets. Higher is better. Only benchmarks with a score for both models are shown.
BenchmarkGLM 5.2Qwen4 Max
Coding and agents
APEX-Agents45.2%67.4%
Reasoning and knowledge
GPQA Diamond91.9% (max)94.0% (xhigh)
SimpleQA Verified34.2% (max)54.1% (xhigh)
Math
FrontierMath (tiers 1-3)59.2% (max)78.6% (xhigh)
FrontierMath (tier 4)29.3% (max)53.7% (xhigh)
OTIS Mock AIME 2024-202586.4% (max)100.0% (xhigh)

When to pick which

Pick GLM 5.2 for

  • Costs 7% less per input token: $1.40 vs $1.50 per 1M.
  • Available from 28 providers through LiteLLM, vs 3.

From differences in the data above only; where the data is equal, no reason is given.

Call GLM 5.2 or Qwen4 Max with LiteLLM

Both use the OpenAI format through LiteLLM, so switching is a model name change. Set each provider's API key in the environment first.

Python SDK
from litellm import completion

messages = [{"role": "user", "content": "Hello!"}]

# GLM 5.2
response = completion(model="zai/glm-5.2", messages=messages)

# Qwen4 Max
response = completion(model="dashscope/qwen4-max", messages=messages)

# GLM 5.2, falling back to Qwen4 Max if the call fails
response = completion(model="zai/glm-5.2", messages=messages, fallbacks=["dashscope/qwen4-max"])

FAQ

Which is cheaper, GLM 5.2 or Qwen4 Max?

GLM 5.2 is cheaper at 3 input tokens per output token: $2.15 per 1M tokens blended ($1.40 input, $4.40 output), versus $2.25 ($1.50 and $4.50) for Qwen4 Max, as of December 6, 2026.

Which has the larger context window, GLM 5.2 or Qwen4 Max?

GLM 5.2 has the larger context window: 1,000,000 tokens, versus 991,808 for Qwen4 Max.

Can I switch from GLM 5.2 to Qwen4 Max without changing my code?

Yes. Through LiteLLM both use the OpenAI format, so switching means changing the model name from "zai/glm-5.2" to "dashscope/qwen4-max", or pointing a LiteLLM gateway model alias at the other model. You can also use one as a fallback for the other.