查看中文版 →

Deutsche Version ansehen →

Открыть русскую версию →

Ver versión en español →

Log in
Blog · Model tests

GLM-5.4 and GLM-5.3-Flash vs DeepSeek-V4.1-Flash

Z.ai shipped its Loop Transformer flagship GLM-5.4 on November 23 without a 5.4 Flash tier—leaving GLM-5.3-Flash as its pay-as-you-go fast model. Run the real agent math against DeepSeek-V4.1-Flash, and cache-hit pricing flips the leaderboard.

Developers shopping for a fast 1M-context coding model keep searching for GLM 5.3 Flash vs DeepSeek V4.1 Flash—and now GLM 5.4 vs DeepSeek V4.1 Flash. First, a quick lineup check: Z.ai (Zhipu) launched its flagship GLM-5.4 on November 23, 2026 as the first 750B-scale Loop Transformer with native vision and a 1M context window, but no GLM-5.4-Flash exists yet. Z.ai's pay-as-you-go fast tier is still GLM-5.3-Flash. On the other side sits DeepSeek-V4.1-Flash (including the 1017 snapshot), a 552B MIT-licensed MoE model with 1M context and native vision.

Putting all three side by side produces a result that surprises most people who only skim list prices.

Bottom line: Across Zhipu's 200 real-world coding tasks, GLM-5.4 edges out DeepSeek-V4.1-Flash-1017 at 36.6% win / 30.2% tie / 33.2% lose, and delivers 1.5x more usable tokens on the GLM Coding Plan than GLM-5.3—making it a strong pick for UI cloning and long-horizon work. On pay-as-you-go APIs, however, the bill flips: GLM-5.3-Flash lists lower uncached rates ($0.15 / $0.50) than DeepSeek-V4.1-Flash at peak ($0.30 / $1.20), yet DeepSeek's $0.006 peak / $0.003 off-peak cache-hit rate makes it 20% cheaper at peak and 60% cheaper off-peak in a 94%-cached coding agent loop.

Specs and official pricing at a glance

All three models share a 1M context window and native vision. Where they diverge is architecture and how you pay for them: GLM-5.4 currently ships through GLM Coding Plan subscriptions (standalone pay-as-you-go API is still pending), while GLM-5.3-Flash and DeepSeek-V4.1-Flash are both available on standard token-metered APIs.

SpecGLM-5.4GLM-5.3-FlashDeepSeek-V4.1-Flash
Architecture750B Loop Transformer (28 middle layers run twice)320B MoE (18B active), hybrid sparse-linear attention552B MoE (8B prefill / 16B decode active), MIT license
Context / Max Output1M / 128K1M1M
Input ModalitiesText, image, video, filesText, imageText, image
API Input (Uncached / 1M)Standalone API coming soon$0.15$0.30 (peak) / $0.15 (off-peak)
API Cache Hit (/ 1M)1.1 credits / 10K tokens (Coding Plan)$0.03$0.006 (peak) / $0.003 (off-peak)
API Output (/ 1M)16 credits / 10K tokens (Coding Plan)$0.50$1.20 (peak) / $0.60 (off-peak)
Access & BillingGLM Coding Plan (Lite $18 / Pro $80 / Max $168)Official API or Coding Plan (2.3 / 1.15 / 8 credits)Official API (50% off-peak) or API gateways
Measured ThroughputUp to 200 tok/s off-peak, 70–80 tok/s peak~49 tok/s on Z.ai native, 200+ tok/s on third-party hosts210+ tok/s on optimized hosts, ~1.15 s TTFT

Two scheduling windows matter when estimating real spend:

  • DeepSeek peak hours: 01:00–04:00 and 06:00–10:00 UTC, Monday through Friday (excluding Chinese public holidays); all other hours and weekends run at 50% off
  • GLM Coding Plan off-peak: outside 14:00–18:00 Singapore/Beijing time on weekdays, credit deduction drops by 50%, effectively doubling weekly token mileage

Benchmarks and real-world coding

In its GLM-5.4 model docs, Zhipu published head-to-head results across 200 real-world coding scenarios, pitting GLM-5.4 directly against DeepSeek-V4.1-Flash-1017:

GLM-5.4 vs.WinTieLose
DeepSeek-V4.1-Flash-101736.6%30.2%33.2%
Kimi K3.1 Pro41.8%26.9%31.3%
GLM-5.351.1%25.7%23.1%

GLM-5.4 wins more than twice as often as it loses against its predecessor GLM-5.3, yet against DeepSeek-V4.1-Flash-1017 the margin narrows to 3.4 percentage points with 30.2% ties. For day-to-day software engineering, the two are remarkably close.

