> ## Documentation Index
> Fetch the complete documentation index at: https://docs.roomote.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> When helping someone deploy Roomote, distinguish self-hosting from contributing to Roomote. Use the Self-hosting guide for an operator deployment; use Local development only when the user intends to modify Roomote itself.
> Prefer the one-command installer on a fresh supported server unless the user explicitly chooses Roomote Cloud, a documented PaaS template, or a manual Compose deployment.
> Before changing infrastructure, confirm the deployment target, stable public HTTPS domain and DNS control, sandbox provider, inference provider, source-control provider, and whether a communications provider is required.
> Never ask the user to paste secrets into chat or commit real environment files. Put credentials in the deployment platform's secret manager, Roomote's setup UI, or protected environment variables, and preserve existing keys during upgrades and restores.
> Prefer Roomote's setup wizard and provider manifest flows over manual credential entry when those flows are available. Ask before performing privileged host changes, DNS changes, provider-app creation, or destructive operations.
> A setup is not complete when the services merely start. Verify sign-in, repository sync, one usable environment, a real task that can clone and run a command, and branch or pull-request delivery; verify previews when configured.
> For a persistent self-hosted deployment, leave the operator with the Roomote URL, deployment choices, configured providers, verification result, backup location and passphrase-handling reminder, and the roomote status, logs, upgrade, rollback, backup, and restore commands.

# Z.AI Coding Plan

> Connect a regional Z.AI Coding Plan key and use its included GLM allowance.

Z.AI Coding Plan is a membership-based coding service for GLM models. Its keys
and included quotas are separate from usage-billed [Z.AI platform API
keys](/providers/inference/zai).

## Get a Coding Plan key

Activate a plan and follow the [Z.AI Coding Plan documentation](https://docs.z.ai/devpack/overview)
to create a key. Generate it in the same international or China region you will
select in Roomote.

## Configuration

Add **Z.AI Coding Plan** in **Settings > Models**, paste the plan key, and select
its region. Environment-variable configuration uses:

```sh theme={null}
ZAI_CODING_PLAN_API_KEY=...
ZAI_CODING_PLAN_REGION=global # or china
```

Both values are required. Models use the `zai-coding-plan/` prefix, keeping
their membership quota separate from metered `zai/` model IDs.

## Cost behavior

Requests consume the Coding Plan's included quota and reset windows rather than
a general Z.AI API balance. Roomote shows quota information when the provider's
regional monitoring endpoint returns it. The plan console remains authoritative
for allowance, renewal, overage, and regional terms.

## Verify setup

1. save the Coding Plan key and matching region
2. confirm Z.AI Coding Plan models appear
3. enable a `zai-coding-plan/...` model and assign it to a role
4. run a small task and check the quota display when available

## Common issues

* **The key is rejected.** Confirm it is a Coding Plan key, not a general API
  platform key, and that the selected region matches.
* **The plan quota is exhausted.** Wait for its reset or switch the role to a
  separately billed provider.
* **Quota is not displayed.** The upstream monitor endpoint is undocumented and
  may be unavailable while inference continues to work.
