Johnson-LYS 51935c0d54 chore(internal-testing): 退役内置 provider;bump presetDataVersion to 61 (#26)
* chore(internal-testing): 退役内置 provider;bump presetDataVersion to 52

internal-testing 一直作为内测阶段的硬编码 provider 存在,现在客户端已切换到
登录后绑定 desirecore-cloud(NewAPI 网关)方案,internal-testing 不再需要。

从此 commit 起:
- compute/providers/internal-testing.json 删除
- _index.json 移除 internal-testing 条目
- presetDataVersion 51 → 52,触发客户端重新合并预置

客户端需配套实现 retired-providers 清理逻辑:在 mergeBuiltinIfNewer 之后
执行一次性清理,移除本地 compute.json 中残留的 provider-internal-testing-001
+ secrets.json#internal-testing。

* chore: bump preset data version to 61

* feat: 增量同步 16 个厂商旗舰模型 (首批精选)

首次从 OpenRouter 增量同步,覆盖 13 家厂商的最新旗舰:

概要
---
- 新增 .sync-watermark 水位线文件 (1782276303 / 2026-06-24)
- presetDataVersion: 61 → 62
- 校验 70/70 全部通过

新增模型
---
OpenAI:     gpt-image-2 (image_gen), gpt-5.5, gpt-5.4
Anthropic:  claude-fable-5, claude-opus-4.8
Google:     gemini-3.5-flash, gemini-3.1-flash-image (Nano Banana 2)
DeepSeek:   deepseek-v4-pro
Qwen:       qwen3.7-max, qwen3.7-plus
MiniMax:    MiniMax-M3
Moonshot:   kimi-k2.7-code
Zhipu:      glm-5.2
xAI:        grok-4.3
Mistral:    mistral-medium-3.5
Tencent:    hy3-preview
Cohere:     north-mini-code

后续机制
---
每日 10:00 心跳检查 OpenRouter 新模型,对比 .sync-watermark
增量入库,有更新才提 PR,无更新静默。
2026-06-29 20:52:13 +08:00
2026-04-26 17:44:03 +08:00

DesireCore Config Center

DesireCore 官方配置中心:托管 Provider / Model / Pricing / ServiceMap 数据,由 desirecore 客户端通过 npm run sync-config-center 脚本和运行时后台 fetch 拉取。


数据契约Frozen Schema

schemas/ 目录下的 JSON Schema 是已发布客户端的兼容契约。所有写入此仓库的数据必须通过 schemas/ 校验,否则会破坏老版本客户端。

历史背景

PR #1 曾把 reasoning 模型的 defaultTemperature / defaultTopP 写为 null 导致已发布客户端schema 严格 numberreadComputeConfig 校验失败 → 同步路径死锁 → 远程数据 revert 也救不了已污染的本地用户。详见 desirecore PR #471。

为防止此类事故重演,本仓库引入 frozen schema + CI 自动校验。

校验规则

Schema 适用文件 关键约束
provider.schema.json compute/providers/*.jsoncompute/coding-plans/*.json defaultTemperature/defaultTopP 必须是 number禁止 null/stringadditionalProperties: false
manifest.schema.json manifest.json presetDataVersion 必须是递增整数
service-map.schema.json compute/service-map.json 每条映射须含 modelName + providerId
providers-index.schema.json 两个 _index.json order 数组无重复
pricing.schema.json compute/pricing.json markupRatio / usdToCny 为正数

关键规则reasoning 模型的温度参数

禁止"defaultTemperature": null"defaultTopP": null

正确做法:完全省略字段。

// ❌ 错误:会破坏 fix #471 之前的客户端
{ "modelName": "deepseek-reasoner", "defaultTemperature": null }

// ✅ 正确reasoning 模型省略温度字段
{ "modelName": "deepseek-reasoner", "displayName": "DeepSeek Reasoner", ... }

关键规则:新增字段需先升级老客户端 schema

providermodel 顶层均启用 additionalProperties: false。如需新增字段:

  1. 先在 desirecore 主仓 lib/schemas/agent-service/compute.ts 升级 schema 接受新字段
  2. 发布新版本客户端
  3. 等大部分用户升级
  4. 再更新本仓库的 frozen schema 和数据

否则老客户端会因未知字段校验失败死锁。


本地校验

npm install
npm run validate     # 校验所有数据文件
npm test             # 跑单元测试(含反例测试)

CIGitHub Actions会在每个 PR 自动运行 validatetest,不通过禁止合并。


数据修改流程

  1. 编辑 compute/providers/<name>.jsoncompute/coding-plans/<name>.jsoncompute/service-map.json
  2. 编辑 compute/providers/_index.jsoncoding-plans/_index.json(新增/删除 provider 时)
  3. 必须递增 manifest.json#presetDataVersion,并更新 updatedAt
  4. npm run validate 本地确认通过
  5. 提 PR等 CI 校验通过
  6. 合并到 main 后客户端会在下次后台 fetch最长 30 分钟)拾取更新

客户端拉取机制

详见 desirecore CLAUDE.md "Config Center" 章节。

  • 构建期同步npm run sync-config-center 把数据复制到 desirecore 主仓 lib/agent-service/defaults/
  • 运行时同步:客户端启动后后台 git fetch 本仓库,每 30 分钟检查一次远程更新
  • 版本比对presetDataVersion(递增整数)+ digestSHA-256双重校验
Description
DesireCore 配置中心。
Readme 1.1 MiB
Languages
JavaScript 96.7%
Shell 3.3%