GLM-5.2 in Nethür

Configure Claude Code and other CLI agent harnesses to run GLM-5.2 inside Nethür worktrees.

GLM-5.2 works in Nethür through the agent harness you already use. Configure GLM-5.2 in Claude Code, OpenCode, Cline, Kilo Code, Roo Code, Droid, OpenClaw, or another CLI agent, then launch that agent from Nethür's picker.

Nethür supplies the isolated worktree, terminal panes, browser tab, review flow, and session management. Your Z.ai CodePlan subscription and agent config supply the model access.

Claude Code

Claude Code reads model overrides from ~/.claude/settings.json. To use GLM-5.2 in Nethür:

  1. Open ~/.claude/settings.json.
  2. Add or update the env block below.
  3. Restart Claude Code sessions in Nethür so the new environment is loaded.
  4. Run /status inside Claude Code to confirm the active model.
json
{
  "env": {
    "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "1000000",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-4.5-air",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-5.2[1m]",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-5.2[1m]"
  }
}

Use the [1m] suffix when you want GLM-5.2's 1M context variant, and keep CLAUDE_CODE_AUTO_COMPACT_WINDOW set to 1000000 so Claude Code's compaction window matches that context size. If Claude Code says the [1m] model does not exist, update Claude Code and try again.

For coding tasks, Z.ai recommends setting Claude Code effort to max with /effort. Claude Code's lower effort settings map to GLM-5.2 high effort, while xhigh, max, and ultracode map to GLM-5.2 max effort.

OpenCode, Cline, Kilo Code, Roo Code, and Droid

For agent harnesses that expose an OpenAI-compatible provider:

  1. Open the harness settings outside or inside Nethür.
  2. Choose the OpenAI-compatible provider option, or the Z.ai provider option if the harness has one.
  3. Set the base URL to https://api.z.ai/api/coding/paas/v4.
  4. Add your Z.ai API key.
  5. Set the custom model name to glm-5.2.
  6. Set context window size to 1000000 if the harness exposes that field.
  7. Disable image support unless the harness specifically documents image support for this provider path.

After saving, launch the harness from Nethür's agent picker. Nethür will run the same configured CLI in the selected worktree.

OpenClaw

If OpenClaw cannot select GLM-5.2 directly from its provider model list, add the model manually in ~/.openclaw/openclaw.json.

Add glm-5.2 to models.providers.zai.models:

json
{
  "id": "glm-5.2",
  "name": "GLM-5.2",
  "reasoning": true,
  "input": ["text"],
  "cost": {
    "input": 0,
    "output": 0,
    "cacheRead": 0,
    "cacheWrite": 0
  },
  "contextWindow": 1000000,
  "maxTokens": 131072
}

Then set the default primary model:

json
{
  "model": {
    "primary": "zai/glm-5.2",
    "fallbacks": ["zai/glm-4.7"]
  }
}

And add the model under agents.defaults.models:

json
{
  "models": {
    "zai/glm-5.2": { "alias": "GLM" },
    "zai/glm-4.7": {}
  }
}

Restart the OpenClaw gateway:

bash
openclaw gateway restart

Then launch OpenClaw from Nethür or run openclaw tui in an Nethür terminal to confirm GLM-5.2 is active.

The key rule is simple: configure GLM-5.2 wherever the harness stores provider/model settings, then let Nethür launch that harness in the right worktree.