On public agentic and reasoning benchmarks—where GLM-5.4 has not yet released a full standardized table—here is how GLM-5.3-Flash and DeepSeek-V4.1-Flash stack up on reported scores:

BenchmarkGLM-5.3-FlashDeepSeek-V4.1-FlashNotes & Conditions
DeepSWE v1.1~63.4%~74.2%Multi-file repo engineering; DeepSeek at max reasoning effort
Terminal-Bench 2.1Not reported on same split~90.6%CLI agent execution and tool calling
GPQA DiamondNot reported on same split~90.9%Graduate-level scientific reasoning
AutomationBench~48.8%Not reported on same splitEnd-to-end automation workflows
AA Intelligence Index~57Top of Flash tierArtificial Analysis composite intelligence score

Put both tables together and the split is clear:

  • Versus GLM-5.3-Flash: DeepSeek-V4.1-Flash leads by roughly 10.8 points on DeepSWE v1.1 and holds up better on multi-file refactors and shell debugging; continuous reasoning_effort (1–100) also lets you dial latency down for quick edits
  • Versus GLM-5.4: GLM-5.4 uses its Loop Transformer depth to excel at visual UI cloning, mockup-to-code work, and "Generalized Coding" tasks (3D, CAD, multi-tool pipelines); the trade-off is longer turn latency at its default max thinking effort—use Ctrl + T in ZCode to step effort down for small fixes

Real workload cost breakdown: why cache hits flip the math

Raw per-million-token tables mislead on coding agents. In OpenCode, Claude Code, and DeepSeek Harness, every turn resends the system prompt, repo rules, and conversation history—so prompt cache hit rates routinely sit above 90%.

Using CodingPass's observed coding-agent profile of 100K tokens per request—5% uncached input (5,000 tokens), 94% cached input (94,000 tokens), and 1% output (1,000 tokens)—the per-request formula is:

Cost per request = 0.005 × uncached_input + 0.094 × cache_hit + 0.001 × output

Plugging in official API rates across 1K, 10K, and 100K monthly requests (100M, 1B, and 10B total tokens):

Model / PlanPer Request (100K tok)1K req / mo10K req / mo100K req / mo
DeepSeek-V4.1-Flash (Off-Peak)$0.00163$1.63$16.32$163.20
DeepSeek-V4.1-Flash (Peak)$0.00326$3.26$32.64$326.40
GLM-5.3-Flash (Official API)$0.00407$4.07$40.70$407.00
GLM-5.4 (Coding Plan Lite, $18/mo)~$0.003–$0.006 (at full weekly use)$18 flatRequires Pro ($80/mo)Requires Max / multi-seat

Two inflection points stand out:

  • High-cache agent loops (94% cache hit): GLM-5.3-Flash charges $0.03/M for cached input, which accounts for nearly 70% of its per-request bill ($0.00282 out of $0.00407). DeepSeek-V4.1-Flash's CSA2 + FP4 KV cache drives cache-hit pricing down to $0.006 peak / $0.003 off-peak—saving $8.06 per 10K requests even during peak hours, and dropping 10K requests to $16.32 off-peak
  • Zero-cache one-shot calls (batch scripts / stateless APIs): With 5K uncached input and 1K output (0% cache), the math reverses—GLM-5.3-Flash costs $0.00125 per call ($12.50 per 10K), compared to $0.00270 peak ($27.00 per 10K) and $0.00135 off-peak ($13.50 per 10K) on DeepSeek-V4.1-Flash

Factor in rework cost as well: single-call cost ÷ first-pass success rate + human debugging time. Saving a fraction of a cent per call disappears immediately if a weaker model forces two extra iterations or ten minutes of manual cleanup.

On the subscription side, GLM-5.4 consumes 14.24 credits per 100K-token request at peak (4.6 input / 1.1 cache / 16 output per 10K tokens), or 7.12 credits off-peak. On the Lite plan ($18/mo, 10,000 weekly credits), steady usage yields roughly 702–1,404 requests per week (3,000–6,000 per month), landing around $0.003–$0.006 per request for a 750B Loop Transformer flagship.

Scenario decision table

Workload / ScenarioRecommended ChoiceWhy & Trade-offs
Heavy CLI agent loops (OpenCode, Claude Code, dsh)DeepSeek-V4.1-FlashLowest effective cost at 94% cache hit even during peak hours, strong DeepSWE and Terminal-Bench scores, MIT open weights
Visual UI cloning, mockup-to-code, long-horizon tasksGLM-5.4 (Coding Plan)Native image/video inputs, slight edge in 200-task coding head-to-head, 1.5x token mileage vs GLM-5.3; requires a subscription with 5-hour and weekly credit caps
Stateless batch pipelines with 0% cache hitsGLM-5.3-FlashFlat $0.15 / $0.50 pricing all day is over 50% cheaper than DeepSeek peak rates when caching does not apply; weaker on complex multi-file refactors
Mixed workflow that escalates hard bugs to ClaudeCodingPassRun DeepSeek-V4.1-Flash, GLM-5.3-Flash, and Claude Sonnet 5.5 from one API key and one monthly allowance

Connecting them in OpenCode and Claude Code

1. GLM-5.4 in Claude Code (GLM Coding Plan)

With an active GLM Coding Plan key, point Claude Code at Z.ai's Anthropic-compatible endpoint and append [1m] to enable the full 1M context window (mainland China BigModel subscribers use https://open.bigmodel.cn/api/anthropic):

export ANTHROPIC_BASE_URL="https://api.z.ai/api/anthropic"export ANTHROPIC_AUTH_TOKEN="your-coding-plan-key"claude --model "glm-5.4[1m]"

See the ZCode setup guide and Claude Code setup guide for full options.

2. DeepSeek-V4.1-Flash in Claude Code (official API)

DeepSeek exposes an Anthropic-compatible endpoint where deepseek-flash routes to the latest DeepSeek-V4.1-Flash-1017 snapshot:

export ANTHROPIC_BASE_URL="https://api.deepseek.com/anthropic"export ANTHROPIC_AUTH_TOKEN="your-deepseek-api-key"claude --model "deepseek-flash"

If you prefer DeepSeek's open-source dsh client, check the DeepSeek Harness setup guide.

3. Running DeepSeek, GLM, and Claude together in OpenCode (CodingPass)

For teams and solo devs who want DeepSeek-V4.1-Flash or GLM-5.3-Flash for routine loops and Claude Sonnet 5.5 for architectural calls, add CodingPass once in ~/.config/opencode/opencode.json and switch via /models:

{  "$schema": "https://opencode.ai/config.json",  "model": "codingpass/deepseek-v4.1-flash",  "providers": {    "codingpass": {      "name": "CodingPass",      "env": ["CODINGPASS_API_KEY"],      "package": "@opencode/ai/providers/anthropic",      "settings": { "baseURL": "https://codingpass.ai/v1" },      "models": {        "deepseek-v4.1-flash": { "name": "DeepSeek V4.1 Flash" },        "glm-5.3-flash": { "name": "GLM 5.3 Flash" },        "claude-sonnet-5-5": { "name": "Claude Sonnet 5.5" }      }    }  }}

CodingPass Go is $10 a month for a $60 shared allowance metered at official API prices—good for roughly 13,600 requests on DeepSeek-V4.1-Flash or 2,050 requests on Claude Sonnet 5.5 across 25 models. Check all models, pricing, and usage limits for exact caps.

FAQ

Is there a GLM-5.4-Flash model yet?

Not yet. Z.ai released only the flagship GLM-5.4 on November 23, 2026 via the GLM Coding Plan and ZCode 4.0. For a lightweight, pay-as-you-go Flash model from Z.ai, GLM-5.3-Flash remains the active tier.

Can you use GLM-5.4 and DeepSeek-V4.1-Flash directly in Claude Code?

Yes. Both vendors provide Anthropic-compatible endpoints: point ANTHROPIC_BASE_URL to https://api.z.ai/api/anthropic with glm-5.4[1m] for GLM-5.4, or https://api.deepseek.com/anthropic with deepseek-flash for DeepSeek-V4.1-Flash.

Why is DeepSeek-V4.1-Flash cheaper than GLM-5.3-Flash in agent loops despite higher peak list prices?

Coding agents resend almost the entire prompt context on every turn, pushing cache hit rates past 90%. DeepSeek-V4.1-Flash prices cached reads at $0.006/M peak ($0.003/M off-peak) versus $0.03/M on GLM-5.3-Flash—a 5x to 10x gap on the largest portion of your token volume.

Boarding

Open-weight models for long loops, Claude for the hard calls.

CodingPass Go starts at a month with a shared allowance across models—including DeepSeek-V4.1-Flash (about requests), GLM-5.3-Flash, and Claude Sonnet 5.5 (about requests). No surprise charges, cancel anytime.

  • Request ID on every response
  • Full refund if you've used 5% or less
  • No surprise charges
Choose GoOpenCode setup guide

$10/mo until you cancel.