最近聊 Claude Code 的人很多,但真正的问题不是“又出了什么新玩法”,而是很多人的工作流突然断了。
我只关心一个更实际的问题:如果 Claude Code 这套工作方式还想继续用,能不能把后端模型换成 GLM-5.2,先把个人项目跑起来?
我先看的不是广告,而是真实测评

图:Entelligence 在 Claude Code harness 里比较 GLM-5.2 和 Claude Opus。
Entelligence 的角度很贴近这个问题:他们不是单纯问模型几道题,而是把 GLM-5.2 和 Claude Opus 放进 Claude Code 的 agentic coding harness 里跑 45 个任务。
他们给出的结果是:45 个任务里,GLM-5.2 和 Opus 都解出 25 个;43/45 个任务上,两者结果一致;GLM-5.2 在开启 prompt caching 后,成本大约是 Opus 的 46%。
Opus 仍然是上限,GLM-5.2 更像成本效率路线

图:Braintrust 对 GLM-5.2 和 Opus 4.8 做长上下文检索评测。
Braintrust 的长上下文检索测评更适合解释两者定位:Opus 的优势是上限,复杂长上下文、细粒度检索、跨文件推理,它更稳。
GLM-5.2 的优势是成本效率。Braintrust 的测评里,它在长上下文任务上接近 Opus,但平均成本低了约 76-78%。
所以我不会说“GLM-5.2 平替 Opus”。更准确的说法是:Opus 是上限模型,GLM-5.2 是把大量日常 Claude Code 工作流重新跑起来的成本效率模型。
安全和代码任务里,GLM-5.2 也不是低配玩具

图:Semgrep 在安全任务 benchmark 中测试 GLM-5.2。
Semgrep 的测评偏安全任务。他们用 IDOR benchmark 测模型,GLM-5.2 在 prompt-only 方式下拿到 39% F1,超过他们文中列出的 Claude Code 配置结果。
这里不能简单外推成“GLM-5.2 全面超过 Claude”。Semgrep 自己也强调,benchmark 结果跟 harness、prompt、任务形式关系很大。
但它说明了一件事:国内/开源权重模型已经不是只能做便宜问答。在某些代码推理、安全审查、结构化分析任务里,GLM-5.2 已经有真实公开结果可以参考。
真正要替换的是 Claude Code 的后端模型

图:Anthropic 官方 Claude Code Settings 文档。
Claude Code 的价值不只在模型,还在工作方式:终端里接项目、读文件、推进任务。更接近原工作流的做法,是保留 Claude Code 这个工具形态,把后端模型切到一个 Claude / Anthropic 兼容接口。
|
|
|
|
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
怎么用 GLM-5.2 接 Claude Code
-
确认本地 Claude Code 还能启动。
-
拿到 Claude / Anthropic 兼容的 Base URL、专属 Key、模型名和额度查询页。
-
先跑短任务,比如解释函数、改小脚本、生成配置片段。
-
再跑小项目,让它读一个小目录、定位一个报错、给修改建议。
-
最后才试长上下文任务。
哪些体验我会保留期待,哪些不会
我会期待 GLM-5.2 做日常代码解释、小脚本修改、配置文件生成、报错排查、中文语境下的说明和总结、个人项目里的低成本试错。
我不会期待它完全替代 Opus:超长上下文里保持极高一致性、非常复杂的多步 agent planning、大型代码库全局重构、每一次工具调用都像原生 Claude 一样顺滑。
这不是在说某个接口差,而是在说模型定位不同。Opus 买的是上限和稳定感,GLM-5.2 买的是成本、可用性和国内模型替代路线。
最后说一句很实际的
如果 Claude Code 最近突然不可用,我更建议先把链路跑通:Claude Code 是否还能启动,Base URL 是否填对,Key 是否能用,Model 是否是 glm-5.2,短任务是否能返回,小项目是否能推进。
我把这次查到的公开测评、配置笔记、测试步骤和常见错误整理成了一份小清单。如果你也想自己试一遍,可以私信关键词:Claude Code 备用模型。
先跑通,再决定要不要继续用。

