GLM-5.2 for OpenClaw, Hermes, Pi and Kiro
Independent research — not an official Z.ai publication.Identity and provider disclosure
OpenClaw 2026.7.1-2 and Hermes Agent 0.19.0 completed GLM-5.2 response and tool probes through both Coding Plan and pay-as-you-go API access. Pi 0.82.1 completed the metered route but remains outside the current Coding Plan support list. Kiro CLI 2.14.2 could select only a Kiro-served model in its custom-agent schema; it could not express either external Z.ai route.
This page covers both requested scenarios for all four tools, including the cases where the correct setup instruction is “do not send the request.” It is aimed at broader agent runtimes, not only coding CLIs. Start them in a disposable, least-privilege environment before allowing shell, browser, messaging, or credential tools.
In this guide
Section titled “In this guide”- Compare all eight route outcomes
- Configure OpenClaw
- Configure Hermes Agent
- Configure Pi coding agent
- Understand the Kiro limitation
- Reproduce the response and tool evidence
- Troubleshoot provider and policy failures
- Sources and reproducibility boundary
Compare all eight route outcomes
Section titled “Compare all eight route outcomes”| Client | Coding Plan | Pay-as-you-go API | Tool evidence |
|---|---|---|---|
OpenClaw 2026.7.1-2 (0790d9f) |
Pass, OPENCLAW_PLAN_OK, 11,707 ms |
Pass, OPENCLAW_PAYGO_OK, 10,179 ms |
read returned the sentinel |
Hermes Agent 0.19.0 / 2026.7.20 (3ef6bbd…) |
Pass, HERMES_PLAN_OK, 14,701 ms |
Pass, HERMES_PAYGO_OK, 13,226 ms |
terminal tool returned the sentinel |
| Pi coding agent 0.82.1 | Policy-blocked, config parsed offline | Pass, PI_PAYGO_OK, 2,507 ms |
read passed on metered API |
| Kiro CLI 2.14.2 | Unsupported, no request | Unsupported, no request | Not applicable |
OpenClaw’s plan response reported 13,650 input tokens and its tool run reached 22,318 tokens on the final call because the runtime bootstrapped a workspace and supplied a large default prompt/tool schema. Pi’s metered response reported 380 input and 6 output tokens. Those are client-overhead observations, not a fair model-token benchmark.
Configure OpenClaw
Section titled “Configure OpenClaw”OpenClaw uses a provider catalog plus an agent default model. The two complete files below keep distinct provider IDs, which makes the commercial route visible in logs and avoids a stale merged endpoint.
OpenClaw with Coding Plan
Section titled “OpenClaw with Coding Plan”{ "agents": { "defaults": { "model": { "primary": "zai-plan/glm-5.2" }, "models": { "zai-plan/glm-5.2": { "alias": "GLM-5.2 Coding Plan", "params": { "extra_body": { "thinking": { "type": "disabled" } } } } }, "timeoutSeconds": 300 } }, "models": { "mode": "merge", "providers": { "zai-plan": { "baseUrl": "https://api.z.ai/api/coding/paas/v4", "apiKey": "${ZAI_API_KEY}", "api": "openai-completions", "timeoutSeconds": 300, "models": [{ "id": "glm-5.2", "name": "GLM-5.2 via Coding Plan", "reasoning": true, "input": ["text"], "contextWindow": 1048576, "maxTokens": 131072 }] } } }}OpenClaw with pay-as-you-go API
Section titled “OpenClaw with pay-as-you-go API”{ "agents": { "defaults": { "model": { "primary": "zai-api/glm-5.2" }, "models": { "zai-api/glm-5.2": { "alias": "GLM-5.2 metered API", "params": { "extra_body": { "thinking": { "type": "disabled" } } } } }, "timeoutSeconds": 300 } }, "models": { "mode": "merge", "providers": { "zai-api": { "baseUrl": "https://api.z.ai/api/paas/v4", "apiKey": "${ZAI_API_KEY}", "api": "openai-completions", "timeoutSeconds": 300, "models": [{ "id": "glm-5.2", "name": "GLM-5.2 via pay-as-you-go API", "reasoning": true, "input": ["text"], "contextWindow": 1048576, "maxTokens": 131072 }] } } }}The test supplied an explicit session key so separate probes did not reuse a previous conversation. Do the same when comparing routes: a shared session can carry cached context, tool state, and instructions across what looks like a clean test.
Configure Hermes Agent
Section titled “Configure Hermes Agent”Hermes Agent accepts a custom Chat Completions provider. The pinned test used release 2026.7.20 and source commit 3ef6bbd201263d354fd83ec55b3c306ded2eb72a.
Hermes with Coding Plan
Section titled “Hermes with Coding Plan”custom_providers: - name: zai-coding-plan base_url: https://api.z.ai/api/coding/paas/v4 key_env: ZAI_API_KEY api_mode: chat_completions model: glm-5.2 context_length: 1048576 extra_body: thinking: type: disabled
model: default: glm-5.2 provider: custom:zai-coding-plan
agent: max_iterations: 2Hermes with pay-as-you-go API
Section titled “Hermes with pay-as-you-go API”custom_providers: - name: zai-paygo base_url: https://api.z.ai/api/paas/v4 key_env: ZAI_API_KEY api_mode: chat_completions model: glm-5.2 context_length: 1048576 extra_body: thinking: type: disabled
model: default: glm-5.2 provider: custom:zai-paygo
agent: max_iterations: 2The two-iteration cap bounded the experiment. Raise autonomy only after a response probe and a harmless terminal read pass. A general agent can call more consequential tools than a code autocomplete client, so provider compatibility is only the first safety gate.
Configure Pi coding agent
Section titled “Configure Pi coding agent”Pi 0.82.1 contains a Z.ai-compatible provider shape. The global metered route completed both probes. However, Z.ai’s current Coding Plan list does not name Pi, so we did not use subscription quota from this client.
Pi with Coding Plan: parse only, do not call
Section titled “Pi with Coding Plan: parse only, do not call”This block documents the evaluated technical shape and the policy stop. It is not a working recommendation:
{ "providers": { "zai-coding-plan-policy-blocked": { "baseUrl": "https://api.z.ai/api/coding/paas/v4", "api": "openai-completions", "apiKey": "$ZAI_API_KEY", "compat": { "supportsDeveloperRole": false, "supportsReasoningEffort": false, "thinkingFormat": "zai" }, "models": [{ "id": "glm-5.2", "name": "GLM-5.2 Coding Plan — Pi is not on the supported list", "reasoning": true, "input": ["text"], "contextWindow": 1048576, "maxTokens": 131072 }] } }}The config parsed offline. No plan request was sent, so it must not be labeled “tested working.”
Pi with pay-as-you-go API
Section titled “Pi with pay-as-you-go API”{ "providers": { "zai-api": { "baseUrl": "https://api.z.ai/api/paas/v4", "api": "openai-completions", "apiKey": "$ZAI_API_KEY", "compat": { "supportsDeveloperRole": false, "supportsReasoningEffort": false, "thinkingFormat": "zai" }, "models": [{ "id": "glm-5.2", "name": "GLM-5.2 via Z.ai metered API", "reasoning": true, "input": ["text"], "contextWindow": 1048576, "maxTokens": 131072 }] } }}The metered response returned PI_PAYGO_OK in 2,507 ms with 380 input and 6 output tokens. Its read tool then returned the fixture token; the first and final calls reported 720 and 789 tokens respectively.
Understand the Kiro limitation
Section titled “Understand the Kiro limitation”Kiro’s custom-agent configuration reference supports a Kiro model selector, prompt, resources, tools, permissions, hooks, and MCP servers. In Kiro CLI 2.14.2, it did not expose an arbitrary model-provider base URL or external API-key field.
The maximum honest diagnostic config was:
{ "name": "glm-5-2-check", "description": "Negative compatibility probe for Kiro CLI 2.14.2", "prompt": "Return a short connection status without changing files.", "tools": ["read"], "model": "glm-5.2"}This selects a model name inside Kiro’s own supported model system; it does not connect Z.ai. The validator requested a Kiro login and did not finish within the bounded 12-second probe. There was no field in which to place either:
- Coding Plan:
https://api.z.ai/api/coding/paas/v4, or - pay-as-you-go:
https://api.z.ai/api/paas/v4.
Therefore both scenarios are unsupported, not merely untested. Do not paste a Z.ai key into an MCP environment and claim the Kiro agent itself is using GLM-5.2; that would configure one tool, not the agent’s primary model.
Reproduce the response and tool evidence
Section titled “Reproduce the response and tool evidence”Use a different token on every run:
printf 'GLM52_TOOL_%s\n' "$(date +%s)" > agent-tool-probe.txtFor OpenClaw, require its read tool and start with a new session key. For Hermes, name the terminal command and limit the iteration count. For Pi, require read on the metered profile. Check the emitted tool event, path, returned content, final response, and error channel—not just exit status.
| Client | Exact response evidence | Tool evidence | What remains unproven |
|---|---|---|---|
| OpenClaw | Both routes returned their route-specific token | read passed |
lean prompts, long-session stability, every channel/tool |
| Hermes | Both routes returned their route-specific token | terminal read passed | higher iteration counts and external extensions |
| Pi | Metered route returned PI_PAYGO_OK |
read passed |
Coding Plan eligibility |
| Kiro | None; no Z.ai call | Not applicable | any direct external provider support |
Delete the fixture and temporary agent workspace after the run. Preserve only sanitized version, config, endpoint class, timestamps, response token, tool event, and error evidence.
Troubleshoot provider and policy failures
Section titled “Troubleshoot provider and policy failures”OpenClaw sends an unexpectedly huge first request
Section titled “OpenClaw sends an unexpectedly huge first request”Inspect bootstrapped workspace files, default instructions, memory, enabled channels, and tool schemas. Our first tool probe ended at 22,318 tokens. A large startup request can consume quota or obscure a simple endpoint test even when no repository is attached.
Hermes or Pi returns a model-format error
Section titled “Hermes or Pi returns a model-format error”Keep api_mode or api on Chat Completions and retain the Z.ai compatibility flags from the pinned config. Start with reasoning disabled or bounded, then add optional fields one at a time. Do not mix a Responses-specific body into these Chat routes.
A plan key works in another client but not Pi
Section titled “A plan key works in another client but not Pi”Stop. The question is not only authentication. Pi is absent from the current supported-tool list, so do not route around the boundary. Use a listed client or ask Z.ai for explicit support.
Kiro accepts the model name but uses a different model
Section titled “Kiro accepts the model name but uses a different model”That is expected from the schema boundary. A name is not a provider connection. Require a configurable endpoint, credential source, protocol, and network evidence before claiming that Kiro itself reached Z.ai.
Plain text works but the tool does not
Section titled “Plain text works but the tool does not”Reduce the agent to one tool and one exact instruction, verify permissions, and inspect arguments. General agents often carry memory, hooks, extensions, or routing logic that can fail after transport has already succeeded.
Sources and reproducibility boundary
Section titled “Sources and reproducibility boundary”Sources checked July 26, 2026:
- Z.ai Coding Plan quick start, other-tools page, and API quick start;
- OpenClaw repository;
- Hermes Agent repository;
- Pi coding-agent package;
- Kiro custom-agent configuration reference.
All runnable probes used disposable non-root Docker environments, pinned packages or commits, read-only root filesystems, and no writable host mount. A pass is one dated compatibility observation. Recheck the supported-tool policy and rerun both access scenarios after any provider or client release.
