Docs: update Z.AI configuration

This commit is contained in:
mneves75
2026-01-06 11:35:47 -03:00
committed by Peter Steinberger
parent 8954f7719c
commit 13c1ce1f05
2 changed files with 26 additions and 0 deletions

View File

@@ -104,3 +104,5 @@ Output
- Update [`docs/configuration.md`](/gateway/configuration) with `agent.models` + `agent.model` + `agent.imageModel`.
- Keep this doc current when CLI surface or scan logic changes.
- Note provider aliases like `z.ai/*` -> `zai/*` when relevant.
- Provider ids in model refs are normalized to lowercase.

View File

@@ -987,6 +987,30 @@ Select the model via `agent.model.primary` (provider/model).
}
```
### Z.AI (GLM-4.7) — provider alias support
Z.AI models are available via the built-in `zai` provider. Set `ZAI_API_KEY`
in your environment and reference the model by provider/model.
```json5
{
agent: {
model: "zai/glm-4.7",
allowedModels: ["zai/glm-4.7"]
}
}
```
Notes:
- `z.ai/*` and `z-ai/*` are accepted aliases and normalize to `zai/*`.
- If `ZAI_API_KEY` is missing, requests to `zai/*` will fail with an auth error at runtime.
- Z.AIs general API endpoint is `https://api.z.ai/api/paas/v4`. The GLM Coding
Plan uses the dedicated Coding endpoint `https://api.z.ai/api/coding/paas/v4`.
The built-in `zai` provider uses the Coding endpoint. If you need the general
endpoint, define a custom provider in `models.providers` with the base URL
override (see the custom providers section above).
- Use a fake placeholder in docs/configs; never commit real API keys.
### Local models (LM Studio) — recommended setup
Best current local setup (what were running): **MiniMax M2.1** on a beefy Mac Studio