Skip to content

feat(model-specs): 新增模型规格库——跨 provider 模型参数统一维护#30

Merged
Johnson-LYS merged 4 commits into
mainfrom
feat/model-specs
Jun 1, 2026
Merged

feat(model-specs): 新增模型规格库——跨 provider 模型参数统一维护#30
Johnson-LYS merged 4 commits into
mainfrom
feat/model-specs

Conversation

@Johnson-LYS

Copy link
Copy Markdown
Contributor

摘要

新增 compute/model-specs/ 目录,作为跨 provider 共享的模型参数字典。维护模型的「内在参数」(上下文窗口、最大输出、能力标签、serviceType、默认采样温度等),与「从哪家 provider、什么价格调用」解耦。

变更内容

新增 compute/model-specs/(21 个文件,177 条规格)

覆盖厂商:Anthropic / OpenAI / Google / DeepSeek / Qwen / Moonshot / Zhipu / MiniMax / xAI / Mistral / Xiaomi(MiMo) / Baichuan / Baidu(ERNIE) / Cohere / Kling / LingYiWanWu / Perplexity / Stability / Tencent(Hunyuan) / VolcEngine(Doubao) / iFlytek

新增 schemas/model-spec.schema.json

独立 Draft-07 契约,与 frozen provider.schema.json 完全隔离:

  • 允许 defaultTemperature: null(reasoning 模型不支持温度调节)
  • 新增 releasedAt / retiredAt 时间戳字段(辅助人工清理退役模型,无客户端行为)
  • additionalProperties: false 严格校验

修改 scripts/validate.mjs:纳入 compute/model-specs/ 路径校验

manifest.presetDataVersion 54 → 58

设计说明

  • 无副作用:现有客户端不读 model-specs,文件仅供新版客户端(desirecore PR #750)使用
  • 价签不在此处:价格字段严禁写入规格库,价签真相源永远是 NewAPI pricing
  • 匹配机制:客户端通过归一化 + 5 层分层匹配(exact/normalized/stripped/pattern/family)识别 vendor 前缀、日期戳、网关装饰等命名变体

关联

  • 主仓库 PR:desirecore/desirecore#750

  • 已阅读并遵守贡献者许可协议(CLA)

- compute/model-specs/:按厂商维护模型内在参数(上下文窗口/最大输出/能力/serviceType/默认温度,不含价签)
- schemas/model-spec.schema.json:Draft-07 契约,spec 允许 null(新文件不影响老客户端 frozen 契约)
- scripts/validate.mjs:pickSchemaKey 纳入 model-specs 校验
- manifest.presetDataVersion 54→55
@Johnson-LYS Johnson-LYS merged commit e84edec into main Jun 1, 2026
2 checks passed
@Johnson-LYS Johnson-LYS deleted the feat/model-specs branch June 1, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant