Skip to main content
Z.ai Coding runs the GLM Coding Plan’s models through the same shared opencode serve process Continuum uses for OpenRouter. It shipped in July 2026 as a connector vendor: no new CLI to install beyond opencode, but its own provider row, its own quota gauge, and its own column in the Usage tab.

Requirements

Two things:
  1. opencode installed. Continuum checks /opt/homebrew/bin, /usr/local/bin, then $PATH.
  2. An active Z.ai GLM Coding Plan API key. A plain Z.ai account key is not enough — the plan is what the quota API answers for.
Add the key either way:
or paste it into Settings → Providers → Z.ai Coding. Both write the same entry into OpenCode’s own credential file at ~/.local/share/opencode/auth.json. Continuum stores no copy of its own.
Inside OpenCode the provider is keyed zai-coding-plan — that’s the id in auth.json and on the wire. Continuum’s own provider id is the shorter zai, which is what you’ll see as the Usage-tab column and the widget key. They are deliberately different; the connector key follows models.dev, the analytics key follows Continuum’s provider registry.

How it integrates

Z.ai Coding sessions are OpenCode sessions. They share the single opencode serve process with every other OpenCode-fronted lane, send prompts over its localhost HTTP API, and consume its Server-Sent Events stream for turn lifecycle. What makes Z.ai a distinct lane rather than a model in the OpenCode list is that its enablement, auth, routing, billing attribution, and color identity are all its own. Sessions appear in the Code tab session list and the Usage tab.
As with the other OpenCode lanes, a live session can’t be switched to or from Z.ai mid-conversation — the serve process has no in-place respawn. Start a new session for the other model.

Models

The bundled catalog ships four GLM Coding Plan models: That list is a fallback. When a key is configured, Continuum live-probes Z.ai’s OpenAI-compatible models endpoint (api.z.ai/api/coding/paas/v4/models), caches the result for a minute, and populates the model picker from it. Any probe failure — no key, network error, non-2xx — falls back to the bundled four rather than emptying the picker.

Effort

No effort dial reaches Z.ai. You choose a model; no reasoning-effort value is passed through the OpenCode transport.

Quota gauge

Z.ai is one of the connector lanes with a real subscription quota, and Continuum polls it directly at api.z.ai/api/monitor/usage/quota/limit. It exposes two windows: a 5-hour rolling window and a weekly window. There is no monthly window, and Continuum never fills an absent window in from its sibling — a fabricated percentage reads as real usage, so an unfetched window shows as absent instead. The gauge distinguishes two failure modes that look identical at the HTTP layer but need different answers from you:
  • Unauthenticated — the key is missing, wrong, or revoked. The gauge offers a reconnect affordance.
  • No active Coding Plan — the key is valid, but the account has no GLM Coding Plan attached. The gauge says exactly that instead of sending you to re-paste a key that was never the problem.
Z.ai’s quota API takes the raw key in the Authorization header, with no Bearer prefix — unusual, and verified against Z.ai’s own tooling. Continuum retries once with Bearer if the raw form is rejected, so a future gateway change won’t silently kill the gauge. The models endpoint above uses the ordinary Bearer convention.

Usage analytics

Z.ai Coding has its own analytics column, so its spend is never buried inside OpenCode’s. Attribution comes from the provider id OpenCode records alongside each completed message, which Continuum maps to the zai column; costs are resolved from the underlying GLM model against the bundled pricing snapshot.
There is a known gap in the live view. OpenCode’s streaming usage events don’t carry a provider id — only its persisted records do. In-flight dollars from an active turn therefore sit under OpenCode until the next time Continuum parses OpenCode’s database, at which point they move to the Z.ai column. Totals settle correctly; the live figure lags.

Multiple accounts

Additional Z.ai accounts are isolated with XDG_DATA_HOME, which points OpenCode at a separate auth.json per account. Because the quota API answers per key, secondary Z.ai accounts do get their own independent usage readings — unlike the other OpenCode lanes.

Where it shows up

Z.ai Coding is a first-class provider on the surfaces that matter and deliberately absent from the ones it can’t support:
  • Yes — Code sessions, the live quota gauge, historical usage, mobile mirroring, and the configurable iOS widget.
  • No — the Mac menu-bar gauge and auto-revive. Neither maps to a connector vendor.

Broadcast

Z.ai Coding can participate in the Chat surface’s multi-provider broadcast mode — one prompt to several providers, answers side by side.
The Chat tab is hidden by default across every client while the product is focused on Code, so broadcast is not reachable from the default UI. See Chat.