Qwen3.8 vs GLM-5.2 vs DeepSeek-V4 for Coding Agents

Z

ZharfAI Team

AI Development

August 6, 202611 min read
Qwen3.8 vs GLM-5.2 vs DeepSeek-V4 for Coding Agents

Qwen3.8, GLM-5.2, and DeepSeek-V4 are three current model families worth testing for agentic software development. They are models, not replacements for an agent harness. The harness supplies repository tools, permissions, skills, memory, MCP, subagents, worktrees, and review; the model decides how well to reason and act through those controls.

This guide was verified on August 6, 2026 from Qwen, Z.ai/Zhipu, DeepSeek, Qwen Code, and ZCode primary sources. It uses exact model identifiers because the current names are easy to misstate: qwen3.8-max-preview, glm-5.2, and deepseek-v4-flash. Availability, preview status, regional plans, pricing, and provider aliases can change independently.

Official DeepSeek social artwork
Official DeepSeek social artwork

Official DeepSeek API documentation artwork. The currently documented V4 API details are covered below.

First separate the model from the coding agent

A coding model produces text, reasoning, and tool calls. A coding agent such as Qwen Code, OpenCode, Hermes Agent, or ZCode decides which files the model sees, which tools it may call, how commands are approved, how history is compacted, and how changes are reviewed.

That distinction explains why the same model can succeed in one client and fail in another. Differences may come from:

  • system prompt and tool schema;
  • repository retrieval and output truncation;
  • support for thinking blocks or reasoning effort;
  • permission, sandbox, and worktree behavior;
  • context compaction and prompt caching;
  • retry policy and provider transport;
  • subagent orchestration and completion checks.

Never rank models from one screenshot or chat answer. Freeze the harness version and acceptance task before comparing them.

Exact current names at a glance

FamilyExact current identifier covered hereStatus on August 6, 2026Practical starting point
Qwen 3.8qwen3.8-max-previewPreview in Qwen Code ModelStudio Token PlanQwen Code with /model
GLM-5.2glm-5.2Released flagship; 1M context and effort control; MIT model releaseZCode or a supported Z.ai/API client
DeepSeek-V4deepseek-v4-flashPublic-beta V4-Flash API, updated July 31Qwen Code built-in provider or compatible API client

DeepSeek also exposes deepseek-v4-pro, but the July 31 official update says the Pro API was unchanged and its formal release would follow. The retired deepseek-chat and deepseek-reasoner aliases passed their announced discontinuation date on July 24, 2026, so new configurations should not use them.

Qwen3.8-Max Preview

Qwen Code's July 23 release update added qwen3.8-max-preview to the ModelStudio Token Plan list. Its July 30 update added or corrected Qwen3.8 image-modality handling. The official Qwen Code case study clarifies that references to “qwen3.8-max” in that workflow mean the preview.

Select it from the live picker:

/auth
/model qwen3.8-max-preview

or launch a configured session:

qwen --model qwen3.8-max-preview

Treat it as a thinking-oriented preview endpoint. Do not assume undocumented aliases work, and do not infer that the preview has downloadable open weights. Verify modality in the installed client's model metadata; earlier Qwen Code releases had compatibility bugs around thinking-only side queries and multimodal flags, which is why a current v0.21 release matters.

Qwen3.8 is a sensible candidate for long agent tasks inside Qwen Code, especially when you want its fast-moving worktree, subagent, skill, memory, and channel stack. Compare it against available Qwen3-Coder models for narrow code generation or review; “newest Max” does not automatically win every latency, cost, or code-focused task.

Official Qwen Code blog artwork
Official Qwen Code blog artwork

Official Qwen Code documentation artwork. Use the model picker for the live identifier rather than reading one from an older screenshot.

GLM-5.2

Z.ai introduced GLM-5.2 on June 16, 2026 as its flagship for long-horizon tasks. The release describes a stable 1-million-token context, explicit coding effort levels, and an MIT-licensed open-source release. Vendor-published benchmark results show strong long-duration engineering performance, but they remain vendor-reported evidence and may not transfer to your repository.

GLM-5.2 has a first-party agent environment: ZCode. ZCode combines workspace files, terminal and browser results, Git state, goals, review, remote control, and bot channels around GLM-5.2. This is the lowest-friction route when you want the model and harness tuned together:

  1. install ZCode from its official download page;
  2. connect a Z.ai account or GLM Coding Plan;
  3. create a workspace task in the exact repository;
  4. select GLM-5.2 and a conservative execution mode;
  5. ask for a plan and review before edits;
  6. inspect Git changes and verification artifacts.

GLM-5.2 is also a candidate for multi-provider clients when the selected provider documents a compatible endpoint. In Qwen Code, /auth currently includes Z.AI as a built-in third-party provider. In OpenCode or Hermes, use the live provider/setup flow; do not guess a base URL, protocol, or model slug from another client.

Official GLM-5.2 long-horizon benchmark chart
Official GLM-5.2 long-horizon benchmark chart

Official Z.ai launch chart. The scores are vendor-reported and should be treated as discovery evidence, not a guarantee.

DeepSeek-V4-Flash

DeepSeek's official API changelog says the API added V4-Pro and V4-Flash on April 24, 2026 through both OpenAI ChatCompletions and Anthropic interfaces. On July 31, DeepSeek released an updated V4-Flash public beta. The API model parameter remains:

deepseek-v4-flash

The named underlying update is DeepSeek-V4-Flash-0731, but the API call continues to use deepseek-v4-flash. The same update says it was re-post-trained while retaining the preview architecture and size. Do not invent deepseek-v4-flash-0731 as an API ID unless a specific provider documents that alias.

DeepSeek's changelog says V4 targets Code Agent and Search Agent work. Qwen Code's May 7 update added DeepSeek V4 compatibility for its large context, long output, max effort, and thinking-block behavior. To use the built-in route:

/auth

Choose Third-party Providers → DeepSeek, enter the key through the official credential flow, then select:

/model deepseek-v4-flash

If another harness supports the DeepSeek OpenAI- or Anthropic-compatible interface, follow that harness's provider guide. Protocol compatibility only means request/response shape; it does not guarantee every reasoning block, tool call, cache field, or long-context behavior is identical.

Which harness should run each model?

HarnessBest use in this comparisonImportant boundary
Qwen CodeNative route for Qwen3.8 preview; built-in DeepSeek and Z.AI provider choices; model arenaVerify exact model/region and update weekly-moving client behavior
ZCodeFirst-party GLM-5.2 desktop agent, goals, review, remote, and botsIt is a full environment, not merely an API selector
OpenCodeOpen-source multi-provider terminal/desktop/IDE/server harnessUse /connect and current provider docs; stable and V2 config differ
Hermes AgentPersistent general agent with hosted/router/local provider optionsBroader memory, messaging, and automation increase authority
CodexOpenAI's integrated coding agent surfacesDo not imply Codex can swap to these third-party models
Claude CodeAnthropic's coding agent and SDK ecosystemAn Anthropic-compatible API does not automatically make it an official Claude Code model
AntigravityGoogle's shared CLI/visual agent platformUse the models available through Antigravity; it is not a generic provider shell

The cleanest experiment is Qwen3.8 and DeepSeek-V4 in Qwen Code, GLM-5.2 in both Qwen Code and ZCode, and then one provider-flexible harness such as OpenCode. This reveals whether the result follows the model or the harness.

Configure without leaking API keys

Use /auth, OS credential storage, or documented environment-variable names. Do not put keys in:

  • QWEN.md, AGENTS.md, or a Skill;
  • repository settings.json;
  • a prompt, issue, PR, or chat channel;
  • screenshots and screen recordings;
  • shell commands that remain in shared history;
  • CI logs or build artifacts.

Give each provider a separate, revocable key with budget and scope limits. For CI, prefer a dedicated project/account and read-only repository token. Model providers can have different retention, training, regional, and enterprise terms even when called through the same harness.

Build a fair repository evaluation

Create a small suite of real tasks rather than one benchmark prompt:

  1. Navigation: explain one request path with correct file evidence and no edits.
  2. Bug fix: reproduce a known defect, add a test, implement the smallest correction.
  3. Review: find seeded correctness, security, and concurrency issues without editing.
  4. Frontend: implement a bounded UI change and pass desktop/mobile visual checks.
  5. Long task: complete a multi-stage refactor under a fixed time and token budget.
  6. Recovery: resume after a failed tool call, compaction, or interrupted session.

Freeze these variables:

  • repository commit and clean worktree;
  • harness and plugin versions;
  • system/project instructions;
  • allowed tools and sandbox policy;
  • model identifier, effort, temperature, and region;
  • time, token, dollar, and turn limits;
  • acceptance commands and human rubric.

Run each condition more than once because agent outcomes vary. Never let two conditions edit the same worktree.

Measure what “works well” actually means

Use outcome metrics:

  • accepted completion rate;
  • focused and full test pass rate;
  • correctness of cited files and commands;
  • number of reviewer corrections;
  • unintended files or scope violations;
  • regression and revert rate;
  • wall-clock time and time to first useful action;
  • input, cached, reasoning, and output tokens;
  • provider cost and rate-limit failures;
  • recovery after interruption or compaction.

Separate model failure from harness failure. A malformed tool call may be model-side; a lost image, truncated diff, bad approval parse, or broken thinking-block adapter may be client-side. Save redacted request metadata, harness logs, tool traces, and the final diff so you can diagnose the layer.

Match model to task instead of choosing one winner

Use a routing policy after the evaluation:

  • a fast, inexpensive model for search, formatting, and deterministic maintenance;
  • a stronger model for planning, architectural change, or subtle debugging;
  • a code-specialized model for focused generation and review when it wins your suite;
  • a long-horizon model for goal loops only when progress checks and budgets are enforced;
  • a multimodal model for screenshot or UI tasks only when the harness correctly forwards images.

Qwen Code supports direct /model switching and model tiers for subagents. ZCode exposes effort and execution controls around GLM-5.2. Keep the coordinator on the model that best integrates evidence and use cheaper child models only for independently verifiable work.

Common mistakes

Using an approximate model name: qwen3.8-max-preview, glm-5.2, and deepseek-v4-flash are the identifiers covered here. Confirm them live.

Calling every compatible endpoint “open”: open protocol, open-source client, open weights, and permissive license are separate claims. GLM-5.2 has an MIT model release; verify exact licenses for every other artifact.

Trusting the context-window number: a 1M limit does not mean 1M tokens of noisy repository data improve results. Retrieval, summaries, and tool-output caps still matter.

Comparing different harness permissions: a model allowed to edit and run tests will appear more capable than one limited to read-only inspection.

Using vendor benchmarks as production acceptance: benchmark scores help shortlist candidates. Your repository tests decide readiness.

Keeping retired DeepSeek aliases: deepseek-chat and deepseek-reasoner have passed their official discontinuation date. Migrate and verify behavior.

Frequently asked questions

Is Qwen3.8 better than GLM-5.2 or DeepSeek-V4?

There is no universal answer. Qwen3.8-Max Preview is a current Qwen/ModelStudio candidate, GLM-5.2 emphasizes long-horizon work and offers an MIT release, and DeepSeek-V4-Flash has a current public-beta API. Test task quality, tool reliability, cost, and recovery in your harness.

Can I use all three in Qwen Code?

Qwen Code documents qwen3.8-max-preview through Token Plan and includes built-in Z.AI and DeepSeek provider flows. Exact model availability depends on account, plan, and region; confirm with /auth and /model.

Can Codex or Claude Code use these models?

Do not assume so. Codex and Claude Code are proprietary agent ecosystems with documented model choices. Use an explicitly provider-flexible harness when third-party model routing is the requirement.

Which one should I try first?

If you already use Qwen Code, compare Qwen3.8-Max Preview with DeepSeek-V4-Flash on a frozen task, then run GLM-5.2 in both Qwen Code and ZCode. That gives you a useful model-versus-harness comparison.

Source notes

Reviewed on August 6, 2026:

#Qwen3.8#GLM-5.2#DeepSeek-V4#Coding Models#AI Coding Agent#Qwen Code#OpenCode#ZCode

Related Posts

Ready to Start Your AI Project?

Get in touch with our team to discuss how we can help your business.