{
  "schemaVersion": "1.0",
  "item": {
    "slug": "model-setup",
    "name": "Model Setup",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/YKaiXu/model-setup",
    "canonicalUrl": "https://clawhub.ai/YKaiXu/model-setup",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/model-setup",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=model-setup",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "scripts/add_model.py",
      "scripts/list_models.py",
      "scripts/test_model.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "slug": "model-setup",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-05T17:27:30.041Z",
      "expiresAt": "2026-05-12T17:27:30.041Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=model-setup",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=model-setup",
        "contentDisposition": "attachment; filename=\"model-setup-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "model-setup"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/model-setup"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/model-setup",
    "agentPageUrl": "https://openagent3.xyz/skills/model-setup/agent",
    "manifestUrl": "https://openagent3.xyz/skills/model-setup/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/model-setup/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Model Manager",
        "body": "安全地管理 OpenClaw 模型配置。"
      },
      {
        "title": "1. 收集模型配置参数",
        "body": "询问用户以下信息：\n\n必需参数：\n\nProvider ID: 提供商标识符（如 openai, anthropic, 或自定义 ID）\nBase URL: API 基础 URL（如 https://api.openai.com/v1）\nAPI Key: API 密钥（格式通常为 key_id:secret）\nModel ID: 模型 ID（如 gpt-4, claude-3-opus）\nModel Name: 显示名称（如 GPT-4 (OpenAI)）\nContext Window: 上下文窗口大小（token 数）\nMax Tokens: 最大输出 token 数\n\n可选参数：\n\nAPI Type: API 类型（默认 openai-completions）\nReasoning: 是否支持推理（默认 false）\nInput Types: 输入类型（默认 [\"text\"]）\nCost: 成本配置（输入/输出/缓存读写）\nStreaming: 是否支持流式输出（默认 false）"
      },
      {
        "title": "2. 验证 API Key 和模型可访问性",
        "body": "使用 scripts/test_model.py 测试模型配置：\n\npython3 scripts/test_model.py '<provider_config_json>' '<model_id>' [--test-tool-calling] [--test-streaming]\n\n测试内容包括：\n\nAPI key 格式验证\n模型可访问性测试\n基本响应验证\n工具调用功能测试（可选，使用 --test-tool-calling）\n流式输出功能测试（可选，使用 --test-streaming）\n\n如果测试失败，告知用户错误原因并允许修正配置。"
      },
      {
        "title": "3. 测试工具调用功能（可选）",
        "body": "询问用户是否需要测试工具调用功能。如果需要，发送一个包含工具调用的测试请求，验证模型是否正确处理工具调用。"
      },
      {
        "title": "4. 确认配置",
        "body": "向用户展示完整的配置摘要，包括：\n\nProvider ID 和 Base URL\nModel ID 和 Name\nContext Window 和 Max Tokens\n其他配置项\n\n询问用户是否确认添加。"
      },
      {
        "title": "5. 确认是否设为默认模型",
        "body": "询问用户是否将此模型设为默认模型。"
      },
      {
        "title": "6. 确认是否配置给特定 agent",
        "body": "询问用户是否需要将此模型配置给特定 agent。如果需要，询问 agent 路径（如 /home/yupeng/.openclaw/agents/main）。"
      },
      {
        "title": "7. 添加模型配置",
        "body": "使用 scripts/add_model.py 添加模型配置：\n\npython3 scripts/add_model.py '<config_path>' '<provider_id>' '<provider_config_json>' '<model_config_json>' [--default] [--agent <agent_path>]\n\n脚本会自动：\n\n备份原始配置文件（.json.backup.YYYYMMDD_HHMMSS）\n验证模型配置\n添加或更新模型\n设置默认模型（如果指定）\n配置到指定 agent（如果指定）\n如果失败，自动从备份恢复"
      },
      {
        "title": "8. 验证结果",
        "body": "检查操作结果：\n\n如果成功，显示成功消息和备份文件路径\n如果失败，显示错误信息并告知用户已从备份恢复"
      },
      {
        "title": "配置文件位置",
        "body": "models.json: /home/yupeng/.openclaw/agents/main/agent/models.json\nconfig.json (默认模型): /home/yupeng/.openclaw/agents/main/agent/config.json\nAgent config.json: /home/yupeng/.openclaw/agents/<agent_name>/agent/config.json"
      },
      {
        "title": "列出已配置的模型",
        "body": "使用 scripts/list_models.py 列出所有已配置的模型：\n\n# JSON 格式输出\npython3 scripts/list_models.py\n\n# 格式化文本输出\npython3 scripts/list_models.py --format\n\n# 指定配置文件路径\npython3 scripts/list_models.py /path/to/models.json --format\n\n输出内容包括：\n\n提供商信息（ID、Base URL、API 类型）\n模型列表（ID、名称、上下文窗口、最大 token、推理支持）"
      },
      {
        "title": "安全注意事项",
        "body": "始终备份: 所有操作都会自动备份配置文件\n原子性写入: 使用临时文件 + 原子替换，避免写入过程中断导致文件损坏\n验证优先: 添加前先验证 API key 和模型可访问性\n错误恢复: 如果操作失败，自动从备份恢复\n不覆盖: 询问用户确认后再执行修改操作"
      },
      {
        "title": "OpenAI GPT-4",
        "body": "{\n  \"provider_id\": \"openai\",\n  \"provider_config\": {\n    \"baseUrl\": \"https://api.openai.com/v1\",\n    \"apiKey\": \"sk-xxx:yyy\",\n    \"api\": \"openai-completions\"\n  },\n  \"model_config\": {\n    \"id\": \"gpt-4\",\n    \"name\": \"GPT-4 (OpenAI)\",\n    \"reasoning\": false,\n    \"input\": [\"text\"],\n    \"cost\": {\n      \"input\": 0.03,\n      \"output\": 0.06,\n      \"cacheRead\": 0.001,\n      \"cacheWrite\": 0.004\n    },\n    \"contextWindow\": 128000,\n    \"maxTokens\": 4096,\n    \"api\": \"openai-completions\"\n  }\n}"
      },
      {
        "title": "Anthropic Claude 3",
        "body": "{\n  \"provider_id\": \"anthropic\",\n  \"provider_config\": {\n    \"baseUrl\": \"https://api.anthropic.com/v1\",\n    \"apiKey\": \"sk-ant-xxx\",\n    \"api\": \"anthropic-completions\"\n  },\n  \"model_config\": {\n    \"id\": \"claude-3-opus-20240229\",\n    \"name\": \"Claude 3 Opus (Anthropic)\",\n    \"reasoning\": false,\n    \"input\": [\"text\"],\n    \"cost\": {\n      \"input\": 0.015,\n      \"output\": 0.075\n    },\n    \"contextWindow\": 200000,\n    \"maxTokens\": 4096,\n    \"api\": \"anthropic-completions\"\n  }\n}"
      },
      {
        "title": "错误处理",
        "body": "常见错误及解决方案：\n\nAPI key 格式错误: 检查 API key 是否包含正确的分隔符\n模型不可访问: 检查 Base URL、API key 和 Model ID 是否正确\n配置文件损坏: 使用备份文件恢复\n权限不足: 检查文件权限和用户权限"
      }
    ],
    "body": "Model Manager\n\n安全地管理 OpenClaw 模型配置。\n\n工作流程\n1. 收集模型配置参数\n\n询问用户以下信息：\n\n必需参数：\n\nProvider ID: 提供商标识符（如 openai, anthropic, 或自定义 ID）\nBase URL: API 基础 URL（如 https://api.openai.com/v1）\nAPI Key: API 密钥（格式通常为 key_id:secret）\nModel ID: 模型 ID（如 gpt-4, claude-3-opus）\nModel Name: 显示名称（如 GPT-4 (OpenAI)）\nContext Window: 上下文窗口大小（token 数）\nMax Tokens: 最大输出 token 数\n\n可选参数：\n\nAPI Type: API 类型（默认 openai-completions）\nReasoning: 是否支持推理（默认 false）\nInput Types: 输入类型（默认 [\"text\"]）\nCost: 成本配置（输入/输出/缓存读写）\nStreaming: 是否支持流式输出（默认 false）\n2. 验证 API Key 和模型可访问性\n\n使用 scripts/test_model.py 测试模型配置：\n\npython3 scripts/test_model.py '<provider_config_json>' '<model_id>' [--test-tool-calling] [--test-streaming]\n\n\n测试内容包括：\n\nAPI key 格式验证\n模型可访问性测试\n基本响应验证\n工具调用功能测试（可选，使用 --test-tool-calling）\n流式输出功能测试（可选，使用 --test-streaming）\n\n如果测试失败，告知用户错误原因并允许修正配置。\n\n3. 测试工具调用功能（可选）\n\n询问用户是否需要测试工具调用功能。如果需要，发送一个包含工具调用的测试请求，验证模型是否正确处理工具调用。\n\n4. 确认配置\n\n向用户展示完整的配置摘要，包括：\n\nProvider ID 和 Base URL\nModel ID 和 Name\nContext Window 和 Max Tokens\n其他配置项\n\n询问用户是否确认添加。\n\n5. 确认是否设为默认模型\n\n询问用户是否将此模型设为默认模型。\n\n6. 确认是否配置给特定 agent\n\n询问用户是否需要将此模型配置给特定 agent。如果需要，询问 agent 路径（如 /home/yupeng/.openclaw/agents/main）。\n\n7. 添加模型配置\n\n使用 scripts/add_model.py 添加模型配置：\n\npython3 scripts/add_model.py '<config_path>' '<provider_id>' '<provider_config_json>' '<model_config_json>' [--default] [--agent <agent_path>]\n\n\n脚本会自动：\n\n备份原始配置文件（.json.backup.YYYYMMDD_HHMMSS）\n验证模型配置\n添加或更新模型\n设置默认模型（如果指定）\n配置到指定 agent（如果指定）\n如果失败，自动从备份恢复\n8. 验证结果\n\n检查操作结果：\n\n如果成功，显示成功消息和备份文件路径\n如果失败，显示错误信息并告知用户已从备份恢复\n配置文件位置\nmodels.json: /home/yupeng/.openclaw/agents/main/agent/models.json\nconfig.json (默认模型): /home/yupeng/.openclaw/agents/main/agent/config.json\nAgent config.json: /home/yupeng/.openclaw/agents/<agent_name>/agent/config.json\n列出已配置的模型\n\n使用 scripts/list_models.py 列出所有已配置的模型：\n\n# JSON 格式输出\npython3 scripts/list_models.py\n\n# 格式化文本输出\npython3 scripts/list_models.py --format\n\n# 指定配置文件路径\npython3 scripts/list_models.py /path/to/models.json --format\n\n\n输出内容包括：\n\n提供商信息（ID、Base URL、API 类型）\n模型列表（ID、名称、上下文窗口、最大 token、推理支持）\n安全注意事项\n始终备份: 所有操作都会自动备份配置文件\n原子性写入: 使用临时文件 + 原子替换，避免写入过程中断导致文件损坏\n验证优先: 添加前先验证 API key 和模型可访问性\n错误恢复: 如果操作失败，自动从备份恢复\n不覆盖: 询问用户确认后再执行修改操作\n示例配置\nOpenAI GPT-4\n{\n  \"provider_id\": \"openai\",\n  \"provider_config\": {\n    \"baseUrl\": \"https://api.openai.com/v1\",\n    \"apiKey\": \"sk-xxx:yyy\",\n    \"api\": \"openai-completions\"\n  },\n  \"model_config\": {\n    \"id\": \"gpt-4\",\n    \"name\": \"GPT-4 (OpenAI)\",\n    \"reasoning\": false,\n    \"input\": [\"text\"],\n    \"cost\": {\n      \"input\": 0.03,\n      \"output\": 0.06,\n      \"cacheRead\": 0.001,\n      \"cacheWrite\": 0.004\n    },\n    \"contextWindow\": 128000,\n    \"maxTokens\": 4096,\n    \"api\": \"openai-completions\"\n  }\n}\n\nAnthropic Claude 3\n{\n  \"provider_id\": \"anthropic\",\n  \"provider_config\": {\n    \"baseUrl\": \"https://api.anthropic.com/v1\",\n    \"apiKey\": \"sk-ant-xxx\",\n    \"api\": \"anthropic-completions\"\n  },\n  \"model_config\": {\n    \"id\": \"claude-3-opus-20240229\",\n    \"name\": \"Claude 3 Opus (Anthropic)\",\n    \"reasoning\": false,\n    \"input\": [\"text\"],\n    \"cost\": {\n      \"input\": 0.015,\n      \"output\": 0.075\n    },\n    \"contextWindow\": 200000,\n    \"maxTokens\": 4096,\n    \"api\": \"anthropic-completions\"\n  }\n}\n\n错误处理\n\n常见错误及解决方案：\n\nAPI key 格式错误: 检查 API key 是否包含正确的分隔符\n模型不可访问: 检查 Base URL、API key 和 Model ID 是否正确\n配置文件损坏: 使用备份文件恢复\n权限不足: 检查文件权限和用户权限"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/YKaiXu/model-setup",
    "publisherUrl": "https://clawhub.ai/YKaiXu/model-setup",
    "owner": "YKaiXu",
    "version": "1.0.1",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/model-setup",
    "downloadUrl": "https://openagent3.xyz/downloads/model-setup",
    "agentUrl": "https://openagent3.xyz/skills/model-setup/agent",
    "manifestUrl": "https://openagent3.xyz/skills/model-setup/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/model-setup/agent.md"
  }
}