· 8 min read
Z.ai GLM-5.2 Official Non-Quantized Docs: Coding Agent Support for Claude Code, OpenCode, Cline, and ZCode
By Q. Iyer
- guides
Z.ai GLM-5.2 official docs confirm support for the coding agents in this query: Claude Code, OpenCode, Cline, and ZCode. The official non-quantized GLM-5.2 download is the BF16 repository; Z.ai also publishes an FP8 repository, while its API and Coding Plan documentation identifies the model and endpoints but does not promise that hosted requests run on one specific weight precision.
That distinction matters. “Supported” can mean a tool has a documented provider integration, a custom endpoint configuration, or a first-party agent built around the model. It does not necessarily mean every tool exposes every GLM-5.2 feature in the same way, nor that an API call is using the same artifacts you would download and serve yourself.
Which coding agents officially support Z.ai GLM-5.2?
The clean answer is yes for all four, with different levels of integration. Z.ai’s GLM Coding Plan overview explicitly says the plan can be used with Claude Code, Cline, and OpenCode, and lists GLM-5.2 among the models included in every plan tier. Its supported-tools page also lists Claude Code, OpenCode, ZCode, and Cline as officially supported coding-agent environments.
- Claude Code: supported through Z.ai’s Anthropic-compatible endpoint and documented model mapping. GLM-5.2 can be selected with the
glm-5.2orglm-5.2[1m]model identifier. - OpenCode: supported through its Z.ai or Z.ai Coding Plan provider login. The setup page’s example still names GLM-4.7, so treat that example as an authentication walkthrough rather than proof that GLM-4.7 is the newest selectable model.
- ZCode: the first-party, desktop Agentic Development Environment from Z.ai, built specifically around GLM-5.2 workflows.
- Cline: supported through the OpenAI-compatible coding endpoint with a custom model name of
glm-5.2and a 1,000,000-token context-window setting.
For a developer evaluating compatibility, this means that Claude Code and Cline are protocol integrations, OpenCode has a provider integration, and ZCode is the native product integration. Those categories are more useful than a generic “works with” badge because they tell you where model selection, context sizing, and provider credentials are configured.
How do you configure GLM-5.2 in Claude Code?
Claude Code uses Z.ai’s Anthropic-compatible endpoint: https://api.z.ai/api/anthropic. After creating a Z.ai API key and enabling a GLM Coding Plan, Z.ai’s current model-switching guide says to update the Claude Code settings file so the Sonnet and Opus model variables point to glm-5.2[1m]. The [1m] suffix enables the documented one-million-token context mode; the guide also sets CLAUDE_CODE_AUTO_COMPACT_WINDOW to 1000000.
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "your_zai_api_key",
"ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-5.2[1m]",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-5.2[1m]",
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "1000000"
}
}Restart the terminal after changing configuration, launch Claude Code, and use /status to verify the effective model. Z.ai also documents its effort mapping: Claude Code’s low, medium, and high selections map to GLM-5.2 high effort; xhigh, max, and ultracode map to GLM-5.2 max effort. That is useful context when comparing latency or token consumption across runs: a model-name swap alone does not guarantee equivalent reasoning settings.
How do you use GLM-5.2 with OpenCode?
OpenCode’s official Z.ai setup starts with opencode auth login. Select either “Z.AI” for API-key access or “Z.AI Coding Plan” when using the subscription, enter the Z.ai key, then start OpenCode and use /models to choose an available model. Z.ai’s OpenCode page illustrates that flow with GLM-4.7, but the newer Coding Plan overview says GLM-5.2 is available to all plan tiers and the supported-tools page includes OpenCode.
opencode auth login
# Select: Z.AI Coding Plan
# Paste your Z.ai API key
opencode
/modelsThe practical takeaway is not to copy an older example model name blindly. Authenticate with the Coding Plan provider, inspect the current model picker, and select GLM-5.2 if it is exposed to your account. If you are configuring a tool manually rather than using its provider integration, Z.ai separates the protocols: use the Anthropic endpoint for Anthropic Messages clients and https://api.z.ai/api/coding/paas/v4 for OpenAI Chat Completions-compatible clients. The general Z.ai API endpoint is not interchangeable with the Coding Plan endpoint.
What is ZCode, and is it the best-supported GLM-5.2 option?
ZCode is Z.ai’s own Agentic Development Environment, not merely a provider preset for another editor. Its documentation describes a desktop workspace in which the ZCode Agent holds goals, files, terminal results, browser context, execution modes, and Git state together for long-running work. It is explicitly built to put GLM-5.2’s long context and long-horizon task behavior into planning, coding, review, and iteration.
That makes ZCode the most direct answer if your priority is trying the vendor’s intended agent harness. It includes permission and confirmation flows around sensitive commands and file changes, and it exposes model effort levels for GLM-5.2. It is not automatically the right choice for every team: adopting it also means adopting a distinct desktop workflow. Engineers already standardized on a terminal agent or an editor extension may reasonably prefer the protocol integrations instead.
Is there an official non-quantized GLM-5.2 model download?
Yes. Z.ai’s official Hugging Face organization publishes zai-org/GLM-5.2, whose repository metadata identifies its tensor types as BF16 and F32. In normal model-distribution language, that is the official non-quantized—or full-precision-for-inference—release readers are looking for. It is separate from zai-org/GLM-5.2-FP8, the official FP8 version.
Do not confuse “BF16” with “small enough to run locally on an ordinary workstation.” The BF16 repository is listed at 753 billion parameters. Before accounting for runtime overhead, a naive two-bytes-per-parameter estimate alone is about 1.5 TB of weight storage; multi-GPU inference, KV cache, and framework overhead add further requirements. The FP8 release cuts the weight precision in half relative to BF16, but it is still a large deployment. In practice, most software engineers will access GLM-5.2 through a hosted endpoint or Coding Plan rather than self-host the official BF16 weights.
Does an API-backed coding agent use the non-quantized model?
You should not claim that without evidence from the operator. The downloadable BF16 checkpoint proves that an official non-quantized release exists. It does not establish the exact runtime weight format behind Z.ai’s API, a Coding Plan, or any third-party endpoint. Providers can serve a model through optimized engines, different precisions, routing layers, caching, or hardware-specific implementations while retaining the same public model identifier.
For an engineering decision, ask the narrower question that actually affects you: do you need reproducible local inference from the official BF16 weights, or do you need a capable hosted coding model through an agent? Choose the former only if control over the artifacts, infrastructure, and serving stack justifies the substantial operational cost. Choose the latter when integration speed, context capacity, and agent workflow are the real constraints.
Which GLM-5.2 setup should you choose?
- Choose Claude Code when you want a terminal-first agent and are comfortable configuring an Anthropic-compatible endpoint and model mapping.
- Choose OpenCode when its Z.ai Coding Plan provider flow fits your existing OpenCode workflow; confirm GLM-5.2 in the live model selector rather than relying on an older documentation screenshot or example.
- Choose ZCode when you want Z.ai’s native desktop agent, integrated task state, and long-horizon workflow features around GLM-5.2.
- Choose the official BF16 weights only when you have a genuine self-hosting requirement and the infrastructure to serve a 753B-parameter model; otherwise use a hosted route.
- Use the Coding Plan endpoint, not the general API endpoint, when your goal is to consume Coding Plan subscription quota.
Finally, test the combination you will actually ship with. Give the agent a representative task: inspect an unfamiliar subsystem, propose a plan, change a few files, run the relevant tests, and explain any remaining uncertainty. A model’s context-window claim and an agent’s tool loop are both necessary, but your repository conventions, test time, permissions, and review practice decide whether the setup is useful.
Using Cline with GLM-5.2
Cline is an open-source coding-agent runtime available in an editor, terminal, and SDK form. For the Z.ai route discussed here, configure its OpenAI-compatible provider with the Coding Plan base URL, your Z.ai API key, custom model glm-5.2, image support disabled, and a 1,000,000-token context window. That makes it a practical option if you want GLM-5.2 while retaining an agent that can plan, make coordinated project edits, run terminal commands, and use MCP-based tools.
The core Cline product is free for individual developers; its site says inference is usage-based or can use your own key, while Enterprise is custom-priced. For developers who want a bundled route instead, ClinePass lists GLM 5.2 among its included open-weight models and is advertised at $4.99 for the first month for a limited time, then $9.99 per month, with possible additional processing fees. See Cline to decide whether its editor, CLI, or SDK workflow is the harness you want for GLM-5.2.
Sources & citations
- [1]Z.ai GLM Coding Plan overview
- [2]Z.ai supported coding-tool integrations and endpoint configuration
- [3]Z.ai guide for switching Claude Code and Cline to GLM-5.2
- [4]Z.ai OpenCode integration guide
- [5]ZCode documentation for GLM-5.2
- [6]Official Z.ai GLM-5.2 BF16 model repository
- [7]Official Z.ai GLM-5.2 FP8 model repository
- [8]Cline pricing
- [9]ClinePass model availability and pricing