custom-model-config

通过编辑 models.json 为 WorkBuddy 配置自定义 AI 模型。

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "custom-model-config":https://skillpi.com/zh/skills/deepskill-ebb9b59ace13eba7558a309aadd5b805afdfd3843dd12b109903736ce037707e。安装前核对上游来源和版本:https://skillhub.cn/skills/user_81ede3c9/ruiday-skill-20260701。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

skillhub.cn

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

通过编辑 models.json 为 WorkBuddy 配置自定义 AI 模型。

0 下载

介绍来源: third_party · user_81ede3c9 · 1.0.0 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: custom-model-config
description: Configure custom AI models for WorkBuddy by editing the models.json
  file. This skill should be used when the user wants to add, list, update,
  remove, or validate custom model configurations in WorkBuddy. Triggers include
  phrases like add a custom model, configure model, set up API key, connect
  OpenAI GPT Claude Kimi Qwen DeepSeek GLM to WorkBuddy, custom model settings,
  or any request related to managing AI model providers in the WorkBuddy desktop
  application.
agent_created: true
disable: true

Custom Model Config

Overview

Manage custom AI model configurations for WorkBuddy by editing the ~/.workbuddy/models.json file. This skill enables adding OpenAI-compatible model providers (OpenAI, Anthropic-via-proxy, Kimi, Qwen/通义千问, DeepSeek, GLM/智谱, MiniMax, etc.), listing existing configurations, updating model settings, removing models, and validating configurations.

WorkBuddy loads custom models from ~/.workbuddy/models.json at startup and watches the file for live changes — no restart required. Custom models appear in the model selector prefixed with custom-local: (e.g., custom-local:gpt-5.4).

Configuration File

Path: ~/.workbuddy/models.json (on Windows: C:\Users\<username>\.workbuddy\models.json)

Format: JSON array of model objects. If the file does not exist, create it with an empty array [].

Model Object Schema

Each object in the array supports the following fields:

Field Type Required Description
id string Yes Unique model identifier. Used internally as custom-local:<id>. Must be alphanumeric with hyphens (e.g., gpt-5.4, kimi-k2.6, qwen-max).
name string Yes Human-readable display name shown in the model selector UI.
vendor string Yes Provider/vendor label (e.g., Custom, OpenAI, Kimi Coding Plan).
url string Yes Full API endpoint URL for chat completions. Must be OpenAI-compatible (ends with /chat/completions or is a compatible base URL).
apiKey string Yes API key for authentication. Sent as Authorization: Bearer <apiKey>.
supportsToolCall boolean No Whether the model supports function/tool calling. Default: false. Set true for models with function-calling capability.
supportsImages boolean No Whether the model accepts image inputs (multimodal). Default: false.
supportsReasoning boolean No Whether the model supports reasoning/thinking mode. Default: false. Set true for models like GPT-o1, DeepSeek-R1, etc.
useCustomProtocol boolean No Whether to use a custom protocol instead of standard OpenAI-compatible format. Default: false. Leave false for all standard OpenAI-compatible APIs.

Example Configuration

[
  {
    "id": "gpt-5.4",
    "name": "GPT-5.4",
    "vendor": "OpenAI",
    "url": "https://api.openai.com/v1/chat/completions",
    "apiKey": "sk-xxxxxxxxxxxxxxxxxxxx",
    "supportsToolCall": true,
    "supportsImages": true,
    "supportsReasoning": true,
    "useCustomProtocol": false
  },
  {
    "id": "kimi-k2.6",
    "name": "Kimi K2.6",
    "vendor": "Kimi Coding Plan",
    "url": "https://api.kimi.com/coding/v1",
    "apiKey": "sk-xxxxxxxxxxxxxxxxxxxx",
    "supportsToolCall": true,
    "supportsImages": true,
    "supportsReasoning": true
  }
]

Workflow: Add a Custom Model

  1. Read the existing ~/.workbuddy/models.json file. If it does not exist, initialize with [].
  2. Collect the required information from the user:
    • Model ID: A unique identifier (e.g., gpt-5.4, deepseek-r1). Ask the user or infer from the provider/model name.
    • Display Name: Human-readable name for the selector UI.
    • Provider/Vendor: Which AI provider (OpenAI, DeepSeek, Kimi, Qwen, GLM, etc.).
    • API URL: The endpoint URL. Consult references/providers.md for common provider URLs, or ask the user for the exact endpoint.
    • API Key: The secret key. Never display the full key in the response — mask it (e.g., sk-xxxx...xxxx).
    • Capability flags: Whether the model supports tool calling, image inputs, and reasoning. Consult references/providers.md for known capabilities, or ask the user.
  3. Construct the model object with all fields.
  4. Check for duplicate id — if the ID already exists, ask the user whether to update or choose a new ID.
  5. Append the new object to the array.
  6. Write the updated JSON back to ~/.workbuddy/models.json with proper formatting (2-space indentation, UTF-8 encoding).
  7. Inform the user that the model has been added and will appear as custom-local:<id> in the model selector. Changes take effect immediately (hot-reload).

