GLM 4.7 vs GPT-5.2-Codex
GLM 4.7 leads GPT-5.2-Codex on coding, 55.1 to 45.4 on the Vibe Coding Index, and GLM 4.7 costs 6.4x less per output token ($2.20 vs $14.00 per million). Updated October 22, 2026; 18 benchmarks have a result for both.
GLM 4.7 or GPT-5.2-Codex: which to pick
Pick GLM 4.7 for coding: it scores 55.1 on the Vibe Coding Index against 45.4 for GPT-5.2-Codex, though on 2 benchmarks against 3.
Pick GPT-5.2-Codex for a larger context window (400K against 205K tokens) and work measured by LiveCodeBench (Vals AI) or SWE-bench Verified (Vals AI), where it leads.
- Shared results
- 18
- GLM 4.7 only
- 63
- GPT-5.2-Codex only
- 4
- Like-for-like categories
- 5 of 9
Only benchmarks that tested both models count toward a pick; a result only one model has is shown but not compared.
Which one for your work
Each card is decided by one number both models carry. Where only one has it, the card says so and makes no call.
Coding
Vibe Coding Index, six public coding benchmarks
GLM 4.7
GLM 4.7 scores 55.1 against 45.4.
2 and 3 benchmarks behind the scores
Intelligence
AA Intelligence Index
GPT-5.2-Codex
GPT-5.2-Codex leads, 28.5 against 22.2.
Same board, both measured
Reasoning
GPQA Diamond
No call
Only GLM 4.7 has a GPQA Diamond result, 80.0%.
Directional only
Math
AIME
No call
Only GLM 4.7 has a AIME result, 93.3%.
Directional only
Knowledge
MMLU Pro
No call
Only GLM 4.7 has a MMLU Pro result, 82.7%.
Directional only
Web design
Design Arena: websites
No call
Only GLM 4.7 has a Design Arena: websites result, 1225.
Directional only
Long documents
Listed context window
GPT-5.2-Codex
GPT-5.2-Codex takes 400K tokens against 205K.
Listed by OpenRouter
Everyday cost
1K input + 500 output tokens
GLM 4.7
GLM 4.7 $0.0017, GPT-5.2-Codex $0.0088 per turn.
List prices
Cost per solved task
One SWE-bench Verified task, solved
GLM 4.7
GLM 4.7 $0.29, GPT-5.2-Codex $0.43.
Published attempt cost and pass rate
At a glance
- Coding index
- GLM 4.7 55.1 from 2 benchmarks, GPT-5.2-Codex 45.4 from 3 benchmarks.
- Widest category
- Coding, 15.3 points apart on average over 8 shared benchmarks.
- Widest single gap
- Terminal-Bench: GLM 4.7 33.4% against GPT-5.2-Codex 66.5%, 33.1 points apart on a 0 to 100 scale.
- Output price
- GLM 4.7 $2.20 against GPT-5.2-Codex $14.00 per million output tokens, 6.4x apart.
- Context window
- GLM 4.7 takes 205K tokens, GPT-5.2-Codex 400K.
Benchmark by benchmark
First the score: boards each model leads, per category, where both have a result. Then every board, a category to a fold; bars are each result on a 0 to 100 scale, so compare the two in a row, not one row with another.
| Category | GLM 4.7 | Bars | GPT-5.2-Codex | Ties |
|---|---|---|---|---|
| Coding | 3 | 5 | ||
| Intelligence | 0 | 1 | ||
| Agentic work | 3 | 2 | ||
| Reasoning | 0 | 2 | ||
| General | 0 | 2 | ||
| All shared boards | 6 | 12 |
CodingLike-for-likeSix of these boards feed the Vibe Coding Index35
| Benchmark | GLM 4.7 | GPT-5.2-Codex | Leader |
|---|---|---|---|
| SWE-bench Verified | Not measured | 72.8% | Only GPT-5.2-Codex measured |
| SWE-bench Multilingual | Not measured | 66.3% | Only GPT-5.2-Codex measured |
| LMArena WebDev | 1435 | 1339 | GLM 4.7 |
| AA Coding Index | 45.3 | Not measured | Only GLM 4.7 measured |
| LiveCodeBench (Vals AI) | 82.2% | 88.0% | GPT-5.2-Codex |
| SWE-bench Verified (Vals AI) | 69.4% | 72.4% | GPT-5.2-Codex |
| Vibe Code Bench (Vals AI) | Not measured | 37.9% | Only GPT-5.2-Codex measured |
| LiveCodeBench (Artificial Analysis run) | 89.4% | Not measured | Only GLM 4.7 measured |
| Terminal-Bench Hard (Artificial Analysis run) | 31.8% | 37.1% | GPT-5.2-Codex |
| Terminal-Bench | 33.4% | 66.5% | GPT-5.2-Codex |
| ALE-Bench | 399.5 | 1299.9 | GPT-5.2-Codex |
| LMArena Text: coding | 1454 | Not measured | Only GLM 4.7 measured |
| LMArena Text: software and IT | 1453 | Not measured | Only GLM 4.7 measured |
| LMArena WebDev: React | 1420 | 1329 | GLM 4.7 |
| LMArena WebDev: HTML | 1447 | 1348 | GLM 4.7 |
| Neither model has a result on the other 24 boards here | |||
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index01
| Benchmark | GLM 4.7 | GPT-5.2-Codex | Leader |
|---|---|---|---|
| AA Intelligence Index | 22.2 | 28.5 | GPT-5.2-Codex |
| Epoch Capabilities Index | 143.6 | Not measured | Only GLM 4.7 measured |
Agentic workLike-for-likePublic boards, shown as published, kept out of the index32
| Benchmark | GLM 4.7 | GPT-5.2-Codex | Leader |
|---|---|---|---|
| Design Arena: agents building web apps | Not measured | 1051 | Only GPT-5.2-Codex measured |
| Design Arena: agents building full-stack apps | 1050 | 993 | GLM 4.7 |
| Design Arena: agents building mobile apps | 1105 | 1090 | GLM 4.7 |
| Design Arena: agents building Android apps | 1112 | 1176 | GPT-5.2-Codex |
| Design Arena: agents building Godot games | 1058 | 1142 | GPT-5.2-Codex |
| τ²-Bench Telecom | 95.9% | 92.1% | GLM 4.7 |
| Vending-Bench 2 | $2,377 | Not measured | Only GLM 4.7 measured |
| BrowseComp-Plus | 64.7% | Not measured | Only GLM 4.7 measured |
| Neither model has a result on the other 33 boards here | |||
ReasoningLike-for-likePublic boards, shown as published, kept out of the index02
| Benchmark | GLM 4.7 | GPT-5.2-Codex | Leader |
|---|---|---|---|
| GPQA Diamond | 80.0% | Not measured | Only GLM 4.7 measured |
| GPQA Diamond (Artificial Analysis run) | 85.9% | 89.9% | GPT-5.2-Codex |
| Humanity's Last Exam (Artificial Analysis run) | 27.4% | 35.7% | GPT-5.2-Codex |
| GPQA Diamond (Epoch AI run) | 83.3% | Not measured | Only GLM 4.7 measured |
| SimpleBench | 47.7% | Not measured | Only GLM 4.7 measured |
| Chess puzzles | 21.0% | Not measured | Only GLM 4.7 measured |
| LMArena Text: hard prompts | 1443 | Not measured | Only GLM 4.7 measured |
| LMArena Text: expert | 1424 | Not measured | Only GLM 4.7 measured |
| LMArena Text: hard prompts in English | 1452 | Not measured | Only GLM 4.7 measured |
| Neither model has a result on the other 13 boards here | |||
MathDirectional onlyPublic boards, shown as published, kept out of the index8 boards, none shared
| Benchmark | GLM 4.7 | GPT-5.2-Codex | Leader |
|---|---|---|---|
| AIME | 93.3% | Not measured | Only GLM 4.7 measured |
| MGSM (Vals AI) | 88.2% | Not measured | Only GLM 4.7 measured |
| AA Math Index | 95.0 | Not measured | Only GLM 4.7 measured |
| AIME 2025 (Artificial Analysis run) | 95.0% | Not measured | Only GLM 4.7 measured |
| OTIS Mock AIME | 83.3% | Not measured | Only GLM 4.7 measured |
| ProofBench | 6.0% | Not measured | Only GLM 4.7 measured |
| LMArena Text: math | 1424 | Not measured | Only GLM 4.7 measured |
| LMArena Text: mathematical work | 1411 | Not measured | Only GLM 4.7 measured |
| Neither model has a result on the other 5 boards here | |||
KnowledgeDirectional onlyPublic boards, shown as published, kept out of the index13 boards, none shared
| Benchmark | GLM 4.7 | GPT-5.2-Codex | Leader |
|---|---|---|---|
| MMLU Pro | 82.7% | Not measured | Only GLM 4.7 measured |
| LegalBench (Vals AI) | 83.4% | Not measured | Only GLM 4.7 measured |
| CaseLaw (Vals AI) | 54.9% | Not measured | Only GLM 4.7 measured |
| CorpFin (Vals AI) | 46.4% | Not measured | Only GLM 4.7 measured |
| TaxEval (Vals AI) | 68.8% | Not measured | Only GLM 4.7 measured |
| MedQA (Vals AI) | 93.7% | Not measured | Only GLM 4.7 measured |
| MedCode (Vals AI) | 32.8% | Not measured | Only GLM 4.7 measured |
| MMLU Pro (Artificial Analysis run) | 85.6% | Not measured | Only GLM 4.7 measured |
| SimpleQA Verified | 32.2% | Not measured | Only GLM 4.7 measured |
| LMArena Text: science | 1457 | Not measured | Only GLM 4.7 measured |
| LMArena Text: medicine and healthcare | 1469 | Not measured | Only GLM 4.7 measured |
| LMArena Text: legal and government | 1444 | Not measured | Only GLM 4.7 measured |
| LMArena Text: business and finance | 1429 | Not measured | Only GLM 4.7 measured |
| Neither model has a result on the other 5 boards here | |||
Web designDirectional onlyPublic boards, shown as published, kept out of the index8 boards, none shared
| Benchmark | GLM 4.7 | GPT-5.2-Codex | Leader |
|---|---|---|---|
| Design Arena: websites | 1225 | Not measured | Only GLM 4.7 measured |
| Design Arena: UI components | 1196 | Not measured | Only GLM 4.7 measured |
| Design Arena: game dev | 1188 | Not measured | Only GLM 4.7 measured |
| Design Arena: data viz | 1195 | Not measured | Only GLM 4.7 measured |
| Design Arena: 3D | 1190 | Not measured | Only GLM 4.7 measured |
| Design Arena: all code categories | 1216 | Not measured | Only GLM 4.7 measured |
| Design Arena: SVG | 1142 | Not measured | Only GLM 4.7 measured |
| Design Arena: ASCII art | 1165 | Not measured | Only GLM 4.7 measured |
| Neither model has a result on the other 1 board here | |||
GeneralLike-for-likePublic boards, shown as published, kept out of the index02
| Benchmark | GLM 4.7 | GPT-5.2-Codex | Leader |
|---|---|---|---|
| MedScribe (Vals AI) | 68.6% | Not measured | Only GLM 4.7 measured |
| IFBench | 67.9% | 77.6% | GPT-5.2-Codex |
| Long context reasoning (AA-LCR) | 71.0% | 82.3% | GPT-5.2-Codex |
| CL-bench | 15.9% | Not measured | Only GLM 4.7 measured |
| CL-bench Life | 10.9% | Not measured | Only GLM 4.7 measured |
| LMArena Text | 1435 | Not measured | Only GLM 4.7 measured |
| LMArena Text: instruction following | 1412 | Not measured | Only GLM 4.7 measured |
| LMArena Text: creative writing | 1401 | Not measured | Only GLM 4.7 measured |
| LMArena Text: English | 1453 | Not measured | Only GLM 4.7 measured |
| LMArena Text: non-English | 1417 | Not measured | Only GLM 4.7 measured |
| LMArena Text: Chinese | 1495 | Not measured | Only GLM 4.7 measured |
| LMArena Text: German | 1426 | Not measured | Only GLM 4.7 measured |
| LMArena Text: Japanese | 1439 | Not measured | Only GLM 4.7 measured |
| LMArena Text: Korean | 1399 | Not measured | Only GLM 4.7 measured |
| LMArena Text: French | 1432 | Not measured | Only GLM 4.7 measured |
| LMArena Text: Spanish | 1434 | Not measured | Only GLM 4.7 measured |
| LMArena Text: Russian | 1423 | Not measured | Only GLM 4.7 measured |
| LMArena Text: Polish | 1435 | Not measured | Only GLM 4.7 measured |
| LMArena Text: multi-turn | 1446 | Not measured | Only GLM 4.7 measured |
| LMArena Text: longer queries | 1432 | Not measured | Only GLM 4.7 measured |
| LMArena Text: writing and language | 1411 | Not measured | Only GLM 4.7 measured |
| LMArena Text: entertainment and media | 1400 | Not measured | Only GLM 4.7 measured |
| Neither model has a result on the other 24 boards here | |||
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
| Benchmark | GLM 4.7 | GPT-5.2-Codex | Leader |
|---|---|---|---|
| Neither model has a result on 5 boards here | |||
What each workload costs
Three fixed token mixes at each model's listed price, so per-token rates become a bill.
Chat turn
1K input + 500 output tokens
GLM 4.7 costs less
Repository review
50K input + 3K output tokens
GLM 4.7 costs less
Agent loop
200K input + 10K output tokens
GLM 4.7 costs less
Listed OpenRouter rates, without cache or batch discounts. A workload that does not fit a model's context window would need splitting.
Specification differences
The leading value in a row is marked; a row with a missing value names no leader. Our two rows are marked in red.
| Specification | Z.ai GLM 4.7 | OpenAI GPT-5.2-Codex |
|---|---|---|
| Maker | Z.ai | OpenAI |
| Weights | Open weights | No public weights listed |
| Released | December 22, 2025 | January 14, 2026 |
| Context window | 205K | 400K |
| Input $/Mtok | $0.60 | $1.75 |
| Output $/Mtok | $2.20 | $14.00 |
| Coding index | 55.1 | 45.4 |
| Independent measurements behind it | 2 | 3 |
| Cost per solved task | $0.29 | $0.43 |
| Source | OpenRouter listing | OpenRouter listing |
Questions
Is GLM 4.7 better than GPT-5.2-Codex for coding?
Pick GLM 4.7 for coding: it scores 55.1 on the Vibe Coding Index against 45.4 for GPT-5.2-Codex, though on 2 benchmarks against 3. Pick GPT-5.2-Codex for a larger context window (400K against 205K tokens) and work measured by LiveCodeBench (Vals AI) or SWE-bench Verified (Vals AI), where it leads.
Which is cheaper, GLM 4.7 or GPT-5.2-Codex?
GLM 4.7 costs $0.60 per million input tokens and $2.20 per million output tokens; GPT-5.2-Codex costs $1.75 and $14.00. Per solved SWE-bench Verified task, GLM 4.7 costs $0.29 and GPT-5.2-Codex $0.43.
Which has the bigger context window, GLM 4.7 or GPT-5.2-Codex?
GPT-5.2-Codex, with 400K tokens against 205K.
How many benchmarks is the GLM 4.7 vs GPT-5.2-Codex comparison based on?
18 benchmarks have a result for both models as of October 22, 2026. GLM 4.7's coding index rests on 2 independent benchmarks and GPT-5.2-Codex's on 3. Where only one model has a result, the page says so instead of naming a winner.