OpenClaw Reference (Mirrored)

GLM models

Mirrored from OpenClaw (MIT)
This mirror is provided for convenience. OpenClawdBots is not affiliated with or endorsed by OpenClaw.

GLM models

GLM is a model family (not a company) available through the Z.AI platform. In OpenClaw, GLM models are accessed via the zai provider and model IDs like zai/glm-5.

Getting started

  1. Choose an auth route and run onboarding

    Pick the onboarding choice that matches your Z.AI plan and region:

    Auth choiceBest for
    zai-api-keyGeneric API-key setup with endpoint auto-detection
    zai-coding-globalCoding Plan users (global)
    zai-coding-cnCoding Plan users (China region)
    zai-globalGeneral API (global)
    zai-cnGeneral API (China region)
    # Example: generic auto-detect
    openclaw onboard --auth-choice zai-api-key
    
    # Example: Coding Plan global
    openclaw onboard --auth-choice zai-coding-global
    
  2. Set GLM as the default model
    openclaw config set agents.defaults.model.primary "zai/glm-5.1"
    
  3. Verify models are available
    openclaw models list --provider zai
    

Config example

{
  env: { ZAI_API_KEY: "sk-..." },
  agents: { defaults: { model: { primary: "zai/glm-5.1" } } },
}
TIP

zai-api-key lets OpenClaw detect the matching Z.AI endpoint from the key and apply the correct base URL automatically. Use the explicit regional choices when you want to force a specific Coding Plan or general API surface.

Bundled GLM models

OpenClaw currently seeds the bundled zai provider with these GLM refs:

ModelModel
glm-5.1glm-4.7
glm-5glm-4.7-flash
glm-5-turboglm-4.7-flashx
glm-5v-turboglm-4.6
glm-4.5glm-4.6v
glm-4.5-air
glm-4.5-flash
glm-4.5v
NOTE

The default bundled model ref is zai/glm-5.1. GLM versions and availability can change; check Z.AI's docs for the latest.

Advanced notes

Endpoint auto-detection

When you use the zai-api-key auth choice, OpenClaw inspects the key format to determine the correct Z.AI base URL. Explicit regional choices (zai-coding-global, zai-coding-cn, zai-global, zai-cn) override auto-detection and pin the endpoint directly.

Provider details

GLM models are served by the zai runtime provider. For full provider configuration, regional endpoints, and additional capabilities, see Z.AI provider docs.