Workflow: List Custom Models

  1. Read ~/.workbuddy/models.json.
  2. If the file does not exist or is empty, report that no custom models are configured.
  3. Present each model in a readable format: ID, name, vendor, URL (masked API key), and capability flags.
  4. Never display full API keys — always mask them as sk-xxxx...last4.

Workflow: Update a Custom Model

  1. Read ~/.workbuddy/models.json.
  2. Identify the model to update by id (ask the user which one if multiple exist).
  3. Apply the requested changes (e.g., update API key, change URL, toggle capability flags).
  4. Write the updated JSON back to the file.
  5. Confirm the changes to the user.

Workflow: Remove a Custom Model

  1. Read ~/.workbuddy/models.json.
  2. Identify the model to remove by id.
  3. Remove the object from the array.
  4. Write the updated JSON back to the file.
  5. Confirm removal to the user.

Workflow: Validate Configuration

Run the validation script to check configuration integrity:

python scripts/validate_models.py

The script checks:

  • JSON syntax validity
  • Required fields present for each model
  • URL format correctness (must start with http:// or https://)
  • API key presence and non-emptiness
  • No duplicate model IDs
  • Optional: API connectivity test (sends a minimal test request)

Pass --test-connection to also test API reachability:

python scripts/validate_models.py --test-connection

Security Guidelines

  • API Key Handling: API keys are secrets. When displaying model configurations, always mask keys as sk-xxxx...last4. Never log full keys or include them in response text.
  • File Permissions: The models.json file contains sensitive API keys. Do not share its contents publicly or commit it to version control.
  • User Confirmation: Always confirm with the user before overwriting or removing existing model configurations.
  • No Key Guessing: Never fabricate or guess API keys. Always obtain them from the user.

Common Provider Quick Reference

For detailed provider information (URLs, capability flags, notes), refer to references/providers.md. Common providers include:

Provider URL Pattern Tool Call Images Reasoning
OpenAI https://api.openai.com/v1/chat/completions Yes Yes Yes (o-series)
DeepSeek https://api.deepseek.com/v1/chat/completions Yes No Yes (R1)
Kimi (Moonshot) https://api.moonshot.cn/v1/chat/completions Yes No No
Qwen (DashScope) https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions Yes Yes (VL) No
GLM (Zhipu) https://open.bigmodel.cn/api/paas/v4/chat/completions Yes Yes (VL) No
MiniMax https://api.minimax.chat/v1/text/chatcompletion_v2 Yes No No
SiliconFlow https://api.siliconflow.cn/v1/chat/completions Yes Yes Yes
Ollama (local) http://localhost:11434/v1/chat/completions Yes No No
vLLM (local) http://localhost:8000/v1/chat/completions Yes No No

Troubleshooting

  • Model not appearing in selector: Verify models.json is valid JSON (run validation script). Check that the id field is unique and alphanumeric.
  • API errors when using custom model: Verify the URL is correct and OpenAI-compatible. Check that the API key is valid and has sufficient credits. Some providers require specific URL paths.
  • Tool calling not working: Ensure supportsToolCall is set to true. Not all models support function calling even if the API endpoint accepts the parameter.
  • Reasoning/thinking mode not available: Ensure supportsReasoning is true and the model actually supports it (e.g., GPT-o1, DeepSeek-R1, Claude with extended thinking).
  • Enterprise policy restrictions: In enterprise environments, custom model usage may be restricted by admin policy. If custom models are not available, check with the workspace administrator.

当前收录版本

1.0.0

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值92/100

亮点

  • 提供完整的自定义 AI 模型管理工作流(增删改查+验证)
  • 覆盖主流厂商(OpenAI、DeepSeek、Kimi、Qwen 等)及本地部署场景
  • 解决用户接入非官方模型的核心痛点,属高频刚需功能
触发精准90/100

亮点

  • 触发词覆盖全面,包含 add/configure/connect/list/update/remove/validate 等关键动作
  • 明确列举主流 AI 厂商名称,边界清晰不易误触
结构规范90/100

亮点

  • 五大工作流(Add/List/Update/Remove/Validate)步骤清晰完整
  • 提供详细 JSON schema、示例配置及安全规范
  • frontmatter 完整,文档结构规范
执行可靠90/100

待提升项

  • 引用文件缺失 原报告严重程度:重大

    主文档引用了 scripts/validate_models.py 和 references/providers.md 两个外部文件,但未在 Skill 包中提供

    改进建议:请补充这两个文件,或移除相关引用并改为内联说明

亮点

  • 提供 JSON schema 验证、重复 ID 检查、API key 掩码等可靠性机制
  • 包含用户确认流程和文件权限安全提醒
  • 支持热重载,无需重启即可生效
证据可验 (前四项均值)91/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • api.deepseek.com
  • api.kimi.com
  • api.minimax.chat
  • api.moonshot.cn
  • api.openai.com
  • api.siliconflow.cn
  • dashscope.aliyuncs.com
  • localhost
  • open.bigmodel.cn

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。