AIREITER

AI Image

FLUX.2 ProGPT-Image 2Wan 2.7 Image ProGPT 4o ImageSeedream 5.0 ProSeedream V5 liteSeedream V4.5More

AI Video

Kling 3.0 Motion ControlSora 2 ProKling 3.0 TurboSora 2Kling 3.0Grok Imagine 1.5Veo 3.1More

LLM

Gemini 3.6 FlashGemini 3.1 ProKimi K3Gemini 3 ProGemini 2.5 ProClaude Opus 5Claude Fable 5More
Coming soonSeedance 2.5
Super ResolutionLyric Video GeneratorGPT Image 2 1K GeneratorGPT Image 2 Product Mockup GeneratorUse GPT-5.6 Online
API DOCSPRICING
BlogUpdatesLLM API GuideClaude API GuideKimi K3 API Guide
TEMPLATES
  • AIReiter
  • Blog
  • DeepSeek V4 Flash vs GLM-5.2: 0731 Update Tested

DeepSeek V4 Flash vs GLM-5.2: 0731 Update Tested

Last Updated: 2026-07-31 07:22:47

DeepSeek quietly rebuilt deepseek-v4-flash today. On four graded tasks it tied GLM-5.2 on three, won the fourth, and cost 19x less to run — except GLM-5.2 is still the higher-scoring model on paper, and the reason it lost my fourth task is a trap you can walk into on purpose.

That trap is reasoning budget. Through the endpoint I tested, GLM-5.2 reasoned at length even on short prompts, and on one spec-heavy task it spent 16,000 output tokens without ever emitting an answer. Flash finished the same task in 2,525 tokens.

What the 0731 update changed for deepseek-v4-flash

DeepSeek's own API docs now list the model version for deepseek-v4-flash as DeepSeek-V4-Flash-0731. The invocation method is unchanged and the alias still resolves to the newest build, so nothing in your code breaks, and nothing tells you the model underneath moved.

DeepSeek API docs showing model version DeepSeek-V4-Flash-0731, 1M context length and 384K max output

The update carries no changelog entry on that pricing page, and DeepSeek's news index showed no July 2026 entry when I checked it on 2026-07-31. The consequence for reading any comparison: a published Flash score measures whichever build was live when the test ran, so check both the evaluation date and the variant, because "Flash Base," "Flash (Reasoning)," and "Flash (Reasoning, Max Effort)" are three different rows with different numbers.

The same docs page confirms the specs that matter for a head-to-head: 1M context, a 384K maximum output, thinking mode on by default with a non-thinking mode available, and a 2,500 concurrency limit against Pro's 500. The Responses API currently supports only deepseek-v4-flash, with deepseek-v4-pro slated for early August 2026.

Same four tasks, both models: what actually happened

I sent both models identical prompts through an OpenAI-compatible relay on 2026-07-31, with thinking left at its default and max_tokens at 8,000 unless noted, and graded the output mechanically rather than by eye. The two coding tasks were executed against hidden test cases (6 and 8 respectively); the JSON task was checked key-by-key against the requested schema; the retrieval task had exactly one correct string.

TaskDeepSeek V4 Flash (0731)GLM-5.2
t1 — find and fix an interval-merge edge case6/6 tests, 5.0s, 361 out6/6 tests, 19.0s, 990 out
t2 — implement next_version() to an 8-rule spec8/8 tests, 29.9s, 2,525 outno answer returned
t3 — strict JSON, exact keys, no fencepass, 5.2s, 327 outpass, 11.2s, 826 out
t4 — retrieve and combine 3 facts from ~45K tokenscorrect, 5.2s, 172 outcorrect, 9.7s, 317 out

Three of four are honest ties. Both models found the same bug in t1 — a strict < that fails to merge touching intervals like (1,4) and (4,5) — and both shipped the identical one-character fix. Both nailed the strict-JSON task byte-for-byte. Both got t4 right, combining a secret buried at record 211 with a rule at record 1290 to return quartz-mallard-90.

Grouped bar chart of wall-clock seconds per task, DeepSeek V4 Flash versus GLM-5.2

t2 is the outlier, and it deserves precision rather than a victory lap. GLM-5.2 did not answer incorrectly — it never answered. At an 8,000-token cap it burned all 8,000 on reasoning and returned empty content after 110s. I re-ran it at 16,000 to rule out my own cap being the culprit: 16,000 tokens consumed, still empty, 214s. A third attempt at 24,000 errored out after 301s. Flash produced a function passing all eight cases, including the three that must raise ValueError.

Limits worth stating plainly: this is n=1 per task on one relay endpoint, not a benchmark. Reasoning tokens are billed inside completion_tokens here, and the official Z.ai endpoint may stream or account for them differently. What I'd defend from this data is the shape, not a precise ratio: GLM-5.2 spends far more tokens and wall-clock per task.

