Bifrost

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: apiKey only. No baseUrl needed — defaults to https://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 declares structuredOutputs or strictTools. A json_schema response format is rejected with unsupported_model_capability rather than downgraded to unvalidated JSON.
  • Reasoning: openai_body, with a top-level thinking: { 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

On this page