Z.AI
Configure zai deployments and understand provider-specific behavior.
Configure a deployment
Send this body to POST /admin/deployments with an operator credential. Replace the example
credentials and choose a model available to your provider account. See
Creating deployments for the shared configuration fields.
{ "publicModel": "glm", "adapterKey": "zai", "upstreamModel": "glm-4.7-flash", "credentials": { "apiKey": "..." } }Behavior and limitations
- Credentials:
apiKeyonly. NobaseUrlneeded — defaults tohttps://api.z.ai/api/paas/v4. - Default transport: Chat Completions.
- Structured outputs: Z.AI documents JSON mode (
response_format: {"type": "json_object"}) with client-side validation, not guaranteed JSON Schema adherence, so no GLM model declaresstructuredOutputsorstrictTools. Ajson_schemaresponse format is rejected withunsupported_model_capabilityrather than downgraded to unvalidated JSON. - Reasoning:
openai_body, with a top-levelthinking: { type: "enabled" | "disabled" }toggle — the same mechanism across every GLM model in the catalog, whether it exposes a full effort ladder or just an on/off switch (levels: ["none", "high"]). See Reasoning. - Catalog:
src/adapters/zai/catalog.json.
Next steps
- Reasoning — the
openai_body/thinkingtoggle in detail. - Creating deployments — the full request shape.