glm-5.2 支持该能力。完整列表和价格请参考 模型广场。
配置
请先在 API 密钥 页面创建 API Key。- 单击侧边栏中的 Roo Code 图标,然后打开 Settings (⚙️) → Providers。
- 在 API Provider 下选择 OpenAI Compatible。
-
填写所需字段。
- 保持 Enable streaming 打开。
- 保持 Enable R1 model parameters 关闭。它只适用于 QWQ 等 R1-style models。
- 可选:在 model settings 下调整 Context Window 和 Max Output Tokens,使其与所选模型匹配。 如果 context window 设置超过所选模型的实际值,可能出现 context overflow。
- 保存配置。

验证
切换到 Code mode,给 Roo Code 一个任务,例如 “create test.txt in current folder and write in hello”。Roo Code 会规划任务并请求写入文件。批准操作后,如果正常回复,即表示连接成功。
常见问题
- 一直 thinking,随后报错 / 没有 tool calls:模型不支持原生 tool calling。Roo Code 没有 XML fallback,请切换到支持该能力的模型。
glm-5.2可用。 - 404:Base URL 以
/v1结尾即可,不需要额外路径。
