Aller au contenu
Skillpedia
Agents394k · #10

add-model-provider

Ce qu’il fait

Elle guide un agent IA pour connecter un nouveau fournisseur de modèles à OpenClaw à l'aide de commandes de configuration, plutôt que de modifier des fichiers à la main. Elle s'adresse aux personnes qui veulent utiliser un autre modèle IA dans leur installation OpenClaw.

Quand l’utiliser

  • ✓Quand vous voulez connecter un nouveau fournisseur de modèles IA à votre installation OpenClaw.
  • ✓Lorsque vous devez vérifier quels modèles et méthodes de connexion sont déjà configurés dans OpenClaw.
  • ✓Quand vous voulez un test en direct pour confirmer qu'un nouveau fournisseur fonctionne avant de vous y fier.

Lien du skill

https://github.com/openclaw/openclaw/blob/main/custodian-skills/add-model-provider/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/openclaw/openclaw/blob/main/custodian-skills/add-model-provider/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Aide-moi à ajouter un nouveau fournisseur de modèles IA à mon OpenClaw et à vérifier qu'il répond.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

La skill vérifie vos paramètres de modèle et vos extensions actuels, puis ajoute le fournisseur avec les propres commandes d'OpenClaw. Les clés sont enregistrées comme références vers une source secrète, et non en texte brut, et la configuration se termine par un test en direct.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Add a model provider

Never print or persist secret values; credentials enter config only as SecretRefs (env or file source). Never hand-edit config files on disk — every mutation goes through openclaw config so it is validated and audited. Every run ends with the observable Prove result or an exact explanation of why it could not be proven.

In-session config_set/config_set_ref tool actions are policy-blocked for models.* and secrets.*; use the trusted shell (exec) for the commands below. set_default_model is the one in-session action allowed to change the default route — it live-tests before saving.

Gather

openclaw config get models --json          # "Config path not found" is normal before first setup
openclaw models list --agent <agentId>     # --agent is required in multi-agent rosters
openclaw models auth list --agent <agentId>
openclaw config schema --json | jq '.properties.models'   # confirm exact provider paths before writing
openclaw plugins list   # OpenAI routes need the codex harness plugin; enable/install NOW, not mid-proof

If the harness plugin for the target provider is missing or disabled, remediate here (openclaw plugins enable codex or openclaw plugins install @openclaw/codex) so the Prove step does not stall on it later; plugin enable is picked up by gateway hot-reload.

Decide the auth contract: API-key providers take a SecretRef on models.providers.<id>.apiKey; subscription/OAuth providers (ChatGPT/Codex, Claude subscriptions) use openclaw models auth login --provider <id> instead and must not be given an API key path.

Mutate

API-key example (OpenAI), key staged by the operator in a 0600 file — validate first with --dry-run, then write:

openclaw config set secrets.providers.openai_key_file --provider-source file --provider-path /path/to/openai.key --provider-mode singleValue --dry-run
openclaw config set secrets.providers.openai_key_file --provider-source file --provider-path /path/to/openai.key --provider-mode singleValue
openclaw config set models.providers.openai.apiKey --ref-provider openai_key_file --ref-source file --ref-id value

Env-var alternative when the gateway process env carries the key:

openclaw config set models.providers.openai.apiKey --ref-provider default --ref-source env --ref-id OPENAI_API_KEY

To change a default model, use the in-session set_default_model action (with agentId for a non-default agent); it live-tests the route before saving. Do not change defaults with raw config writes.

Repair

openclaw doctor --lint

doctor --lint can exit 1 for findings: read the report and continue the remaining checks. Ordinary doctor and doctor --non-interactive can write config/state; do not use them for diagnosis before approval. If a repair is needed, get explicit approval, run openclaw doctor --fix --non-interactive, then re-run the Gather reads.

Prove

Roster-safe test (works in every setup; use your own agent id or any configured agent):

openclaw agent --agent <agentId> --model openai/gpt-5.4 -m "Reply with exactly: PROVIDER-PROOF-OK"

Single-agent installs can use the lighter completion test instead — it has no --agent flag and fails with "no explicit owner" on multi-agent rosters, so do not retry it there:

openclaw infer model run --gateway --model openai/gpt-5.4 --prompt "Reply with exactly: PROVIDER-PROOF-OK"

Expect the exact requested reply; record model id and wall time. Known dependency: OpenAI routes need the codex harness plugin at runtime — if the test reports the runtime unavailable, run openclaw plugins install @openclaw/codex and restart the gateway, then test again.

Report

State the provider added, the SecretRef path written (never the value), the test result with model id and latency, and whether the default model changed. If the test failed, report the exact error and the next command to try.

Further reference: https://docs.openclaw.ai/providers/models and https://docs.openclaw.ai/providers/openai

Questions fréquentes

Ma clé API sera-t-elle enregistrée en texte brut ?

Non. La skill enregistre les identifiants sous forme de références vers une variable d'environnement ou un fichier, de sorte que la valeur secrète n'est pas écrite dans la configuration.

Pourquoi utiliser des commandes plutôt que modifier le fichier de configuration ?

Les commandes vérifient chaque modification et conservent une trace d'audit, ce qui aide à éviter des paramètres cassés.

Que se passe-t-il si une extension requise manque ?

La skill la vérifie pendant la configuration et active ou installe l'extension nécessaire avant le lancement du test.

Détails

Description originale de l’auteur

Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.

repo: openclaw/openclaw

Popularité

Étoiles GitHub
394k
Position au classement
#10
Licence
MIT
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires