openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
80 lines (58 loc) • 5.74 kB
Markdown
---
summary: "Configuring providers from Settings -> Models, plugin-owned provider behavior, and API key rotation."
read_when:
- You are adding or replacing provider keys in the Control UI
- You want to know what provider plugins own
- You are configuring multiple API keys or rotation
title: "Control UI and API keys"
---
## Configure providers in the Control UI
Open **Settings → Models** in the Control UI to add, replace, or remove provider
API keys. The page and `openclaw models auth paste-api-key` use the same credential
writer: key material stays in the auth store, and configured providers reference
the saved profile. Environment-provided keys remain managed by the Gateway
process environment. The page shows credential sources without revealing keys.
Saving a key and refreshing the catalog are separate outcomes. If refresh fails,
the saved key remains; follow the reported recovery step. Removing a stored key
keeps model defaults and provider connection settings. See
[Auth profiles](/cli/models#auth-profiles) for the matching CLI commands.
Configured global model defaults remain available while provider details load.
Provider and installed-app details keep their initial loading view until
credentials, the model catalog, configuration, and the installed-app inventory
are ready. Usage and local costs load independently afterward, so a slow usage
response does not block provider settings. The AI setup summary stays in place
when model discovery finishes.
Background catalog updates keep the current provider rows and usage visible.
Finishing sign-in updates that provider's credentials without restarting usage
or local-cost loading for the other providers. If another client changes
credentials while the sign-in picker is open, the page reconciles those changes
when you finish, cancel, or close sign-in. Use **Refresh** to explicitly reload all
provider data.
After an account's quota recovers, model availability reflects the recovered account even if a catalog refresh began while it was blocked.
Open **Model Setup** from the page header to inspect detected AI access. When available, it shows the authentication method (API key or account sign-in) and the actual email address reported by the provider or local runtime. API keys and tokens stay hidden.
Use **Test connection** to run a live provider check and see latency or a categorized authentication, rate-limit, billing, timeout, or response error. A check makes a real provider request and may consume a small number of tokens. OAuth and token profiles can also be logged out from the provider card.
The **Defaults** card manages the primary model, utility model, their independent first fallbacks, thinking level, and Fast mode from the configured model catalog. Changes save automatically to the existing `agents.defaults` settings. For the utility model, **Auto** clears the explicit primary while preserving configured utility fallbacks. **Disabled** sets the utility primary to an empty string to turn utility routing off, keeping any configured fallbacks for when you re-enable it.
If model discovery fails, the Defaults card shows the reported error with **Retry**. Your saved model choices remain available while you retry.
Each fallback selector edits the first model in its ordered fallback chain. Replacing it preserves any later fallbacks already configured. A count below the label shows those additional fallbacks. When there is more than one fallback, **No fallback model** shows how many models it will remove when it clears that chain. Use `openclaw models fallbacks` to manage the full main-model list, or edit `agents.defaults.utilityModel.fallbacks` in configuration for the full utility list. Utility fallbacks run independently of the main-model chain.
## Plugin-owned provider behavior
Most provider-specific logic lives in provider plugins (`registerProvider(...)`) while OpenClaw keeps the generic inference loop. Plugins own onboarding, model catalogs, auth env-var mapping, transport/config normalization, tool-schema cleanup, failover classification, OAuth refresh, usage reporting, thinking/reasoning profiles, and more.
The full list of provider-SDK hooks and bundled-plugin examples lives in [Provider plugins](/plugins/sdk-provider-plugins). A provider that needs a totally custom request executor is a separate, deeper extension surface.
<Note>
Provider-owned runner behavior lives on explicit provider hooks such as replay policy, tool-schema normalization, stream wrapping, and transport/request helpers. The legacy `ProviderPlugin.capabilities` static bag is compatibility-only and is no longer read by shared runner logic.
</Note>
## API key rotation
<AccordionGroup>
<Accordion title="Key sources and priority">
Configure multiple keys via:
- `OPENCLAW_LIVE_<PROVIDER>_KEY` (single live override, highest priority)
- `<PROVIDER>_API_KEYS` (comma or semicolon list)
- `<PROVIDER>_API_KEY` (primary key)
- `<PROVIDER>_API_KEY_*` (numbered list, e.g. `<PROVIDER>_API_KEY_1`)
For Google providers, `GOOGLE_API_KEY` is also included as fallback. Key selection order preserves priority and deduplicates values.
</Accordion>
<Accordion title="When rotation kicks in">
- Requests are retried with the next key only on rate-limit responses (for example `429`, `rate_limit`, `quota`, `resource exhausted`, `Too many concurrent requests`, `ThrottlingException`, `concurrency limit reached`, `workers_ai ... quota limit exceeded`, or periodic usage-limit messages).
- Non-rate-limit failures fail immediately; no key rotation is attempted.
- When all candidate keys fail, the final error is returned from the last attempt.
</Accordion>
</AccordionGroup>