add-model-provider
ما الذي تفعله
توجّه هذه المهارة وكيل الذكاء الاصطناعي خطوة بخطوة لربط مزوّد نموذج جديد بـ OpenClaw باستخدام أوامر الإعداد بدلاً من تعديل الملفات يدوياً. وهي مناسبة لمن يريد تشغيل نموذج ذكاء اصطناعي مختلف في إعداد OpenClaw.
متى تستخدمها
- ✓عندما تريد ربط مزوّد نموذج ذكاء اصطناعي جديد بإعداد OpenClaw الخاص بك.
- ✓عندما تحتاج إلى معرفة النماذج وطرق تسجيل الدخول المُعدّة في OpenClaw.
- ✓عندما تريد اختباراً حياً للتأكد من أن مزوّد النموذج الجديد يعمل قبل الاعتماد عليه.
رابط المهارة
https://github.com/openclaw/openclaw/blob/main/custodian-skills/add-model-provider/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“ساعدني في إضافة مزوّد نموذج ذكاء اصطناعي جديد إلى OpenClaw الخاص بي، واختبر أنه يردّ.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تتحقق المهارة من إعدادات النماذج والإضافات الحالية، ثم تضيف المزوّد بأوامر 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
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
discord-user-post
394kتتيح لوكيلك نشر رسالة وافقت عليها في Discord باسمك عبر تطبيق Discord على سطح المكتب، بعد التأكد من القناة المحددة.
discrawl
394kيتيح لوكيلك البحث في أرشيف محلي محفوظ لرسائل Discord وتلخيصه، والتحقق من مدى حداثته، وقراءة الرسائل المباشرة.
gitcrawl
394kيتيح لوكيلك البحث في أرشيف محفوظ لمشكلات GitHub وطلبات السحب، وتجميع المكرر منها، والتحقق من حالتها الحالية على GitHub.
graincrawl
394kيتيح لوكيلك البحث في ملاحظات اجتماعات Granola المحفوظة ونصوصها، والتحقق من حداثتها، وعدّها خلال فترة محددة.
مهارات مشابهة
using-superpowers
311kيساعد وكيلك على إيجاد المهارات المناسبة واستخدامها قبل بدء أي مهمة، حتى يتبع الخطوات المثبتة لذلك النوع من العمل.
ask-matt
310kيتيح لوكيلك أن يعمل كدليل لمجموعة من مهارات البرمجة، فيوجهك إلى المناسبة لوضعك، من الفكرة حتى الشيفرة المنشورة.
retro
310kيراجع جلسة برمجة مضت ويقترح تغييرات في إعداد المشروع، مثل تنظيم أوضح للتنقل أو فحوص تلقائية، لتسير الجلسات المقبلة بسلاسة أكبر.