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

# Vercel AI Gateway

> Route Roomote model calls through Vercel AI Gateway.

Vercel AI Gateway provides one endpoint for models from multiple vendors, with
centralized usage, budgets, and routing. Use it when your team already manages
AI access through a Vercel team or project.

## Get an API key

Follow Vercel's [AI Gateway authentication guide](https://vercel.com/docs/ai-gateway/authentication)
to create an AI Gateway API key for the intended team. Configure billing or
provider credentials in Vercel as required by the models you plan to use.

## Configuration

Add **Vercel AI Gateway** in **Settings > Models** and paste the key, or set:

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

Roomote exposes supported models under the `vercel/<vendor>/<model>` prefix and
adds a recommended cross-vendor set. Apply the recommended mapping or choose
models individually for each role.

## Cost behavior

Vercel records gateway usage and applies the billing terms, budgets, and
upstream provider pricing configured for the team. Roomote records token usage
and estimates model cost from metadata; Vercel's AI Gateway usage and invoice
are authoritative. See [AI Gateway pricing](https://vercel.com/docs/ai-gateway/pricing).

## Verify setup

1. save `AI_GATEWAY_API_KEY`
2. confirm Vercel models appear in **Settings > Models**
3. enable a model and assign it to the coding role
4. run a small task and confirm it appears in Vercel AI Gateway usage

## Common issues

* **The key is rejected.** Confirm it is an AI Gateway key for the intended
  Vercel team, not an unrelated Vercel access token.
* **A model cannot be routed.** Check model availability, provider credentials,
  budgets, and routing policy in Vercel.
* **A budget blocks tasks.** Raise the applicable Vercel budget or select a model
  and provider route with available capacity.
