AI model comparison

Claude Sonnet 5 vs GLM 5.2

Compare benchmark results, pricing, and API capabilities for each model. Estimate the cost of your own token mix.

Change models
Loading the catalog…
Markdown
Context tokens
1M
Input / 1M
$2.00
Output / 1M
$10.00
Context tokens
1.05M
Input / 1M
$0.62
Output / 1M
$2.42
Benchmark snapshot
Code Completion
Claude Sonnet 5GLM 5.2
78.261%
80.435%

Percent score · Result source · Test method

Catalog checked Nov 27, 202623 shared benchmark resultsRead the methodology

The trade-offs

Start with the differences that affect how this model fits your workload.

Benchmark results
Claude Sonnet 5 and GLM 5.2 scored 78.261% and 80.435%, respectively, on Code Completion. Use the test setup below to check whether it matches your workload.
Token cost
For 1 million input tokens and 250,000 output tokens, the listed rates estimate $4.50 for Claude Sonnet 5 and $1.225 for GLM 5.2.
Context window
GLM 5.2 lists 1,048,576 tokens of context. Claude Sonnet 5 lists 1,000,000 tokens. Reserve space for the output before routing long inputs.

Benchmarks

Shared results come from the same published benchmark release. Reasoning effort and serving configuration can differ.

Shared benchmark profilePercentage scores from the first eight shared groups, sorted by the page evidence order.

Source Result source · Test method

Claude Sonnet 5GLM 5.2

Code Completion

Coding · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

78.261%
80.435%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2

Code Generation

Coding · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

83.099%
78.873%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2

Javascript

Agentic Coding · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

68.182%
63.636%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2

Python

Agentic Coding · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

60%
55%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2

Typescript

Agentic Coding · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

50%
36.667%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2

Amps Hard

Mathematics · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

98%
98%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2

Connections

Language · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

95.5%
94%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2

Consecutive Events

Data Analysis · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

74.741%
79.276%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2
Show 15 more shared results

Integrals With Game

Mathematics · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

88%
76%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2

Logic With Navigation

Reasoning · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

86%
80%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2

Math Comp

Mathematics · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

95.098%
96.078%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2

Olympiad

Mathematics · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

90.671%
89.047%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2

Paraphrase

IF · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

61.25%
62.25%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2

Plot Unscrambling

Language · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

53.411%
60.725%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2

Simplify

IF · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

60.65%
55.667%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2

Spatial

Reasoning · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

100%
94%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2

Story Generation

IF · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

62.317%
62.883%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2

Summarize

IF · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

71.217%
68.367%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2

Tablejoin

Data Analysis · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

42.442%
45.865%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2

Tablereformat

Data Analysis · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

98.039%
96.078%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2

Theory Of Mind

Reasoning · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

80.769%
75%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2

Typos

Language · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

76%
74%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2

Zebra Puzzle

Reasoning · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method

88%
65.5%
Test configurations
Claude Sonnet 5
claude-sonnet-5-xhigh-effort
GLM 5.2
glm-5.2
View individual benchmark records

These model-level records can include other benchmark releases, test configurations, and vendor-reported results.

Claude Sonnet 5

BenchmarkScoreConfigurationSource model labelEvidence
Long Agentic39%claude-sonnet-5 · Suite release Oct 14, 2026 · run date unavailableclaude-sonnet-5Result source · Test method
Reasoning88.7%claude-sonnet-5 · Suite release Oct 14, 2026 · run date unavailableclaude-sonnet-5Result source · Test method
Coding74.7%claude-sonnet-5 · Suite release Oct 14, 2026 · run date unavailableclaude-sonnet-5Result source · Test method
Browser72%claude-sonnet-5 · Suite release Oct 14, 2026 · run date unavailableclaude-sonnet-5Result source · Test method
Data Analysis71.7%claude-sonnet-5 · Suite release Oct 14, 2026 · run date unavailableclaude-sonnet-5Result source · Test method
Research82.8%claude-sonnet-5 · Suite release Oct 14, 2026 · run date unavailableclaude-sonnet-5Result source · Test method
Design82%claude-sonnet-5 · Suite release Oct 14, 2026 · run date unavailableclaude-sonnet-5Result source · Test method

GLM 5.2

No additional benchmark results are available for this model ID.

Pricing and token cost

Listed OpenRouter prices in US dollars. Actual charges depend on the endpoint, tier, cache, and token mix.

USD per million tokensClaude Sonnet 5GLM 5.2
Uncached input$2.00$0.62
Output$10.00$2.42
Cache read$0.20$0.14
Cache write$2.50Unavailable

Rates are a catalog snapshot. OpenRouter Models API

Estimate your workload

Enter total token counts. The estimate uses uncached input and output rates.

Claude Sonnet 5$4.50
GLM 5.2$1.225

GLM 5.2 costs $3.275 less at this token mix.

Model specifications

Context, output limits, modalities, and supported API parameters from the catalog.

SpecificationClaude Sonnet 5GLM 5.2
Catalog statusListedListed
Catalog model IDanthropic/claude-sonnet-5z-ai/glm-5.2
ProviderAnthropicZ.ai
Context window1,000,000 tokens1,048,576 tokens
Max output128,000 tokens943,718 tokens
Input modalitiesText, Image, FileText
Output modalitiesTextText
Reasoning controlsListedListed
Tool callingListedListed
Structured outputsListedListed
Serving endpoints/api/v1/chat/completions, /api/v1/completions, /api/v1/messages, /api/v1/responses/api/v1/chat/completions, /api/v1/completions, /api/v1/messages, /api/v1/responses
Catalog listing dateJun 30, 2026Jun 16, 2026

Use with Weave Router

Set a quality bar on your own coding tasks. Then compare cost per completed task and use the same harness when you change models.

Claude Sonnet 5

Listed in the public Router catalog.

claude-sonnet-5

GLM 5.2

Weave Router availability is unverified for this model ID.

Catalog presence does not guarantee availability for a specific plan or account. Public Weave Router catalog · Nov 27, 2026

Explore Weave Router Read Weave Router benchmark results

Sources

Each benchmark links to its own result and test method when available.

MarkdownFull methodology