Agent Skillsdifferent-ai/openwork › openwork-models

openwork-models

GitHub

管理 OpenWork 推理模型别名、覆盖层、折扣及自动刷新。提供搜索、添加、移除和验证模型的脚本,并触发 GitHub 工作流以同步上游模型变更。

.opencode/skills/openwork-models/SKILL.md different-ai/openwork

触发场景

更新或刷新模型列表 添加、移除或折扣特定模型 搜索可用模型 验证模型配置

安装

npx skills add different-ai/openwork --skill openwork-models -g -y
更多选项

非标准路径

npx skills add https://github.com/different-ai/openwork/tree/dev/.opencode/skills/openwork-models -g -y

不安装直接使用

npx skills use different-ai/openwork@openwork-models

指定 Agent (Claude Code)

npx skills add different-ai/openwork --skill openwork-models -a claude-code -g -y

安装 repo 全部 skill

npx skills add different-ai/openwork --all -g -y

预览 repo 内 skill

npx skills add different-ai/openwork --list

SKILL.md

Frontmatter
{
    "name": "openwork-models",
    "description": "Manage OpenWork inference model aliases, openwork model overlays, discounts, validation, and automated base model refreshes from models.dev. Use when adding, removing, discounting, auditing, or updating OpenWork models, including requests like \"update the models\" that should trigger the GitHub update-models workflow and report when its PR merges."
}

OpenWork Models

Use this skill for OpenWork inference model changes. The source of truth for available upstream models is:

  • ee/apps/inference/src/models/base.json
  • provider key: openrouter
  • model map: openrouter.models

The editable OpenWork model list is:

  • ee/apps/inference/src/models/openwork-models.json

Managed file:

  • packages/types/src/den/inference.ts

ee/apps/inference/scripts/build-models.mjs reads openwork-models.json and generates the OpenWork provider overlay in memory. It selects the API URL from OPENWORK_DEV_MODE: dev uses http://127.0.0.1:8791/api/v1, otherwise prod uses https://inference.openworklabs.com/api/v1.

Do not inspect the full base.json in chat. Use the scripts so the large source model body stays out of context.

Scripts

Extract/search source models into a temp file:

node .opencode/skills/openwork-models/scripts/extract-source-models.mjs
node .opencode/skills/openwork-models/scripts/extract-source-models.mjs --query "zai 5.1"

Manage OpenWork models:

node .opencode/skills/openwork-models/scripts/openwork-models.mjs search "zai 5.1"
node .opencode/skills/openwork-models/scripts/openwork-models.mjs add "z-ai/glm-5.1"
node .opencode/skills/openwork-models/scripts/openwork-models.mjs remove "z-ai/glm-5.1"
node .opencode/skills/openwork-models/scripts/openwork-models.mjs discount 0.1 "z-ai/glm-5.1"
node .opencode/skills/openwork-models/scripts/openwork-models.mjs sync
node .opencode/skills/openwork-models/scripts/openwork-models.mjs validate

Trigger the remote base model refresh workflow:

node .opencode/skills/openwork-models/scripts/trigger-update-workflow.mjs
node .opencode/skills/openwork-models/scripts/trigger-update-workflow.mjs --base dev --ref dev

Update Models Workflow

When the user asks to update/refresh/sync the models from models.dev, do not edit base.json manually. Trigger .github/workflows/update-models.yml and wait for the result:

node .opencode/skills/openwork-models/scripts/trigger-update-workflow.mjs

The script dispatches the manual workflow, watches the run, finds the automation PR, waits until auto-merge completes, and prints the merged PR URL. If the workflow finds no model changes, report that no PR was created and include the workflow run URL. If the workflow or PR fails/closes unmerged, report that failure with the run/PR URL.

Add Workflow

  1. Run extract-source-models.mjs --query "<user text>" or openwork-models.mjs search "<user text>".
  2. If there is no good match, ask the user for clarification.
  3. If there are multiple plausible matches, list the matching IDs and ask which one(s) to add.
  4. Once exact IDs are known, run openwork-models.mjs add "<id>" for each ID. The script copies the full model block from openrouter.models, adds it to openwork-models.json, syncs aliases, and validates.

New aliases use:

"model/id": {
  upstreamModel: "model/id",
  displayName: "OpenWork: " + model.name,
  enabled: true,
  usageFactor: 1,
}

Preserve existing usageFactor values when syncing. New models default to 1.

Remove Workflow

  1. Resolve exact IDs with search if needed.
  2. Run openwork-models.mjs remove "<id>".
  3. The script removes the model from openwork-models.json, removes the alias by regenerating the alias map from the model list, and validates.

Discount Workflow

A usage factor is the charged fraction of normal price:

  • 1 means 100% price.
  • 0.1 means 10% price, a 90% discount.

Always clarify exact model IDs before changing discounts, especially if the user provides a partial string or asks for multiple models. Then run:

node .opencode/skills/openwork-models/scripts/openwork-models.mjs discount <factor> "<id>" ["<id2>"]

Validation

Before finishing, run:

node .opencode/skills/openwork-models/scripts/openwork-models.mjs validate
node ee/apps/inference/scripts/build-models.mjs

Validation checks JSON validity, OpenWork model ID consistency, and alias coverage in INFERENCE_MODEL_ALIASES.

版本历史

  • ff5d298 当前 2026-08-20 11:35

同 Skill 集合

.opencode/skills/agent-first-screenshots/SKILL.md
.opencode/skills/browser-automation/SKILL.md
.opencode/skills/build-a-witness/SKILL.md
.opencode/skills/cloud-dashboard-walkthrough/SKILL.md
.opencode/skills/create-plugin/SKILL.md
.opencode/skills/daytona-chrome-cdp/SKILL.md
.opencode/skills/daytona-cloud-instance/SKILL.md
.opencode/skills/daytona-cloud-server/SKILL.md
.opencode/skills/daytona-dev/SKILL.md
.opencode/skills/daytona-electron-den/SKILL.md
.opencode/skills/daytona-electron-test/SKILL.md
.opencode/skills/daytona-flow-validator/SKILL.md
.opencode/skills/daytona-recording-artifacts/SKILL.md
.opencode/skills/daytona-secrets-volume/SKILL.md
.opencode/skills/daytona-seeded-cloud-demo/SKILL.md
.opencode/skills/daytona-windows-cert/SKILL.md
.opencode/skills/diagnose-a-red-run/SKILL.md
.opencode/skills/fraimz/SKILL.md
.opencode/skills/get-env-var/SKILL.md
.opencode/skills/product-tutorial-pipeline/SKILL.md
.opencode/skills/prove-a-pr/SKILL.md
.opencode/skills/publish-evidence/SKILL.md
.opencode/skills/run-evals/SKILL.md
.opencode/skills/run-tests/SKILL.md
.opencode/skills/shadcn/SKILL.md
.opencode/skills/upload-photo/SKILL.md
.opencode/skills/write-a-spec/SKILL.md
.warden/skills/desktop-den-sync-review/SKILL.md
.warden/skills/diff-security-review/SKILL.md

元信息

文件数
0
版本
757601b
Hash
82dac03f
收录时间
2026-08-20 11:35

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-16 23:36
浙ICP备14020137号-1