LiteLLMLiteLLM/ MODELS

Grok 4.7 vs Qwen3.8 Max

As of November 23, 2026, Grok 4.7 and Qwen3.8 Max cost the same: $2.00 per 1M input tokens and $6.00 per 1M output tokens. Qwen3.8 Max has the larger context window: 992K tokens versus 500K.

Prices from LiteLLM's price fileChecked

Grok 4.7 vs Qwen3.8 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 November 23, 2026.
Grok 4.7Qwen3.8 Max
Input, per 1M tokens$2.00$2.00
Output, per 1M tokens$6.00$6.00
Cache read, per 1M tokens$0.50$0.25
Cache write, per 1M tokens––
Context window500,000 tokens991,808 tokens
Max output500,000 tokens131,072 tokens
Image inputYesYes
Tool callingYesYes
Structured output (JSON)YesYes
Prompt cachingYesYes
ReasoningYesYes
Providers on LiteLLM1112
Price shown is fromxAIAlibaba Cloud Model Studio
Added to LiteLLMSeptember 21, 2026August 7, 2026

Cheapest provider for each

Benchmark scores

From the Epoch AI Benchmarking Hub (CC BY 4.0), data as of September 22, 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.
BenchmarkGrok 4.7Qwen3.8 Max
Coding and agents
FrontierSWE29.5% (xhigh)15.8% (xhigh)
APEX-Agents70.0%63.3%
Reasoning and knowledge
GPQA Diamond92.7% (xhigh)92.7% (xhigh)
SimpleQA Verified56.0% (xhigh)45.8% (xhigh)
Math
FrontierMath (tiers 1-3)53.0% (xhigh)74.7% (xhigh)
FrontierMath (tier 4)17.1% (xhigh)46.3% (xhigh)
OTIS Mock AIME 2024-202598.1% (xhigh)99.4% (xhigh)

When to pick which

Pick Grok 4.7 for

  • Returns up to 500,000 tokens per response, vs 131,072.

Pick Qwen3.8 Max for

  • Larger context window: 991,808 vs 500,000 tokens.

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

Call Grok 4.7 or Qwen3.8 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!"}]

# Grok 4.7
response = completion(model="xai/grok-4.7", messages=messages)

# Qwen3.8 Max
response = completion(model="dashscope/qwen3.8-max", messages=messages)

# Grok 4.7, falling back to Qwen3.8 Max if the call fails
response = completion(model="xai/grok-4.7", messages=messages, fallbacks=["dashscope/qwen3.8-max"])

FAQ

Which is cheaper, Grok 4.7 or Qwen3.8 Max?

They cost the same: $2.00 per 1M input tokens and $6.00 per 1M output tokens, as of November 23, 2026.

Which has the larger context window, Grok 4.7 or Qwen3.8 Max?

Qwen3.8 Max has the larger context window: 991,808 tokens, versus 500,000 for Grok 4.7.

Can I switch from Grok 4.7 to Qwen3.8 Max without changing my code?

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