FAQ: models and auth
Model- and auth-profile Q&A. For setup, sessions, gateway, channels, and troubleshooting, see the main FAQ.
Models: defaults, selection, aliases, switching
```textagents.defaults.model.primary```
Models are `provider/model` refs (example: `openai/gpt-5.5`,`anthropic/claude-sonnet-4-6`). Always set `provider/model` explicitly. Ifyou omit the provider, RemoteClaw tries an alias match first, then a uniqueconfigured-provider match for that model id, then falls back to theconfigured default provider (deprecated compatibility path). If thatprovider no longer has the configured default model, RemoteClaw falls backto the first configured provider/model instead of a stale default.Route models per agent and use sub-agents to parallelize long tasks (eachsub-agent consumes its own tokens). See [Models](/concepts/models),[Sub-agents](/tools/subagents), [MiniMax](/providers/minimax), and[Local models](/gateway/local-models).- `/model` in chat (per-session, see [Slash commands](/tools/slash-commands))- `remoteclaw models set ...` (updates just model config)- `remoteclaw configure --section model` (interactive)- edit `agents.defaults.model` in `~/.remoteclaw/remoteclaw.json` directly
For RPC edits, inspect with `config.schema.lookup` first (normalizedpath, shallow schema docs, child summaries), then prefer `config.patch`over `config.apply` with a partial object. If you did overwrite config,restore from backup or run `remoteclaw doctor` to repair.
Docs: [Models](/concepts/models), [Configure](/cli/configure),[Config](/cli/config), [Doctor](/gateway/doctor).1. Install Ollama from `https://ollama.com/download`2. Pull a local model, e.g. `ollama pull gemma4`3. For cloud models too, run `ollama signin`4. Run `remoteclaw onboard`, choose `Ollama`, then `Local` or `Cloud + Local`
`Cloud + Local` gives you cloud models plus your local Ollama models;cloud models such as `kimi-k2.5:cloud` need no local pull. To switchmanually: `remoteclaw models list`, then `remoteclaw models set ollama/<model>`.
Smaller/heavily quantized models are more vulnerable to prompt injection.Use large models for any bot with tool access; if you use small modelsanyway, enable sandboxing and strict tool allowlists.
Docs: [Ollama](/providers/ollama), [Local models](/gateway/local-models),[Model providers](/concepts/model-providers), [Security](/gateway/security),[Sandboxing](/gateway/sandboxing).Force a specific auth profile per session with `@profile`:
```text/model opus@anthropic:default/model opus@anthropic:work```
To unpin a profile set with `@profile`, re-run `/model` without thesuffix (e.g. `/model anthropic/claude-opus-4-6`), or pick the default from`/model`. Use `/model status` to confirm the active auth profile.A user-selected `/model` ref is strict for fallback: if thatprovider/model becomes unavailable, the reply fails visibly instead offalling back to `agents.defaults.model.fallbacks`. Configured fallbackchains still apply to configured defaults, cron job primaries, andauto-selected fallback state. When a non-session-override run is allowedto use fallback, RemoteClaw tries the requested provider/model first, thenconfigured fallbacks, then the configured primary — so duplicate baremodel ids never jump straight back to the default provider.
See [Models](/concepts/models) and [Model failover](/concepts/model-failover).- **Native Codex coding agent:** set `agents.defaults.model.primary` to `openai/gpt-5.5`. Sign in with `remoteclaw models auth login --provider openai` for ChatGPT/Codex subscription auth.- **Direct OpenAI API tasks outside the agent loop:** configure `OPENAI_API_KEY` for images, embeddings, speech, realtime, and other non-agent OpenAI API surfaces.- **OpenAI agent API-key auth:** `/model openai/gpt-5.5` with an ordered `openai` API-key profile.- **Sub-agents:** route coding tasks to a Codex-focused agent with its own `openai/gpt-5.5` model.
See [Models](/concepts/models) and [Slash commands](/tools/slash-commands).```json5{ agents: { defaults: { models: { "openai/gpt-5.5": { params: { fastMode: "auto", fastAutoOnSeconds: 30, }, }, }, }, },}```
Fast mode maps to `service_tier = "priority"` on native OpenAI Responsesrequests; existing `service_tier` values are preserved and fast mode doesnot rewrite `reasoning` or `text.verbosity`. Session `/fast` overrides beatconfig defaults.
See [Thinking and fast mode](/tools/thinking) and the Fast mode sectionunder Advanced configuration on the [OpenAI](/providers/openai) providerpage.```textModel "provider/model" is not allowed. Use /models to list providers, or /models <provider> to list models.Add it with: remoteclaw config set agents.defaults.models '{"provider/model":{}}' --strict-json --merge```
Fix: add the exact model to `agents.defaults.models`, add a providerwildcard such as `"provider/*": {}` for dynamic catalogs, remove theallowlist, or pick a model from `/model list`. If the command alsoincluded `--runtime codex`, update the allowlist first, then retry thesame `/model provider/model --runtime codex` command.**Option A: switch per session**
```json5{ env: { MINIMAX_API_KEY: "sk-...", OPENAI_API_KEY: "sk-..." }, agents: { defaults: { model: { primary: "minimax/MiniMax-M3" }, models: { "minimax/MiniMax-M3": { alias: "minimax" }, "openai/gpt-5.5": { alias: "gpt" }, }, }, },}```
Then `/model gpt`.
**Option B: separate agents** — Agent A defaults to MiniMax, Agent Bdefaults to OpenAI; route by agent or use `/agent` to switch.
Docs: [Models](/concepts/models), [Multi-Agent Routing](/concepts/multi-agent),[MiniMax](/providers/minimax), [OpenAI](/providers/openai).| Alias | Resolves to || --- | --- || `opus` | `anthropic/claude-opus-4-8` || `sonnet` | `anthropic/claude-sonnet-4-6` || `gpt` | `openai/gpt-5.4` || `gpt-mini` | `openai/gpt-5.4-mini` || `gpt-nano` | `openai/gpt-5.4-nano` || `gemini` | `google/gemini-3.1-pro-preview` || `gemini-flash` | `google/gemini-3-flash-preview` || `gemini-flash-lite` | `google/gemini-3.1-flash-lite` |
Your own alias with the same name overrides the built-in one.```json5{ agents: { defaults: { model: { primary: "anthropic/claude-opus-4-6" }, models: { "anthropic/claude-opus-4-6": { alias: "opus" }, "anthropic/claude-sonnet-4-6": { alias: "sonnet" }, }, }, },}```
Then `/model sonnet` (or `/<alias>` when supported) resolves to thatmodel id.```json5{ agents: { defaults: { model: { primary: "openrouter/anthropic/claude-sonnet-4-6" }, models: { "openrouter/anthropic/claude-sonnet-4-6": {} }, }, }, env: { OPENROUTER_API_KEY: "sk-or-..." },}```
Z.AI (GLM models):
```json5{ agents: { defaults: { model: { primary: "zai/glm-5.1" }, models: { "zai/glm-5.1": {} }, }, }, env: { ZAI_API_KEY: "..." },}```
Missing provider key for a referenced provider/model raises a runtimeauth error (e.g. `No API key found for provider "zai"`).
**No API key found for provider after adding a new agent**
A new agent has an empty auth store — auth is per-agent, stored at:
```text~/.remoteclaw/agents/<agentId>/agent/auth-profiles.json```
Fix: run `remoteclaw agents add <id>` and configure auth in the wizard, orcopy only portable static `api_key`/`token` profiles from the mainagent's store. For OAuth, sign in from the new agent when it needs itsown account. See [Multi-Agent Routing](/concepts/multi-agent) for thefull `agentDir` reuse and credential-sharing rules — never reuse`agentDir` across agents.Model failover and “All models failed”
1. **Auth profile rotation** within the same provider.2. **Model fallback** to the next model in `agents.defaults.model.fallbacks`.
Cooldowns apply to failing profiles (exponential backoff), so RemoteClawkeeps responding when a provider is rate-limited or temporarily failing.
The rate-limit bucket covers more than plain `429`: `Too many concurrentrequests`, `ThrottlingException`, `concurrency limit reached`, `workers_ai... quota limit exceeded`, `resource exhausted`, and periodicusage-window limits (`weekly/monthly limit reached`) all count asfailover-worthy rate limits.
Billing responses aren't always `402`, and some `402`s stay in thetransient/rate-limit bucket rather than the billing lane. Explicitbilling text on `401`/`403` can still route to billing; provider-specifictext matchers (e.g. OpenRouter `Key limit exceeded`) stay scoped to theirown provider. A `402` that reads like a retryable usage-window ororg/workspace spend limit (`daily limit reached, resets tomorrow`,`organization spending limit exceeded`) is treated as `rate_limit`, not along billing disable.
Context-overflow errors stay off the fallback path entirely — signatureslike `request_too_large`, `input exceeds the maximum number of tokens`,`input token count exceeds the maximum number of input tokens`, `input istoo long for the model`, or `ollama error: context length exceeded` go tocompaction/retry instead of advancing model fallback.
Generic server-error text is narrower than "anything with unknown/errorin it". Provider-scoped transient shapes that do count as failoversignals: Anthropic bare `An unknown error occurred`, OpenRouter bare`Provider returned error`, stop-reason errors like `Unhandled stop reason:error`, JSON `api_error` payloads with transient server text (`internalserver error`, `unknown error, 520`, `upstream error`, `backend error`),and provider-busy errors like `ModelNotReadyException` when the providercontext matches. Generic internal fallback text like `LLM request failedwith an unknown error.` stays conservative and does not trigger fallbackby itself.**Fix checklist:**
- Confirm where profiles live — current: `~/.remoteclaw/agents/<agentId>/agent/auth-profiles.json`; legacy: `~/.remoteclaw/agent/*` (migrated by `remoteclaw doctor`).- Confirm the Gateway loads your env var. `ANTHROPIC_API_KEY` set only in your shell won't reach a Gateway run via systemd/launchd — put it in `~/.remoteclaw/.env` or enable `env.shellEnv`.- Confirm you're editing the right agent — multi-agent setups have multiple `auth-profiles.json` files.- Run `remoteclaw models status` to see configured models and provider auth state.
**For "No credentials found for profile anthropic" (no email suffix):**
The run is pinned to an Anthropic profile the Gateway can't find.
- Use Claude CLI: run `remoteclaw models auth login --provider anthropic --method cli --set-default` on the gateway host.- Prefer an API key instead: put `ANTHROPIC_API_KEY` in `~/.remoteclaw/.env` on the gateway host, then clear any pinned order that forces the missing profile:
```bash remoteclaw models auth order clear --provider anthropic ```
- Remote mode: auth profiles live on the gateway machine, not your laptop — confirm you're running commands there.**LLM request rejected: thinking signature required (Google Antigravity)**
Cause: session history has thinking blocks without signatures (oftenfrom an aborted/partial stream); Google Antigravity requires signatureson thinking blocks. RemoteClaw strips unsigned thinking blocks for GoogleAntigravity Claude; if it still appears, start a new session or set`/thinking off` for that agent.Auth profiles: what they are and how to manage them
Related: /concepts/oauth (OAuth flows, token storage, multi-account patterns)
```text~/.remoteclaw/agents/<agentId>/agent/auth-profiles.json```
Inspect saved profiles without dumping secrets: `remoteclaw models authlist` (optionally `--provider <id>` or `--json`). See[Models CLI](/cli/models#auth-profiles).RemoteClaw may skip a profile in a short **cooldown** (rate limits,timeouts, auth failures) or a longer **disabled** state(billing/insufficient credits). Inspect with `remoteclaw models status--json` and check `auth.unusableProfiles`. Tune with`auth.cooldowns.billingBackoffHours*`. Rate-limit cooldowns can bemodel-scoped — a profile cooling down for one model can still serve asibling model on the same provider; billing/disabled windows block thewhole profile.
Set a per-agent order override (stored in that agent's `auth-state.json`):
```bash# Defaults to the configured default agent (omit --agent)remoteclaw models auth order get --provider anthropic
# Lock rotation to a single profileremoteclaw models auth order set --provider anthropic anthropic:default
# Or set an explicit order (fallback within provider)remoteclaw models auth order set --provider anthropic anthropic:work anthropic:default
# Clear override (fall back to config auth.order / round-robin)remoteclaw models auth order clear --provider anthropic
# Target a specific agentremoteclaw models auth order set --provider anthropic --agent main anthropic:default```
Verify what will actually be tried: `remoteclaw models status --probe`. Astored profile omitted from an explicit order reports`excluded_by_auth_order` instead of being tried silently.The wizard supports Anthropic Claude CLI, OpenAI Codex OAuth, and APIkeys.Related
- FAQ — the main FAQ
- FAQ — quick start and first-run setup
- Model selection
- Model failover