2026.3.8+).Model/Auth, choose Skip if you only want the base install first.~/.openclaw, including openclaw.json, the default workspace, and the per-agent directories under ~/.openclaw/agents/.~/.openclaw/.env:COMETAPI_KEY through your shell, service manager, or another secrets workflow, keep doing that. The config below uses ${COMETAPI_KEY} so the key never needs to be hardcoded into openclaw.json.~/.openclaw/openclaw.json and merge in the following fields:| Provider | API Format | Base URL |
|---|---|---|
cometapi-openai | openai-completions | https://api.cometapi.com/v1 |
cometapi-claude | anthropic-messages | https://api.cometapi.com |
cometapi-google | google-generative-ai | https://api.cometapi.com/v1beta |
provider/model refs.{
agents: {
defaults: {
model: {
primary: "cometapi-claude/claude-sonnet-4-6",
},
},
},
models: {
mode: "merge",
providers: {
"cometapi-openai": {
baseUrl: "https://api.cometapi.com/v1",
apiKey: "${COMETAPI_KEY}",
api: "openai-completions",
models: [{ id: "gpt-5.4", name: "GPT-5.4" }],
},
"cometapi-claude": {
baseUrl: "https://api.cometapi.com",
apiKey: "${COMETAPI_KEY}",
api: "anthropic-messages",
models: [{ id: "claude-sonnet-4-6", name: "Claude Sonnet 4.6" }],
},
"cometapi-google": {
baseUrl: "https://api.cometapi.com/v1beta",
apiKey: "${COMETAPI_KEY}",
api: "google-generative-ai",
models: [{ id: "gemini-3.1-pro-preview", name: "Gemini 3.1 Pro" }],
},
},
},
}~/.openclaw/openclaw.json as the config source you edit.models.json under ~/.openclaw/agents/<agentId>/.auth-profiles.json. The provider key is resolved from models.providers.*.apiKey via ${COMETAPI_KEY}.auth-profiles.json is only needed if you want stored per-profile secrets or rotation across multiple credentials.gpt-5.4, claude-sonnet-4-6, and gemini-3.1-pro-preview.provider/model string everywhere so the configured model stays explicit.~/.openclaw/.env or changing provider config:openclaw models status resolves the primary model to cometapi-claude/claude-sonnet-4-6 and does not show missing auth for the CometAPI providers.openclaw models list --provider cometapi-claude lists the configured CometAPI models.openclaw doctor does not report config schema errors or missing auth for the CometAPI providers. It may still warn about unrelated local issues such as permissions, legacy services, or optional embedding providers.~/.openclaw, then rerun onboarding before applying the CometAPI config again. This deletes local config, sessions, logs, auth state, and the default workspace.