Where GLM-5.2 is genuinely ahead

GLM-5.2 is the stronger model by the measures the industry actually uses, and a cheap-wins-everything read of my results would be wrong. Artificial Analysis puts GLM-5.2 (max) at 51 on its Intelligence Index against 40 for DeepSeek V4 Flash (Reasoning, Max Effort) — an 11-point gap, on a much larger model: 753B total and ~40B active, versus Flash's 284B total and 13B active.

Z.ai's published figures for GLM-5.2 land where you'd expect a flagship: SWE-bench Pro 62.1%, Terminal-Bench 2.1 81.0, AIME 2026 99.2%, GPQA Diamond 91.2%, and HLE with tools 54.7%. These are vendor-reported, and Flash has no comparable entry on most of them.

That absence is the honest headline on benchmarks: the two models share essentially no evaluations. Model-tracking site benchlm compares them and declines to name a winner, noting the pair has zero like-for-like rows. Flash's public numbers come from a base-model suite (MMLU 88.7%, HumanEval 69.5%, GSM8K 90.8%), GLM-5.2's from an agentic-coding suite.

Knowledge is the one category where they overlap, and there benchlm has GLM-5.2 ahead, 59.6 to 56.4. When two comparison pages disagree about this matchup, the usual cause is that they scored different variants against different suites. Trust the number whose variant and date match what you plan to call.

Practitioners describe the split the same way I measured it. From an r/opencodeCLI thread running the same task on both:

GLM 5.2 reasons hard on everything. V4 scales it, almost no wind-up on the simple fix, GLM 5.2 pulls ahead on anything that is not banally [simple] …

That is the trade in one line: GLM-5.2's reasoning is an asset on hard problems and pure overhead on easy ones.

The cost gap is wider than the price sheet

Start with list prices, both verified on the vendors' own pages on 2026-07-31.

Per 1M tokensDeepSeek V4 FlashGLM-5.2GLM multiple
Input (cache miss)$0.14$1.4010.0x
Input (cache hit)$0.0028$0.2692.9x
Output$0.28$4.4015.7x
Max output384K128K—
DeepSeek API docs pricing rows: cache hit $0.0028, cache miss $0.14, output $0.28 per 1M tokens Z.ai pricing table showing GLM-5.2 at $1.4 input, $0.26 cached input, $4.4 output per 1M tokens

Then apply those rates to the tokens each model actually spent on my four tasks, and the gap widens past the 15.7x output ratio, because the pricier model is also the more verbose one:

TaskFlash in→outFlash costGLM-5.2 in→outGLM-5.2 costMultiple
t1 bug fix165→361$0.000124170→990$0.00459437.0x
t2 implement182→2,525$0.000732196→16,000$0.07067496.5x
t3 strict JSON171→327$0.000116177→826$0.00388233.5x
t4 long-context45,225→172$0.00638044,164→317$0.0632249.9x
All four45,743→3,385$0.00735244,707→18,133$0.14237519.4x

Every prompt was sent cold, so all input is billed at the cache-miss rate; multiply the columns above by the table before it to reproduce any figure.

Bar chart of GLM-5.2 cost divided by DeepSeek V4 Flash cost per task, ranging from 9.9x to 96.5x

t4 is the narrowest gap at 9.9x: when a job is input-heavy the 10x input ratio dominates and output verbosity stops mattering, which is the one workload shape where GLM-5.2's premium stays contained.

DeepSeek's pricing page states the API "will soon adopt a peak/off-peak pricing policy" at 2x across all billing items for 09:00–12:00 and 14:00–18:00 Beijing time (UTC+8), effective date pending announcement, which would cut Flash's output advantage to roughly 5x during Asian business hours. Pulling the other way, Flash's cache-hit input at $0.0028 is 93x cheaper than GLM-5.2's $0.26, so replaying a large stable prefix widens the gap. And if your use is coding specifically, Z.ai's Coding Plan starts at $18/month with GLM-5.2 included and off-peak usage at half rate, which is a different bill from the per-token rates above.

Which one to call, by workload

WorkloadCallWhy
High-volume simple-to-mid coding editsV4 FlashSame answer as GLM-5.2 on my t1, 3.8x faster, 37x cheaper
Strict-format / structured output at scaleV4 FlashByte-identical result at 1/34th the cost
Long-context retrieval over big documentsV4 FlashSame correct answer; narrowest cost gap but still 9.9x
Hard agentic or multi-file codingGLM-5.251 vs 40 Intelligence Index, and its own agentic suite is where it scores
Anything with a tight max_tokensV4 FlashGLM-5.2 returned nothing at 8K and 16K caps on my t2
Output over 128K tokens in one callV4 Flash384K max output vs GLM-5.2's 128K

