add-model-provider

Configure and live-prove a new model provider for OpenClaw using SecretRefs.

388k|81.5k|Updated Nov 24, 2025
One-click install
npx skills add https://github.com/openclaw/openclaw --skill add-model-provider
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-model-provider
Source: https://github.com/openclaw/openclaw/tree/main/custodian-skills/add-model-provider
Command: npx skills add https://github.com/openclaw/openclaw --skill add-model-provider

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Adding a model provider to OpenClaw requires careful credential handling, validated configuration writes, and a live proof that the route actually works. This Skill enforces a non-interactive, auditable workflow that never exposes secret values and always ends with a verifiable probe result.

Core Features & Use Cases

  • SecretRef-only credential wiring: Stage API keys via file or environment references instead of inline values, keeping secrets out of config and logs.
  • Validated config mutation: All changes go through openclaw config set with --dry-run previews, so schema errors surface before persistence.
  • Live proof of route: Run a roster-safe probe (openclaw agent --agent <id> --model ...) that returns an exact expected string, confirming the provider is reachable end-to-end.
  • Use Case: An operator needs to onboard OpenAI as a new provider for a multi-agent OpenClaw deployment. They stage the key in a 0600 file, write the SecretRef, run the probe, and record the model id and latency as proof.

Quick Start

Add the OpenAI model provider to OpenClaw using a file-based SecretRef and prove the route with a roster-safe probe.

Frequently Asked Questions about add-model-provider

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new model provider to OpenClaw?

Use `openclaw config set models.providers.<id>.apiKey` with a SecretRef pointing to a file or env var, then run a roster-safe probe via `openclaw agent --agent <id> --model <provider/model>` to confirm the route works.

How to configure OpenAI API key in OpenClaw without exposing secrets?

Stage the key in a `0600` file or environment variable, then reference it with `--ref-provider` and `--ref-source file` or `env` flags on `openclaw config set`. Never inline the secret value in config.

Why does the OpenAI model probe fail with runtime unavailable?

OpenAI routes require the codex harness plugin at runtime. Install it with `openclaw plugins install @openclaw/codex`, restart the gateway, and re-run the probe.

Can I change the default model in a multi-agent OpenClaw roster?

Yes, use the in-session `set_default_model` action with the target `agentId`. It live-tests the route before saving, unlike raw config writes which are policy-blocked for `models.*`.

What is the difference between `openclaw agent` and `openclaw infer model run` probes?

`openclaw agent --agent <id>` is roster-safe and works in multi-agent setups. `openclaw infer model run --gateway` is lighter but fails with 'no explicit owner' on multi-agent rosters, so only use it on single-agent installs.