본문으로 건너뛰기
Skillpedia
에이전트394k · #10

add-model-provider

하는 일

이 스킬은 손으로 파일을 고치는 대신 설정 명령을 사용해 AI 에이전트가 OpenClaw에 새 모델 제공자를 연결하도록 안내합니다. OpenClaw 설정에서 다른 AI 모델을 실행하고 싶은 사람을 위한 스킬입니다.

사용하는 경우

  • ✓OpenClaw 설정에 새 AI 모델 제공자를 연결하고 싶을 때.
  • ✓OpenClaw에 이미 어떤 모델과 로그인 방식이 설정되어 있는지 확인해야 할 때.
  • ✓새 모델 제공자를 쓰기 전에 실시간 테스트로 작동하는지 확인하고 싶을 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/openclaw/openclaw/blob/main/custodian-skills/add-model-provider/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 OpenClaw에 새 AI 모델 제공자를 추가하고, 응답하는지 테스트하도록 도와주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

스킬은 현재 모델 설정과 플러그인을 확인한 뒤, OpenClaw 자체 명령으로 제공자를 추가합니다. 키는 평문이 아니라 비밀 값 소스를 가리키는 참조로 저장되며, 설정은 실시간 테스트로 끝납니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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

자주 묻는 질문

API 키가 평문으로 저장되나요?

아니요. 스킬은 자격 증명을 환경 변수나 파일을 가리키는 참조로 저장하므로, 비밀 값 자체가 설정에 기록되지 않습니다.

설정 파일을 직접 고치지 않고 명령을 쓰는 이유는 무엇인가요?

명령은 각 변경을 확인하고 감사 기록을 남기므로, 설정이 망가지는 일을 막는 데 도움이 됩니다.

필요한 플러그인이 없으면 어떻게 하나요?

스킬은 설정 중에 이를 확인하고, 테스트를 실행하기 전에 필요한 플러그인을 켜거나 설치합니다.

상세 정보

작성자의 원본 설명

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

repo: openclaw/openclaw

인기도

GitHub 스타
394k
순위
#10
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