Treat this as a cost-routing default to validate rather than a settled rule, since it rests on one four-task run: route to Flash, escalate to GLM-5.2 for the subset of tasks where a wrong answer costs more than 19x the token spend. If you do run GLM-5.2, give it room, because a cap that would be generous for Flash can produce a paid non-answer.

One thing this comparison cannot settle: no third-party re-score of Flash has appeared since 0731 landed today, so the 51-vs-40 gap describes the April build. The current capability distance is unmeasured, and the only way to size it for your workload is to run your own evals against both aliases.

FAQ

Is DeepSeek V4 Flash 0731 a new model or an update?

An update to the existing model, not a new one. DeepSeek's docs list the version as DeepSeek-V4-Flash-0731 and state the invocation method is unchanged, so deepseek-v4-flash keeps resolving to the newest build with no code change on your side.

Did DeepSeek V4 Flash beat GLM-5.2?

Not on capability: Artificial Analysis scores GLM-5.2 (max) at 51 against 40 for DeepSeek V4 Flash (Reasoning, Max Effort). Flash won on cost per solved task, tying three of four graded tasks at 19.4x lower total cost.

Is GLM-5.3 out yet?

Not as of 2026-07-31: GLM-5.2 is the newest entry on Z.ai's own pricing table and its Coding Plan model list, neither of which carries a 5.3 row.

Which is cheaper for a 1M-token context job?

DeepSeek V4 Flash, by 10x on cache-miss input and 93x on cache-hit input. My ~45K-token retrieval task cost $0.006380 on Flash versus $0.063224 on GLM-5.2.

Can I use both in Claude Code?

Yes, both vendors document an Anthropic-format endpoint. DeepSeek lists https://api.deepseek.com/anthropic alongside its OpenAI-format base URL, and Z.ai's Claude Code guide has you set ANTHROPIC_BASE_URL to https://api.z.ai/api/anthropic and map the Sonnet and Opus slots to glm-5.2[1m].

Related reading

  • DeepSeek V4 Flash vs DeepSeek V4 Pro
  • GLM-5.2 API

Sources

  • DeepSeek Models & Pricing — 0731 version note, prices, peak/off-peak policy, verified 2026-07-31
  • Z.ai pricing — GLM-5.2 rates, verified 2026-07-31
  • Z.ai Coding Plan — subscription tiers and GLM-5.2 coverage, verified 2026-07-31
  • Z.ai: Claude Code setup — Anthropic-compatible base URL and model mapping
  • DeepSeek news index — checked 2026-07-31, no July 2026 entry
  • Artificial Analysis: GLM-5.2 vs DeepSeek V4 Flash — Intelligence Index, parameters
  • benchlm: DeepSeek V4 Flash Base vs GLM-5.2 — shared-benchmark coverage, knowledge scores
  • r/opencodeCLI: DeepSeek V4 vs GLM 5.2 for coding — practitioner report

>_AIReiter Model Directory

Fast API access to models related to this guide

Kimi K3

Chat

A long-context reasoning model for coding, writing, analysis, and agent workflows.

moonshotGet API Key >

Gemini 3.6 Flash

Chat

A fast Gemini model for advanced reasoning, coding, and agentic tasks.

GoogleGet API Key >

Claude Fable 5

Chat

A premium Claude model for deep reasoning and complex long-form work.

AnthropicGet API Key >

Claude Opus 4.8

Chat

A high-capability Claude model for demanding reasoning and professional work.

AnthropicGet API Key >

Claude Opus 5

Chat

A premium Claude model for complex reasoning, coding, and long-context professional work.

anthropicGet API Key >

Recent Posts

GPT-5.6 Price Cut: What Luna and Terra Really Cost Now

2026-07-31

Invalid API Key: Diagnose 401 and 403 Before You Fix

2026-07-31

Fix OpenRouter 429: Provider Error or Rate Limit?

2026-07-31

B2B Ad Intelligence Only Comes From HTML: Writing a Parser That Survives Redesigns

2026-07-31
AIREITER

Questions? Contact us at
[email protected]

LLM

Gemini 3.6 FlashGemini 3.1 ProKimi K3Gemini 3 ProGemini 2.5 Pro

AI Video

Kling 3.0 Motion ControlSora 2 ProKling 3.0 TurboSora 2Kling 3.0

AI Image

FLUX.2 ProGPT-Image 2Wan 2.7 Image ProGPT 4o ImageSeedream 5.0 Pro

Blog

View All →

Company

Privacy PolicyTerms of ServiceRefund Policy

© 2026 AIReiter. All rights reserved.