← 返回
未分类 Key 中文

Nvidia Model Config

Add the NVIDIA provider to OpenClaw with SecretRef apiKey (no plaintext in openclaw.json). Documents shell vs systemd gateway env so the key actually resolve...
在 OpenClaw 中添加 NVIDIA provider,使用 SecretRef 存储 apiKey(不在openclaw.json 中明文),并记录 shell 与 systemd 网关环境以确保密钥正确解析。
0xli 0xli 来源
未分类 clawhub v1.0.5 1 版本 100000 Key: 需要
★ 0
Stars
📥 427
下载
💾 0
安装
1
版本
#latest

概述

NVIDIA Model Config Skill

Overview

This skill packages three reusable pieces:

  1. A script (scripts/merge_nvidia_config.py) that inserts the NVIDIA provider block into any openclaw.json file and configures apiKey as a SecretRef by default.
  2. Model entries for Mixtral, Moonshot Kimi, Kimi K2.5, Nemotron Super (1M ctx), Llama 3.1 Nemotron Ultra 253B (128K ctx), and MiniMax M2.5 (204.8K ctx) — delete extras or add more from openclaw models list --provider nvidia --all.
  3. Instructions for backups, secrets, and where NVIDIA_API_KEY must be set so the gateway can resolve it (this is not only openclaw.json).

Use the skill whenever you want to replicate the NVIDIA models.providers.nvidia entry without guessing which keys or nested objects to copy.

Quick start

  1. Copy or download this skill (e.g., rsync -av skills/nvidia-model-config /path/to/other/workspace/skills/).
  2. Obtain your NVIDIA API key and keep it secret (do not commit it).
  3. Run the script from the target workspace:
python skills/nvidia-model-config/scripts/merge_nvidia_config.py \
  --config openclaw.json --key "YOUR_KEY" --setup-env ~/.config/openclaw/gateway.env --setup-systemd --backup
  • --config defaults to openclaw.json in the current directory.
  • --key provides the API key (alternatively, set NVIDIA_API_KEY in your shell).
  • --setup-env writes the key to a dedicated environment file (e.g., ~/.config/openclaw/gateway.env).
  • --setup-systemd creates a systemd user override to load the environment file for the gateway.
  • --backup saves the original file as openclaw.json.bak before overwriting.
  • By default, the script writes models.providers.nvidia.apiKey as:
  • {"source":"env","provider":"default","id":"NVIDIA_API_KEY"}

Manual Environment Setup

If you prefer not to use --setup-systemd, you must set your key in the runtime environment where the OpenClaw gateway runs.

Interactive shell / CLI only (e.g. testing openclaw in a terminal):

export NVIDIA_API_KEY="$YOUR_KEY"

Gateway under systemd (typical on Linux) — the service does not read ~/.bashrc. Put the key in a file the unit loads, for example:

  • File: ~/.config/openclaw/gateway.env (mode 600):
NVIDIA_API_KEY=your_key_here
  • User unit drop-in ~/.config/systemd/user/openclaw-gateway.service.d/override.conf:
[Service]
Environment=NVIDIA_API_KEY=
EnvironmentFile=-/home/YOUR_USER/.config/openclaw/gateway.env

The empty Environment=NVIDIA_API_KEY= clears any inherited value so EnvironmentFile is the single source of truth. Then:

systemctl --user daemon-reload
systemctl --user restart openclaw-gateway.service

You can also keep a personal ~/.config/openclaw/secrets.env and source it from ~/.bashrc for CLI-only use; that does not replace the gateway env above.

If you want to preview the changes before writing, add --dry-run and capture the printed JSON.

What the script does

  1. Removes legacy plaintext copies of NVIDIA_API_KEY from config (env.vars. and env.) when present.
  2. Creates or updates the models.providers.nvidia block with bundled NVIDIA models (Nemotron Super 1M ctx, Nemotron Ultra 253B ~128K ctx, MiniMax M2.5 ~204.8K ctx, plus Mixtral/Kimi entries). NVIDIA may return 403 if your key is not entitled to a model; pick a model that matches your account and catalog.
  3. Keeps the api/baseUrl values in sync with NVIDIA’s integrate.api.nvidia.com endpoint.
  4. Supports an explicit legacy mode when needed:
NVIDIA_API_KEY="$YOUR_KEY" \
  python skills/nvidia-model-config/scripts/merge_nvidia_config.py \
  --config openclaw.json --inline-key

Use --inline-key only for short-lived local tests.

Optional adjustments

  • Set default model with openclaw models set nvidia/ (full id is nvidia/ + provider model id, e.g. nvidia/nvidia/nemotron-3-super-120b-a12b when the provider entry id is nvidia/nemotron-3-super-120b-a12b).
  • If the target install manages agent defaults manually, add fallback entries under agents.defaults.model.fallbacks so clients can recover if the primary model fails.
  • Double-check other agents’ models lists if they need aliases.

Distribution tips

  1. Bundle this skill directory and any instructions or scripts you use into a .zip/.skill file to share with teammates.
  2. In your documentation, point operators to this SKILL so Codex can reload it and the script automatically when they ask to “add NVIDIA models.”
  3. Keep real API keys outside of Git. Use environment variables or SecretManagers and rely on the script to merge them at runtime.

版本历史

共 1 个版本

  • v1.0.5 当前
    2026-05-03 08:19 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Sync Discord Identity

0xli
将 Discord 机器人档案同步至 OpenClaw 代理的 IDENTITY.md,在 workspace/avatars 中保存头像,并安全添加头像及 Discord 元数据。
★ 0 📥 484
it-ops-security

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,939
it-ops-security

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 90 📥 30,957