> ## 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.

# OpenCode Zen

> Use OpenCode's routed Zen model service with Roomote.

OpenCode Zen provides an OpenCode-managed catalog of coding models behind one
account and API key. Use this provider when you want OpenCode routing and
billing rather than separate credentials for each upstream model company.

## Get an API key

Sign in to [OpenCode](https://opencode.ai/) and create or copy an API key for
your Zen account. The account must have an active balance that can use the
selected models.

## Configuration

Add **OpenCode Zen** in **Settings > Models** and paste the key, or set:

```sh theme={null}
OPENCODE_API_KEY=...
```

Roomote exposes routed Zen models under the `opencode/` prefix and adds a recommended
set after connection. The preset can use inexpensive routed models for helper
work and stronger models for coding, planning, vision, and review.

## Cost behavior

OpenCode applies the pricing rules shown for Zen and the routed
model. Roomote records token usage and estimates cost from model metadata, while
the OpenCode account balance and [Zen documentation](https://opencode.ai/docs/zen/)
remain authoritative.

## Verify setup

1. save `OPENCODE_API_KEY`
2. confirm OpenCode models appear in **Settings > Models**
3. apply a preset or assign an `opencode/...` model manually
4. run a small task and confirm it appears in OpenCode usage

## Common issues

* **The key is rejected.** Confirm it is an OpenCode service key rather than a
  key for one of the upstream model vendors.
* **A routed model is unavailable.** Check the model's availability and your
  Zen balance, then select another model from the connected catalog.
* **Costs differ by model.** OpenCode routes multiple vendors; check the exact
  `opencode/...` model rather than assuming one rate for the provider.
