mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 23:00:42 +00:00
GLM (docs/providers/glm.md): rewrote against extensions/zai/openclaw.plugin.json.
Removed the duplicate '# GLM models' H1 (Mintlify renders title from
frontmatter; an in-body H1 produces a brittle anchor). Replaced the
two-column model table with a single Notes column covering all 13
bundled refs, including which are reasoning, which accept image input,
and which is the default image model (zai/glm-4.6v from the auto-routing
defaults). Expanded the auth-choice step into a CodeGroup covering all
five onboarding choices (zai-api-key, zai-coding-global, zai-coding-cn,
zai-global, zai-cn) sourced from the plugin manifest's
providerAuthChoices.
Runway (docs/providers/runway.md): expanded the supported-modes table
to cover all seven Runway models from
extensions/runway/video-generation-provider.ts. Text-to-video now lists
veo3, veo3.1, veo3.1_fast alongside gen4.5; image-to-video adds
gen4_turbo, gen3a_turbo, veo3, veo3.1, and veo3.1_fast. Added an
aspect-ratio table covering the documented RUNWAY_TEXT_ASPECT_RATIOS
('16:9'/'9:16') and RUNWAY_EDIT_ASPECT_RATIOS ('1:1'/'16:9'/'9:16'/
'3:4'/'4:3'/'21:9'). Promoted the existing properties table with
plugin/onboarding/CLI flag rows from the manifest.
Vydra (docs/providers/vydra.md): added a properties table sourced from
extensions/vydra/openclaw.plugin.json, including the three
providerAuthContract memberships (image/video/speech) and the
vydra-api-key onboarding choice plus --vydra-api-key direct flag. Kept
the existing Warning about the apex-host redirect intact.
138 lines
6.1 KiB
Markdown
138 lines
6.1 KiB
Markdown
---
|
|
summary: "GLM model family overview and how to use it in OpenClaw"
|
|
read_when:
|
|
- You want GLM models in OpenClaw
|
|
- You need the model naming convention and setup
|
|
title: "GLM (Zhipu)"
|
|
---
|
|
|
|
GLM is a model family (not a company) available through the [Z.AI](https://z.ai) platform. In OpenClaw, GLM models are accessed through the bundled `zai` provider with refs like `zai/glm-5.1`.
|
|
|
|
| Property | Value |
|
|
| ------------------- | --------------------------------------------------------------------------- |
|
|
| Provider id | `zai` |
|
|
| Plugin | bundled, `enabledByDefault: true` |
|
|
| Auth env vars | `ZAI_API_KEY` or `Z_AI_API_KEY` |
|
|
| Onboarding choices | `zai-api-key`, `zai-coding-global`, `zai-coding-cn`, `zai-global`, `zai-cn` |
|
|
| API | OpenAI-compatible |
|
|
| Default base URL | `https://api.z.ai/api/paas/v4` |
|
|
| Suggested default | `zai/glm-5.1` |
|
|
| Default image model | `zai/glm-4.6v` |
|
|
|
|
## Getting started
|
|
|
|
<Steps>
|
|
<Step title="Choose an auth route and run onboarding">
|
|
Pick the onboarding choice that matches your Z.AI plan and region. The generic `zai-api-key` choice auto-detects the matching endpoint from the key shape; use the explicit regional choices when you want to force a specific Coding Plan or general API surface.
|
|
|
|
| Auth choice | Best for |
|
|
| ------------------- | --------------------------------------------------- |
|
|
| `zai-api-key` | Generic API key with endpoint auto-detection |
|
|
| `zai-coding-global` | Coding Plan users (global) |
|
|
| `zai-coding-cn` | Coding Plan users (China region) |
|
|
| `zai-global` | General API (global) |
|
|
| `zai-cn` | General API (China region) |
|
|
|
|
<CodeGroup>
|
|
|
|
```bash Auto-detect
|
|
openclaw onboard --auth-choice zai-api-key
|
|
```
|
|
|
|
```bash Coding Plan (global)
|
|
openclaw onboard --auth-choice zai-coding-global
|
|
```
|
|
|
|
```bash Coding Plan (China)
|
|
openclaw onboard --auth-choice zai-coding-cn
|
|
```
|
|
|
|
```bash General API (global)
|
|
openclaw onboard --auth-choice zai-global
|
|
```
|
|
|
|
```bash General API (China)
|
|
openclaw onboard --auth-choice zai-cn
|
|
```
|
|
|
|
</CodeGroup>
|
|
|
|
</Step>
|
|
<Step title="Set GLM as the default model">
|
|
```bash
|
|
openclaw config set agents.defaults.model.primary "zai/glm-5.1"
|
|
```
|
|
</Step>
|
|
<Step title="Verify models are available">
|
|
```bash
|
|
openclaw models list --provider zai
|
|
```
|
|
</Step>
|
|
</Steps>
|
|
|
|
## Config example
|
|
|
|
```json5
|
|
{
|
|
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 shape and apply the correct base URL automatically. Use the explicit regional choices when you want to pin a specific Coding Plan or general API surface.
|
|
</Tip>
|
|
|
|
## Built-in catalog
|
|
|
|
The bundled `zai` provider seeds 13 GLM model refs. All entries support reasoning unless marked otherwise; `glm-5v-turbo` and `glm-4.6v` accept image input as well as text.
|
|
|
|
| Model ref | Notes |
|
|
| -------------------- | -------------------------------------------------- |
|
|
| `zai/glm-5.1` | Default model. Reasoning, text only, 202k context. |
|
|
| `zai/glm-5` | Reasoning, text only, 202k context. |
|
|
| `zai/glm-5-turbo` | Reasoning, text only, 202k context. |
|
|
| `zai/glm-5v-turbo` | Reasoning, text + image, 202k context. |
|
|
| `zai/glm-4.7` | Reasoning, text only, 204k context. |
|
|
| `zai/glm-4.7-flash` | Reasoning, text only, 200k context. |
|
|
| `zai/glm-4.7-flashx` | Reasoning, text only. |
|
|
| `zai/glm-4.6` | Reasoning, text only. |
|
|
| `zai/glm-4.6v` | Reasoning, text + image. Default image model. |
|
|
| `zai/glm-4.5` | Reasoning, text only. |
|
|
| `zai/glm-4.5-air` | Reasoning, text only. |
|
|
| `zai/glm-4.5-flash` | Reasoning, text only. |
|
|
| `zai/glm-4.5v` | Reasoning, text + image. |
|
|
|
|
<Note>
|
|
GLM versions and availability can change. Run `openclaw models list --provider zai` to see the catalog rows known to your installed version, and check Z.AI's docs for newly added or deprecated models.
|
|
</Note>
|
|
|
|
## Advanced configuration
|
|
|
|
<AccordionGroup>
|
|
<Accordion title="Endpoint auto-detection">
|
|
When you use the `zai-api-key` auth choice, OpenClaw inspects the key shape 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.
|
|
</Accordion>
|
|
|
|
<Accordion title="Provider details">
|
|
GLM models are served by the `zai` runtime provider. For full provider configuration, regional endpoints, and additional capabilities, see the [Z.AI provider page](/providers/zai).
|
|
</Accordion>
|
|
</AccordionGroup>
|
|
|
|
## Related
|
|
|
|
<CardGroup cols={2}>
|
|
<Card title="Z.AI provider" href="/providers/zai" icon="server">
|
|
Full Z.AI provider configuration and regional endpoints.
|
|
</Card>
|
|
<Card title="Model providers" href="/concepts/model-providers" icon="layers">
|
|
Choosing providers, model refs, and failover behavior.
|
|
</Card>
|
|
<Card title="Thinking modes" href="/tools/thinking" icon="brain">
|
|
`/think` levels for the reasoning-capable GLM family.
|
|
</Card>
|
|
<Card title="Models FAQ" href="/help/faq-models" icon="circle-question">
|
|
Auth profiles, switching models, and resolving "no profile" errors.
|
|
</Card>
|
|
</CardGroup>
|