Many people have been chatting about Claude Code recently, but the real issue isn't "what new tricks are out," it's that a lot of people's workflows suddenly broke.
I only care about one more practical question: if we want to keep using Claude Code, can we swap the backend model to GLM-5.2 and get personal projects running first?
I didn't look at ads first; I looked at real reviews.
Chart: Entelligence comparing GLM-5.2 vs. Claude Opus inside the Claude Code harness.
The Entelligence angle fits this question well: they didn't just ask the models a few questions, they put GLM-5.2 and Claude Opus into Claude Code's agentic coding harness and ran 45 tasks.
Their result: out of 45 tasks, both GLM-5.2 and Opus solved 25; on 43/45 tasks, the results were identical; with prompt caching enabled, GLM-5.2 costs about 46% of Opus.
This leads me to judge: GLM-5.2 isn't a lossless replacement for Opus, but it's already good enough to enter the discussion of Claude Code backup models.
Opus is still the ceiling; GLM-5.2 is more of a cost-efficiency path.
Chart: Braintrust doing long-context retrieval evaluation on GLM-5.2 and Opus 4.8.
Braintrust's long-context retrieval evaluation better explains their respective positions: Opus's strength is the ceiling—complex long contexts, fine-grained retrieval, cross-file reasoning, it's more stable.
GLM-5.2's strength is cost efficiency. In Braintrust's evaluation, it approaches Opus on long-context tasks, but costs about 76–78% less on average.
So I wouldn't say "GLM-5.2 is a flat replacement for Opus." More accurately: Opus is the ceiling model; GLM-5.2 is the cost-efficiency model for getting a lot of daily Claude Code workflows running again.
In security and code tasks, GLM-5.2 isn't some low-tier toy either.
Chart: Semgrep testing GLM-5.2 on security task benchmarks.
Semgrep's evaluation leans toward security tasks. They used the IDOR benchmark to test the model; GLM-5.2 achieved 39% F1 in prompt-only mode, surpassing the Claude configuration results listed in their article.
You can't simply extrapolate this as "GLM-5.2 fully surpasses Claude." Semgrep itself emphasizes that benchmark results depend heavily on the harness, prompts, and task formats.
But it does show one thing: domestic/open-source-weight models are no longer just for cheap Q&A. On certain code reasoning, security review, and structured analysis tasks, GLM-5.2 already has real, publicly available results for reference.
What truly needs replacing is Claude Code's backend model.
Chart: Anthropic's official Claude Code Settings documentation.
Claude Code's value isn't just the model; it's also the working approach—connecting to projects in the terminal, reading files, pushing tasks forward. The approach closer to your original workflow is to keep the Claude Code tool shape and switch the backend model to a Claude-/Anthropic-compatible interface.
Field
Purpose
Common Misunderstanding
Base URL
Where requests are sent
Not a magic switch
Key / Token
Who has permission to call
Not a Claude account recovery
Model
Which model the backend actually calls
This is where GLM-5.2 comes in
How to connect GLM-5.2 to Claude Code
Confirm your local Claude Code can still start up.
Get the Claude-/Anthropic-compatible Base URL, dedicated Key, model name, and quota lookup page.
Start with short tasks first, like explaining a function, tweaking a small script, generating config snippets.
Then try small projects—have it read a small directory, locate an error, and suggest fixes.
Only then attempt long-context tasks.
Which experiences will I stay hopeful about, and which won't?
I look forward to using GLM-5.2 for everyday code explanations, small script edits, configuration file generation, error troubleshooting, explanations and summaries in Chinese contexts, and low-cost trial and error in personal projects.
I won't expect it to fully replace Opus: ultra-long contexts requiring extremely high consistency, very complex multi-step agent planning, global refactoring of large codebases, every tool call as smooth as native Claude.
This isn't saying any interface is bad; it's saying the model positioning differs. Opus buys you the ceiling and a sense of stability; GLM-5.2 buys you cost, availability, and a domestic model alternative path.
One final practical remark.
If Claude Code became suddenly unavailable recently, I'd suggest first getting the pipeline running: is Claude Code still starting? Is the Base URL filled in correctly? Can the Key be used? Is the Model set to glm-5.2? Can short tasks return results? Can small projects move forward?
I've compiled the publicly available evaluations, configuration notes, test steps, and common errors I found into a short checklist. If you also want to try it yourself, send the keyword: Claude Code backup model.
Get it running first, then decide whether to keep using it.