Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(models): 同步已核实的模型参考价格 (#4921)

Dasheae859acd0fa
diff --git a/apps/desktop/src/main/maker-host/__tests__/activeCatalogDiscovery.test.ts b/apps/desktop/src/main/maker-host/__tests__/activeCatalogDiscovery.test.ts
index a8ef371ded..89a400925f 100644
--- a/apps/desktop/src/main/maker-host/__tests__/activeCatalogDiscovery.test.ts
+++ b/apps/desktop/src/main/maker-host/__tests__/activeCatalogDiscovery.test.ts
@@ -93,39 +93,65 @@ describe('active-catalog discovered augment', () => {
it.each([
['anthropic', 'claude', 'claude-sonnet-4-5', 'claude-sonnet-4-6'],
['xai', 'xai', 'grok-4.5', 'grok-4.6'],
- ] as const)('uses the same default selection for builtin and independent %s accounts', (id, native, oldId, newId) => {
- const catalog = bundledWithoutRegistry();
- const builtin = catalog.providers.find(provider => provider.id === id)!;
- const models = [fake(oldId), fake(newId)].map(model => ({ ...model, group: id === 'anthropic' ? 'claude' : 'grok' }));
- builtin.models = { codex: models, 'claude-code': models, pi: models };
- const account = { ...builtin, id: `${id}-second`, source: 'user' as const,
- auth: { method: 'oauth' as const, native } };
- const api = { ...builtin, id: `${id}-api`, source: 'user' as const,
- auth: { method: 'apiKey' as const } };
- setActiveCatalog({ ...catalog, providers: [builtin, account, api] });
- if (id === 'anthropic') setAnthropicDiscoveredModels(models);
- const actual = getActiveCatalog();
- for (const agent of ['codex', 'claude-code', 'pi'] as const) {
- const listed = (providerId: string) => actual.providers.find(provider => provider.id === providerId)!.models[agent]!;
- expect(listed(account.id).map(model => [model.id, model.defaultEnabled]))
- .toEqual(listed(builtin.id).map(model => [model.id, model.defaultEnabled]));
- for (const providerId of [builtin.id, account.id]) {
- expect(listed(providerId).find(model => model.id === oldId)?.defaultEnabled,
- `${providerId}/${agent}: ${listed(providerId).map(model => model.id).join(',')}`).toBe(false);
- // Claude's Codex bridge is explicitly disabled by default; keep it disabled.
- expect(listed(providerId).find(model => model.id === newId)?.defaultEnabled)
- .toBe(!(id === 'anthropic' && agent === 'codex'));
+ ] as const)(
+ 'uses the same default selection for builtin and independent %s accounts',
+ (id, native, oldId, newId) => {
+ const catalog = bundledWithoutRegistry();
+ const builtin = catalog.providers.find((provider) => provider.id === id)!;
+ const models = [fake(oldId), fake(newId)].map((model) => ({
+ ...model,
+ group: id === 'anthropic' ? 'claude' : 'grok',
+ }));
+ builtin.models = { codex: models, 'claude-code': models, pi: models };
+ const account = {
+ ...builtin,
+ id: `${id}-second`,
+ source: 'user' as const,
+ auth: { method: 'oauth' as const, native },
+ };
+ const api = {
+ ...builtin,
+ id: `${id}-api`,
+ source: 'user' as const,
+ auth: { method: 'apiKey' as const },
+ };
+ setActiveCatalog({ ...catalog, providers: [builtin, account, api] });
+ if (id === 'anthropic') setAnthropicDiscoveredModels(models);
+ const actual = getActiveCatalog();
+ for (const agent of ['codex', 'claude-code', 'pi'] as const) {
+ const listed = (providerId: string) =>
+ actual.providers.find((provider) => provider.id === providerId)!.models[agent]!;
+ expect(listed(account.id).map((model) => [model.id, model.defaultEnabled])).toEqual(
+ listed(builtin.id).map((model) => [model.id, model.defaultEnabled]),
+ );
+ for (const providerId of [builtin.id, account.id]) {
+ expect(
+ listed(providerId).find((model) => model.id === oldId)?.defaultEnabled,
+ `${providerId}/${agent}: ${listed(providerId)
+ .map((model) => model.id)
+ .join(',')}`,
+ ).toBe(false);
+ // Claude's Codex bridge is explicitly disabled by default; keep it disabled.
+ expect(listed(providerId).find((model) => model.id === newId)?.defaultEnabled).toBe(
+ !(id === 'anthropic' && agent === 'codex'),
+ );
+ }
+ expect(listed(api.id).find((model) => model.id === oldId)?.defaultEnabled).toBe(true);
}
- expect(listed(api.id).find(model => model.id === oldId)?.defaultEnabled).toBe(true);
- }
- });
+ },
+ );
it('clears only the selected Grok account until the owner boundary is cleared', () => {
const account = buildUserProvider({
- id: 'grok-second', name: 'Second Grok', auth: { method: 'oauth', native: 'xai' },
+ id: 'grok-second',
+ name: 'Second Grok',
+ auth: { method: 'oauth', native: 'xai' },
runtimes: {},
});
setActiveCatalog({ ...BUNDLED_CATALOG, providers: [...BUNDLED_CATALOG.providers, account] });
- const ids = () => getActiveCatalog().providers.find(p => p.id === account.id)?.models.codex?.map(m => m.id);
+ const ids = () =>
+ getActiveCatalog()
+ .providers.find((p) => p.id === account.id)
+ ?.models.codex?.map((m) => m.id);
setXaiDiscoveredModels([{ id: 'xai/grok-account-only' }], account.id);
expect(ids()).toContain('xai/grok-account-only');
setXaiDiscoveredModels(null);
@@ -137,20 +163,30 @@ describe('active-catalog discovered augment', () => {
expect(ids()).not.toContain('xai/grok-account-only');
});
it('shares OpenAI protocol and Pi metadata with an independent account without sharing identity', () => {
- const account = buildUserProvider({
- id: 'openai-parity', name: 'Separate account', auth: { method: 'oauth', native: 'codex' },
- runtimes: { codex: { baseUrl: 'https://chatgpt.com/backend-api/codex', models: [{ id: 'gpt-5.6-luna', name: 'Luna' }] } },
- }, { modelRegistry: BUNDLED_CATALOG.modelRegistry });
+ const account = buildUserProvider(
+ {
+ id: 'openai-parity',
+ name: 'Separate account',
+ auth: { method: 'oauth', native: 'codex' },
+ runtimes: {
+ codex: {
+ baseUrl: 'https://chatgpt.com/backend-api/codex',
+ models: [{ id: 'gpt-5.6-luna', name: 'Luna' }],
+ },
+ },
+ },
+ { modelRegistry: BUNDLED_CATALOG.modelRegistry },
+ );
setActiveCatalog({ ...BUNDLED_CATALOG, providers: [...BUNDLED_CATALOG.providers, account] });
const catalog = getActiveCatalog();
- const selected = catalog.providers.find(p => p.id === account.id)!;
- const original = catalog.providers.find(p => p.id === 'openai')!;
+ const selected = catalog.providers.find((p) => p.id === account.id)!;
+ const original = catalog.providers.find((p) => p.id === 'openai')!;
for (const agent of ['codex', 'claude-code', 'pi'] as const) {
const id = agent === 'codex' ? 'gpt-5.6-luna' : 'chatgpt/gpt-5.6-luna';
- const model = selected.models[agent]?.find(m => m.id === id);
+ const model = selected.models[agent]?.find((m) => m.id === id);
expect(model?.nativeApi).toBe('openai-responses');
if (agent === 'pi') {
- const baseline = original.models.pi?.find(m => m.id === id);
+ const baseline = original.models.pi?.find((m) => m.id === id);
expect(model?.contextWindow).toBe(baseline?.contextWindow);
expect(model?.maxOutput).toBe(baseline?.maxOutput);
expect(model?.cost).toEqual(baseline?.cost);
@@ -255,25 +291,35 @@ describe('active-catalog discovered augment', () => {
expect(openaiIds('pi')).toContain('chatgpt/gpt-5.7');
});
- it.each(['builtin', 'independent'] as const)('adds a discovered Claude model to the %s account Pi catalog', (kind) => {
- const catalog = bundledWithoutRegistry();
- const providerId = kind === 'builtin' ? 'anthropic' : 'claude-second';
- if (kind === 'independent') {
- catalog.providers.push(buildUserProvider({
- id: providerId, name: 'Second Claude', auth: { method: 'oauth', native: 'claude' }, runtimes: {},
- }));
- }
- setActiveCatalog(catalog);
- const discovered = { ...fake('claude-new'), group: 'anthropic' };
- if (kind === 'builtin') setAnthropicDiscoveredModels([discovered]);
- else setDiscoveredProviderModels(providerId, 'claude-code', [discovered]);
- expect(getActiveCatalog().providers.find(p => p.id === providerId)!.models.pi)
- .toContainEqual(expect.objectContaining({ id: 'claude-new', piApi: 'anthropic-messages' }));
- if (kind === 'independent') {
- expect(getActiveCatalog().providers.find(p => p.id === 'anthropic')!.models.pi)
- .not.toContainEqual(expect.objectContaining({ id: 'claude-new' }));
- }
- });
+ it.each(['builtin', 'independent'] as const)(
+ 'adds a discovered Claude model to the %s account Pi catalog',
+ (kind) => {
+ const catalog = bundledWithoutRegistry();
+ const providerId = kind === 'builtin' ? 'anthropic' : 'claude-second';
+ if (kind === 'independent') {
+ catalog.providers.push(
+ buildUserProvider({
+ id: providerId,
+ name: 'Second Claude',
+ auth: { method: 'oauth', native: 'claude' },
+ runtimes: {},
+ }),
+ );
+ }
+ setActiveCatalog(catalog);
+ const discovered = { ...fake('claude-new'), group: 'anthropic' };
+ if (kind === 'builtin') setAnthropicDiscoveredModels([discovered]);
+ else setDiscoveredProviderModels(providerId, 'claude-code', [discovered]);
+ expect(
+ getActiveCatalog().providers.find((p) => p.id === providerId)!.models.pi,
+ ).toContainEqual(expect.objectContaining({ id: 'claude-new', piApi: 'anthropic-messages' }));
+ if (kind === 'independent') {
+ expect(
+ getActiveCatalog().providers.find((p) => p.id === 'anthropic')!.models.pi,
+ ).not.toContainEqual(expect.objectContaining({ id: 'claude-new' }));
+ }
+ },
+ );
it('missing Pi declarations use fallback but explicit empty lists remove public Pi membership', () => {
const expected = openaiIds('pi');
@@ -327,8 +373,9 @@ describe('active-catalog discovered augment', () => {
]);
for (const agent of ['claude-code', 'codex', 'pi'] as const) {
const id = agent === 'pi' ? 'grok-4.7' : 'xai/grok-4.7';
- expect(xai?.models[agent]?.find(model => model.id === id)).toMatchObject({
- efforts: ['low', 'medium', 'high', 'xhigh'], defaultEffort: 'high',
+ expect(xai?.models[agent]?.find((model) => model.id === id)).toMatchObject({
+ efforts: ['low', 'medium', 'high', 'xhigh'],
+ defaultEffort: 'high',
});
}
expect(xai?.models.pi).not.toEqual(xai?.models['claude-code']);
@@ -350,8 +397,12 @@ describe('active-catalog discovered augment', () => {
setActiveCatalog(BUNDLED_CATALOG);
setXaiDiscoveredModels([{ id: 'xai/grok-4.5' }, { id: 'xai/grok-4.6' }]);
const xai = getActiveCatalog().providers.find((provider) => provider.id === 'xai');
- expect(xai?.models['claude-code']?.map((model) => model.id)).toEqual(expect.arrayContaining(['xai/grok-4.5', 'xai/grok-4.6']));
- expect(xai?.models.codex?.map((model) => model.id)).toEqual(expect.arrayContaining(['xai/grok-4.5', 'xai/grok-4.6']));
+ expect(xai?.models['claude-code']?.map((model) => model.id)).toEqual(
+ expect.arrayContaining(['xai/grok-4.5', 'xai/grok-4.6']),
+ );
+ expect(xai?.models.codex?.map((model) => model.id)).toEqual(
+ expect.arrayContaining(['xai/grok-4.5', 'xai/grok-4.6']),
+ );
expect(xai?.models.pi?.map((model) => model.id)).toEqual([
'grok-4.3',
'grok-4.5',
@@ -361,8 +412,9 @@ describe('active-catalog discovered augment', () => {
]);
for (const agent of ['claude-code', 'codex', 'pi'] as const) {
const id = agent === 'pi' ? 'grok-4.7' : 'xai/grok-4.7';
- expect(xai?.models[agent]?.find(model => model.id === id)).toMatchObject({
- efforts: ['low', 'medium', 'high', 'xhigh'], defaultEffort: 'high',
+ expect(xai?.models[agent]?.find((model) => model.id === id)).toMatchObject({
+ efforts: ['low', 'medium', 'high', 'xhigh'],
+ defaultEffort: 'high',
});
}
expect(xai?.models.pi?.find((model) => model.id === 'grok-4.6')).toMatchObject({
@@ -381,45 +433,60 @@ describe('active-catalog discovered augment', () => {
setActiveCatalog(BUNDLED_CATALOG);
// Keep the discovery fixture independent of future bundled model releases.
const modelId = 'grok-discovery-only';
- const models = () => getActiveCatalog().providers.find(p => p.id === 'xai')!.models.pi!;
- expect(models().some(model => model.id === modelId)).toBe(false);
- setXaiDiscoveredModels([{
- id: `xai/${modelId}`, name: 'Discovered Grok', contextWindow: 500_000,
- maxOutput: 64_000, efforts: ['xhigh', 'high', 'medium', 'low'], defaultEffort: 'high',
- }]);
- expect(models().find(model => model.id === modelId)).toMatchObject({
- name: 'Discovered Grok', contextWindow: 500_000, maxOutput: 64_000,
- efforts: ['low', 'medium', 'high', 'xhigh'], defaultEffort: 'high',
+ const models = () => getActiveCatalog().providers.find((p) => p.id === 'xai')!.models.pi!;
+ expect(models().some((model) => model.id === modelId)).toBe(false);
+ setXaiDiscoveredModels([
+ {
+ id: `xai/${modelId}`,
+ name: 'Discovered Grok',
+ contextWindow: 500_000,
+ maxOutput: 64_000,
+ efforts: ['xhigh', 'high', 'medium', 'low'],
+ defaultEffort: 'high',
+ },
+ ]);
+ expect(models().find((model) => model.id === modelId)).toMatchObject({
+ name: 'Discovered Grok',
+ contextWindow: 500_000,
+ maxOutput: 64_000,
+ efforts: ['low', 'medium', 'high', 'xhigh'],
+ defaultEffort: 'high',
piApi: 'openai-responses',
});
setXaiDiscoveredModels(null);
- expect(models().some(model => model.id === modelId)).toBe(false);
+ expect(models().some((model) => model.id === modelId)).toBe(false);
});
it('keeps discovered Pi models scoped to their Grok account', () => {
const account = buildUserProvider({
- id: 'grok-second', name: 'Second Grok', auth: { method: 'oauth', native: 'xai' }, runtimes: {},
+ id: 'grok-second',
+ name: 'Second Grok',
+ auth: { method: 'oauth', native: 'xai' },
+ runtimes: {},
});
setActiveCatalog({ ...BUNDLED_CATALOG, providers: [...BUNDLED_CATALOG.providers, account] });
setXaiDiscoveredModels([{ id: 'xai/grok-account-only' }], account.id);
- const models = (id: string) => getActiveCatalog().providers.find(p => p.id === id)!.models.pi!;
- expect(models(account.id).some(model => model.id === 'grok-account-only')).toBe(true);
- expect(models('xai').some(model => model.id === 'grok-account-only')).toBe(false);
+ const models = (id: string) =>
+ getActiveCatalog().providers.find((p) => p.id === id)!.models.pi!;
+ expect(models(account.id).some((model) => model.id === 'grok-account-only')).toBe(true);
+ expect(models('xai').some((model) => model.id === 'grok-account-only')).toBe(false);
setXaiDiscoveredModels(null, account.id);
- expect(models(account.id).some(model => model.id === 'grok-account-only')).toBe(false);
+ expect(models(account.id).some((model) => model.id === 'grok-account-only')).toBe(false);
});
it('does not revive explicit empty or retired Pi declarations from account discovery', () => {
const catalog = bundledWithoutRegistry();
- const xai = catalog.providers.find(p => p.id === 'xai')!;
+ const xai = catalog.providers.find((p) => p.id === 'xai')!;
xai.models.pi = [{ ...fake('grok-4.7'), status: 'retired', piApi: 'openai-responses' }];
setActiveCatalog(catalog, { authorityCatalog: catalog });
setXaiDiscoveredModels([{ id: 'xai/grok-4.7' }]);
- expect(getActiveCatalog().providers.find(p => p.id === 'xai')!.models.pi![0]?.status).toBe('retired');
+ expect(getActiveCatalog().providers.find((p) => p.id === 'xai')!.models.pi![0]?.status).toBe(
+ 'retired',
+ );
const empty = structuredClone(catalog);
- empty.providers.find(p => p.id === 'xai')!.models.pi = [];
+ empty.providers.find((p) => p.id === 'xai')!.models.pi = [];
setActiveCatalog(empty, { authorityCatalog: empty });
- expect(getActiveCatalog().providers.find(p => p.id === 'xai')!.models.pi).toEqual([]);
+ expect(getActiveCatalog().providers.find((p) => p.id === 'xai')!.models.pi).toEqual([]);
});
it('uses explicit SuperGrok capabilities across all three Harnesses', () => {
@@ -505,7 +572,7 @@ describe('active-catalog discovered augment', () => {
setXaiDiscoveredModels([]);
const xai = getActiveCatalog().providers.find((provider) => provider.id === 'xai');
for (const agent of ['claude-code', 'codex'] as const) {
- expect(xai?.models[agent]?.map(model => model.id)).toContain('xai/grok-4.6');
+ expect(xai?.models[agent]?.map((model) => model.id)).toContain('xai/grok-4.6');
}
expect(xai?.models.pi?.map((model) => model.id)).toEqual([
'grok-4.3',
@@ -516,8 +583,9 @@ describe('active-catalog discovered augment', () => {
]);
for (const agent of ['claude-code', 'codex', 'pi'] as const) {
const id = agent === 'pi' ? 'grok-4.7' : 'xai/grok-4.7';
- expect(xai?.models[agent]?.find(model => model.id === id)).toMatchObject({
- efforts: ['low', 'medium', 'high', 'xhigh'], defaultEffort: 'high',
+ expect(xai?.models[agent]?.find((model) => model.id === id)).toMatchObject({
+ efforts: ['low', 'medium', 'high', 'xhigh'],
+ defaultEffort: 'high',
});
}
});
@@ -532,13 +600,19 @@ describe('active-catalog discovered augment', () => {
videoModels: [{ id: 'xai/future-video', name: 'Future Video' }],
});
const xai = getActiveCatalog().providers.find((provider) => provider.id === 'xai');
- expect(xai?.imageModels).toContainEqual(expect.objectContaining({
- id: 'xai/grok-imagine-image',
- name: 'Remote Rename Must Not Win',
- mode: 'image_generation',
- }));
- expect(xai?.imageModels).toContainEqual(expect.objectContaining({ id: 'xai/future-image', name: 'Future Image' }));
- expect(xai?.videoModels).toContainEqual(expect.objectContaining({ id: 'xai/future-video', name: 'Future Video' }));
+ expect(xai?.imageModels).toContainEqual(
+ expect.objectContaining({
+ id: 'xai/grok-imagine-image',
+ name: 'Remote Rename Must Not Win',
+ mode: 'image_generation',
+ }),
+ );
+ expect(xai?.imageModels).toContainEqual(
+ expect.objectContaining({ id: 'xai/future-image', name: 'Future Image' }),
+ );
+ expect(xai?.videoModels).toContainEqual(
+ expect.objectContaining({ id: 'xai/future-video', name: 'Future Video' }),
+ );
expect(xai?.imageModels?.some((model) => model.id === 'xai/grok-imagine-image-quality')).toBe(
false,
);
@@ -571,8 +645,16 @@ describe('active-catalog discovered augment', () => {
videoModels: [{ id: 'xai/second-video', name: 'Second Video' }],
});
const xai = getActiveCatalog().providers.find((provider) => provider.id === 'xai');
- expect(xai?.imageModels).toEqual([{ id: 'xai/first-image', name: 'First Image', discoveredMetadata: { name: 'First Image' } }]);
- expect(xai?.videoModels).toEqual([{ id: 'xai/second-video', name: 'Second Video', discoveredMetadata: { name: 'Second Video' } }]);
+ expect(xai?.imageModels).toEqual([
+ { id: 'xai/first-image', name: 'First Image', discoveredMetadata: { name: 'First Image' } },
+ ]);
+ expect(xai?.videoModels).toEqual([
+ {
+ id: 'xai/second-video',
+ name: 'Second Video',
+ discoveredMetadata: { name: 'Second Video' },
+ },
+ ]);
});
it('xAI 官方成功返回空清单时清掉该类旧型号', () => {
@@ -721,6 +803,7 @@ describe('anthropic 发现条目的 modelRegistry 元数据基线', () => {
anthro('claude-sonnet-4-5', 'Claude Sonnet 4.5', 9),
]);
expect(anthropicList().map((m) => [m.id, m.name])).toEqual([
+ ['claude-opus-5-5', 'Opus 5.5'],
['claude-opus-5', 'Claude Opus 5'],
['claude-fable-5', 'Claude Fable 5'],
['claude-opus-4-8', 'Claude Opus 4.8'],
@@ -739,7 +822,7 @@ describe('anthropic 发现条目的 modelRegistry 元数据基线', () => {
.filter((model) => model.defaultEnabled !== false)
.map((model) => model.id)
.sort(),
- ).toEqual(['claude-fable-5-1', 'claude-haiku-4-5', 'claude-opus-5', 'claude-sonnet-5']);
+ ).toEqual(['claude-fable-5-1', 'claude-haiku-4-5', 'claude-opus-5-5', 'claude-sonnet-5']);
expect(anthropicList('codex')).toEqual(
anthropicList('claude-code').map((model) => ({
...model,
diff --git a/docs/model-price-audit-2026-09-23.md b/docs/model-price-audit-2026-09-23.md
new file mode 100644
index 0000000000..cb106c082b
--- /dev/null
+++ b/docs/model-price-audit-2026-09-23.md
@@ -0,0 +1,61 @@
+# 2026-09-23 模型参考价缺口核对
+
+本次对照远程文件评测使用的型号核查 Server 正本和客户端离线 Registry,
+只更新参考价,不更新 Gateway 的实际售价、用户覆盖、调用权限或协议。
+新版 revision 为 `2026-09-23T00:00:00.005Z`,完整 Registry 两仓保持一致。
+Muse 1.2 的现有 XD 路由显式关联 global 价格组,覆盖按供应商/型号解析与 V4/V5 投影。
+客户端同时追平 Server 已有的 GPT-6 Sol、GPT-6 Luna、Opus 5.5 三个条目;
+这些不是本次新增的服务端模型。
+整表同步会使客户端继承服务端已有的 Opus 5.5 排序与默认家族选择,
+默认可见 Opus 从 5 更新为 5.5;未修改选择算法,用户显式覆盖仍优先。
+
+## 补入项
+
+单位为每百万 Token;日期 2026-09-23 是本目录采纳快照日,不推断厂商历史生效日。
+
+| 型号 | 市场/币种 | 输入 | 输出 | 缓存读取 | 缓存写入 | 处理 |
+| -------------------- | ---------- | ---: | ---: | -------: | -------: | ------------------------------------------------ |
+| Kimi K3 | global/USD | 3 | 15 | 0.3 | 3 | 补写入价,含 XD 公共型号副本 |
+| Kimi K3 | cn/CNY | 20 | 100 | 2 | 20 | 补写入价 |
+| HY4 preview | cn/CNY | 6 | 18 | 0.3 | 未知 | 公共型号及现有路由参考价组 |
+| Muse Spark 1.2 / 1.3 | global/USD | 1.25 | 4.25 | 0.15 | 未知 | 1.2 补价;1.3 仅新增公共资料,不新增接入成员 |
+| Gemini 3.8 Flash | global/USD | 0.75 | 3.75 | 0.075 | 未知 | 仅公共资料;2027-01-01 起分别为 1.5 / 7.5 / 0.15 |
+
+K3 保留旧价格区间,新区间补写入字段;尚未核实的 1h 写入价保持缺失。
+Gemini 的按小时缓存存储费不是缓存写入费,不能填入 cacheWritePerMtok。
+
+官方来源(2026-09-23 核实):
+
+- [Kimi 国际平台](https://platform.kimi.ai/) 与 [国内平台](https://platform.kimi.com/) 首页明确列出上述写入价;[TTL说明](https://platform.kimi.ai/docs/pricing/chat)说明默认5分钟、另有1小时档。
+- [腾讯 TokenHub](https://cloud.tencent.com/product/tokenhub):广州地域 HY4 preview 参考价。
+- [Meta Model API](https://dev.meta.ai/docs/pricing-rate-limits):Muse 1.2/1.3 Standard 共用价格;不采用允许训练数据的 Contributor 折扣。
+- [Gemini API](https://ai.google.dev/gemini-api/docs/pricing):3.8 Flash Standard,含明确的2027年价格切换日;不将 Flex/Batch 混入 standard。
+
+## 保留的缺口
+
+- **Kimi K2.8 preview**:评测报告使用的 [B.AI参考价](https://docs.b.ai/llmservice/models/kimi-k2.8-preview/) 是该供应商自己的报价。当前目录无 B.AI 路由,Kimi Code 也不是 B.AI;因此不写入厂商官方价组或其它路由。输入/输出/读取/写入 1/4/0.25/1 USD 只能作为报告情景估算,不能伪称官方价。
+- **DeepSeek V4.1 Flash**:[官方定价](https://api-docs.deepseek.com/quick_start/pricing/)按UTC工作日、日内时段及中国节假日区分峰谷。当前目录只有日历日期范围,不能表达这张时刻表;未把峰期 0.3/1.2/0.006 USD 写成全天价格,也未借 V4 的别名替代 V4.1 精确型号。此处需要独立的时段价格合同后才能准确补齐。
+- **K3 1h缓存写入**:数字价未核实,保持未知;不能从默认写入价猜倍率。
+- 其它已配置且本次未发现缺字段的评测型号保持原价与历史区间。本次不是全目录所有媒体、订阅与区域价格审计。
+
+## 发布与验证边界
+
+本次仅更新文件并验证解析/价区间选择/旧版投影,不代表已部署。
+发布时先部署 Server,再发布客户端;核对实际目录响应须同时携带
+`registrySchemaVersion=5&registryMedia=1`,否则可能得到既有的冻结兼容快照。
+旧客户端的冻结目录 `legacy-providers.json` 不修改。
+
+验证记录:
+
+- Server 与客户端完整 Registry JSON 深比较一致。
+- 客户端 model-providers:45 个文件、1043 项测试通过。
+- Desktop 目录发现:同步 Opus 5.5 预期后,36 项测试通过。
+- Server 全量单测:2469 项通过、285 项跳过;Server typecheck 通过。
+- 客户端扩大回归首次 Desktop 有 10 项失败:目录同步导致的 1 项已修正并定向复验;
+ 其余 9 项来自 claudeOrphanReaper / codexAuthIsolatedSandbox,
+ 在同一 HEAD 的干净主分支单独复现为相同 9 项失败。
+- 客户端 model-providers 类型检查有 4 条既有测试类型错误,涉及
+ kimiCodeDefaults / mimoV26Regression / modelNativeApi;本轮在同 HEAD 干净主分支复跑,得到相同 4 条错误。
+ 不将单测通过表述为完整类型检查通过。
+- 扩大回归的 Mobile、lizi-mcps、maker-core、model-providers、orca-workflow 均通过。
+ 根门禁仍因上述 Desktop 基线失败退出 1,不声称整仓全绿。
diff --git a/packages/model-providers/catalog/model-registry.json b/packages/model-providers/catalog/model-registry.json
index 20d2c0fee7..c9d1dee162 100644
--- a/packages/model-providers/catalog/model-registry.json
+++ b/packages/model-providers/catalog/model-registry.json
@@ -1,7 +1,77 @@
{
"schemaVersion": 5,
- "updatedAt": "2026-09-22T00:00:00.002Z",
+ "updatedAt": "2026-09-23T00:00:00.005Z",
"models": [
+ {
+ "id": "openai/gpt-6-sol",
+ "name": "GPT-6 Sol",
+ "status": "active",
+ "sortOrder": 15,
+ "routes": [
+ {
+ "providerId": "openai",
+ "modelId": "gpt-6-sol",
+ "agents": ["claude-code", "codex"],
+ "referencePriceGroup": "global",
+ "defaults": {
+ "supportsFastMode": true
+ }
+ }
+ ],
+ "nativeApi": "openai-responses",
+ "modelRef": "openai/gpt-6-sol",
+ "perAgent": {
+ "codex": {
+ "contextWindow": 272000
+ },
+ "claude-code": {
+ "contextWindow": 272000
+ }
+ }
+ },
+ {
+ "id": "openai/gpt-6-luna",
+ "name": "GPT-6 Luna",
+ "status": "active",
+ "sortOrder": 16,
+ "routes": [
+ {
+ "providerId": "openai",
+ "modelId": "gpt-6-luna",
+ "agents": ["claude-code", "codex"],
+ "referencePriceGroup": "global",
+ "defaults": {
+ "supportsFastMode": true
+ }
+ }
+ ],
+ "nativeApi": "openai-responses",
+ "modelRef": "openai/gpt-6-luna",
+ "perAgent": {
+ "codex": {
+ "contextWindow": 272000
+ },
+ "claude-code": {
+ "contextWindow": 272000
+ }
+ }
+ },
+ {
+ "id": "anthropic/claude-opus-5-5",
+ "name": "Opus 5.5",
+ "status": "active",
+ "sortOrder": -1,
+ "routes": [
+ {
+ "providerId": "anthropic",
+ "modelId": "claude-opus-5-5",
+ "agents": ["claude-code", "codex"],
+ "referencePriceGroup": "global"
+ }
+ ],
+ "nativeApi": "anthropic-messages",
+ "modelRef": "anthropic/claude-opus-5-5"
+ },
{
"id": "openai/gpt-5.6-sol",
"name": "GPT-5.6-Sol",
@@ -1920,7 +1990,8 @@
{
"providerId": "xd",
"modelId": "meta/muse-spark-1.2",
- "agents": ["claude-code", "codex"]
+ "agents": ["claude-code", "codex"],
+ "referencePriceGroup": "global"
}
],
"modelRef": "meta/muse-spark-1.2"
@@ -1972,7 +2043,8 @@
{
"providerId": "xd",
"modelId": "tencent/hy4-preview",
- "agents": ["claude-code", "codex"]
+ "agents": ["claude-code", "codex"],
+ "referencePriceGroup": "cn"
}
],
"nativeApi": "openai-completions",
@@ -2532,6 +2604,216 @@
]
},
"baseModels": [
+ {
+ "id": "openai/gpt-6-sol",
+ "aliases": ["gpt-6-sol"],
+ "defaults": {
+ "name": "GPT-6 Sol",
+ "group": "gpt",
+ "contextWindow": 1050000,
+ "maxOutputTokens": 128000,
+ "efforts": ["low", "medium", "high", "xhigh", "max"],
+ "defaultEffort": "medium",
+ "supportsImageInput": true
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 2,
+ "outputPerMtok": 10,
+ "cacheReadPerMtok": 0.2,
+ "cacheWritePerMtok": 2.5,
+ "effectiveFrom": "2026-09-22",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/pricing",
+ "verifiedAt": "2026-09-23"
+ },
+ "maxInputTokens": 272001
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 4,
+ "outputPerMtok": 15.0,
+ "cacheReadPerMtok": 0.4,
+ "cacheWritePerMtok": 5.0,
+ "effectiveFrom": "2026-09-22",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/pricing",
+ "verifiedAt": "2026-09-23"
+ },
+ "minInputTokens": 272001
+ },
+ {
+ "currency": "USD",
+ "variant": "fast",
+ "inputPerMtok": 4,
+ "outputPerMtok": 20,
+ "cacheReadPerMtok": 0.4,
+ "cacheWritePerMtok": 5.0,
+ "effectiveFrom": "2026-09-22",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/pricing",
+ "verifiedAt": "2026-09-23"
+ },
+ "maxInputTokens": 272001
+ },
+ {
+ "currency": "USD",
+ "variant": "fast",
+ "inputPerMtok": 8,
+ "outputPerMtok": 30.0,
+ "cacheReadPerMtok": 0.8,
+ "cacheWritePerMtok": 10.0,
+ "effectiveFrom": "2026-09-22",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/pricing",
+ "verifiedAt": "2026-09-23"
+ },
+ "minInputTokens": 272001
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "openai/gpt-6-luna",
+ "aliases": ["gpt-6-luna"],
+ "defaults": {
+ "name": "GPT-6 Luna",
+ "group": "gpt",
+ "contextWindow": 1050000,
+ "maxOutputTokens": 128000,
+ "efforts": ["low", "medium", "high", "xhigh", "max"],
+ "defaultEffort": "medium",
+ "supportsImageInput": true
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.1,
+ "outputPerMtok": 0.5,
+ "cacheReadPerMtok": 0.01,
+ "cacheWritePerMtok": 0.125,
+ "effectiveFrom": "2026-09-22",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/pricing",
+ "verifiedAt": "2026-09-23"
+ },
+ "maxInputTokens": 272001
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.2,
+ "outputPerMtok": 0.75,
+ "cacheReadPerMtok": 0.02,
+ "cacheWritePerMtok": 0.25,
+ "effectiveFrom": "2026-09-22",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/pricing",
+ "verifiedAt": "2026-09-23"
+ },
+ "minInputTokens": 272001
+ },
+ {
+ "currency": "USD",
+ "variant": "fast",
+ "inputPerMtok": 0.2,
+ "outputPerMtok": 1.0,
+ "cacheReadPerMtok": 0.02,
+ "cacheWritePerMtok": 0.25,
+ "effectiveFrom": "2026-09-22",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/pricing",
+ "verifiedAt": "2026-09-23"
+ },
+ "maxInputTokens": 272001
+ },
+ {
+ "currency": "USD",
+ "variant": "fast",
+ "inputPerMtok": 0.4,
+ "outputPerMtok": 1.5,
+ "cacheReadPerMtok": 0.04,
+ "cacheWritePerMtok": 0.5,
+ "effectiveFrom": "2026-09-22",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://developers.openai.com/api/docs/pricing",
+ "verifiedAt": "2026-09-23"
+ },
+ "minInputTokens": 272001
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "anthropic/claude-opus-5-5",
+ "aliases": ["claude-opus-5-5"],
+ "defaults": {
+ "name": "Opus 5.5",
+ "group": "anthropic",
+ "contextWindow": 1000000,
+ "maxOutputTokens": 128000,
+ "efforts": ["low", "medium", "high", "xhigh", "max"],
+ "defaultEffort": "medium",
+ "supportsImageInput": true
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 4,
+ "outputPerMtok": 20,
+ "cacheReadPerMtok": 0.2,
+ "cacheWritePerMtok": 5.0,
+ "effectiveFrom": "2026-09-22",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.claude.com/docs/en/about-claude/pricing",
+ "verifiedAt": "2026-09-23"
+ },
+ "cacheWrite1hPerMtok": 8
+ },
+ {
+ "currency": "USD",
+ "variant": "fast",
+ "inputPerMtok": 8,
+ "outputPerMtok": 40,
+ "cacheReadPerMtok": 0.4,
+ "cacheWritePerMtok": 10.0,
+ "effectiveFrom": "2026-09-22",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.claude.com/docs/en/about-claude/pricing",
+ "verifiedAt": "2026-09-23"
+ },
+ "cacheWrite1hPerMtok": 16
+ }
+ ]
+ }
+ ]
+ },
{
"id": "openai/gpt-5.6-sol",
"aliases": [
@@ -3680,12 +3962,7 @@
"name": "Grok 4.7",
"group": "grok",
"contextWindow": 500000,
- "efforts": [
- "low",
- "medium",
- "high",
- "xhigh"
- ],
+ "efforts": ["low", "medium", "high", "xhigh"],
"defaultEffort": "high",
"supportsImageInput": true
},
@@ -5234,7 +5511,22 @@
"kind": "provider-official",
"url": "https://platform.kimi.com/docs/pricing/chat-k3",
"verifiedAt": "2026-09-11"
- }
+ },
+ "effectiveUntil": "2026-09-23"
+ },
+ {
+ "currency": "CNY",
+ "variant": "standard",
+ "inputPerMtok": 20,
+ "outputPerMtok": 100,
+ "cacheReadPerMtok": 2,
+ "effectiveFrom": "2026-09-23",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.kimi.com/",
+ "verifiedAt": "2026-09-23"
+ },
+ "cacheWritePerMtok": 20
}
]
},
@@ -5252,7 +5544,22 @@
"kind": "provider-official",
"url": "https://platform.kimi.ai/docs/pricing/chat-k3",
"verifiedAt": "2026-09-11"
- }
+ },
+ "effectiveUntil": "2026-09-23"
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 3,
+ "outputPerMtok": 15,
+ "cacheReadPerMtok": 0.3,
+ "effectiveFrom": "2026-09-23",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.kimi.ai/",
+ "verifiedAt": "2026-09-23"
+ },
+ "cacheWritePerMtok": 3
}
]
}
@@ -5384,7 +5691,27 @@
"aliases": [],
"defaults": {
"name": "Muse Spark 1.2"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 1.25,
+ "outputPerMtok": 4.25,
+ "cacheReadPerMtok": 0.15,
+ "effectiveFrom": "2026-09-23",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://dev.meta.ai/docs/pricing-rate-limits",
+ "verifiedAt": "2026-09-23"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "xd/moonshotai-kimi-k3",
@@ -5412,7 +5739,22 @@
"kind": "provider-official",
"url": "https://platform.kimi.ai/docs/pricing/chat-k3",
"verifiedAt": "2026-09-11"
- }
+ },
+ "effectiveUntil": "2026-09-23"
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 3,
+ "outputPerMtok": 15,
+ "cacheReadPerMtok": 0.3,
+ "effectiveFrom": "2026-09-23",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://platform.kimi.ai/",
+ "verifiedAt": "2026-09-23"
+ },
+ "cacheWritePerMtok": 3
}
]
}
@@ -5432,7 +5774,27 @@
"defaults": {
"name": "Hy4 preview",
"defaultEffort": "medium"
- }
+ },
+ "referencePriceGroups": [
+ {
+ "id": "cn",
+ "prices": [
+ {
+ "currency": "CNY",
+ "variant": "standard",
+ "inputPerMtok": 6,
+ "outputPerMtok": 18,
+ "cacheReadPerMtok": 0.3,
+ "effectiveFrom": "2026-09-23",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://cloud.tencent.com/product/tokenhub",
+ "verifiedAt": "2026-09-23"
+ }
+ }
+ ]
+ }
+ ]
},
{
"id": "qwen/qwen3.5-4b",
@@ -5788,6 +6150,74 @@
]
}
]
+ },
+ {
+ "id": "meta/muse-spark-1.3",
+ "aliases": ["muse-spark-1.3"],
+ "defaults": {
+ "name": "Muse Spark 1.3"
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 1.25,
+ "outputPerMtok": 4.25,
+ "cacheReadPerMtok": 0.15,
+ "effectiveFrom": "2026-09-23",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://dev.meta.ai/docs/pricing-rate-limits",
+ "verifiedAt": "2026-09-23"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "google/gemini-3.8-flash",
+ "aliases": ["gemini-3.8-flash"],
+ "defaults": {
+ "name": "Gemini 3.8 Flash"
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 0.75,
+ "outputPerMtok": 3.75,
+ "cacheReadPerMtok": 0.075,
+ "effectiveFrom": "2026-09-23",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://ai.google.dev/gemini-api/docs/pricing",
+ "verifiedAt": "2026-09-23"
+ },
+ "effectiveUntil": "2027-01-01"
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 1.5,
+ "outputPerMtok": 7.5,
+ "cacheReadPerMtok": 0.15,
+ "effectiveFrom": "2027-01-01",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://ai.google.dev/gemini-api/docs/pricing",
+ "verifiedAt": "2026-09-23"
+ }
+ }
+ ]
+ }
+ ]
}
]
}
diff --git a/packages/model-providers/src/__tests__/modelRegistryConsistency.test.ts b/packages/model-providers/src/__tests__/modelRegistryConsistency.test.ts
index 085d7dec13..3b0d586df9 100644
--- a/packages/model-providers/src/__tests__/modelRegistryConsistency.test.ts
+++ b/packages/model-providers/src/__tests__/modelRegistryConsistency.test.ts
@@ -147,6 +147,8 @@ describe("model registry data consistency", () => {
// usage. Their public API bands must not enlarge today's subscription window.
const subscriptionApiReferences = new Set([
"openai/gpt-6-astra",
+ "openai/gpt-6-sol",
+ "openai/gpt-6-luna",
"openai/gpt-5.6-sol",
"openai/gpt-5.6-terra",
"openai/gpt-5.6-luna",
diff --git a/packages/model-providers/src/__tests__/referencePriceCoverage.test.ts b/packages/model-providers/src/__tests__/referencePriceCoverage.test.ts
new file mode 100644
index 0000000000..e0a9bd7395
--- /dev/null
+++ b/packages/model-providers/src/__tests__/referencePriceCoverage.test.ts
@@ -0,0 +1,117 @@
+import { describe, expect, it } from "vitest";
+import { BUNDLED_CATALOG } from "../builtin.js";
+import {
+ resolveBaseModelReferencePrice,
+ resolveModelReferencePrice,
+} from "../modelRegistry.js";
+
+const registry = BUNDLED_CATALOG.modelRegistry;
+const at = "2026-09-23";
+
+describe("verified September reference-price coverage", () => {
+ it("resolves the existing Muse 1.2 route to its official tariff", () => {
+ expect(
+ resolveModelReferencePrice(registry, "xd", "meta/muse-spark-1.2", {
+ at,
+ officialOnly: true,
+ })?.price,
+ ).toMatchObject({
+ currency: "USD",
+ inputPerMtok: 1.25,
+ outputPerMtok: 4.25,
+ cacheReadPerMtok: 0.15,
+ });
+ });
+
+ it.each([
+ ["moonshot-kimi-cn", "kimi-k3", "CNY", 20],
+ ["moonshot-kimi-global", "kimi-k3", "USD", 3],
+ ["xd", "moonshot/kimi-k3", "USD", 3],
+ ["xd", "moonshotai/kimi-k3", "USD", 3],
+ ] as const)(
+ "resolves %s/%s cache writes without rewriting history",
+ (provider, model, currency, write) => {
+ const price = resolveModelReferencePrice(registry, provider, model, {
+ at,
+ })?.price;
+ expect(price).toMatchObject({ currency, cacheWritePerMtok: write });
+ expect(price?.cacheWrite1hPerMtok).toBeUndefined();
+ expect(
+ resolveModelReferencePrice(registry, provider, model, {
+ at: "2026-09-22",
+ })?.price.cacheWritePerMtok,
+ ).toBeUndefined();
+ },
+ );
+
+ it("selects the verified HY4 market without substituting dollars", () => {
+ expect(
+ resolveBaseModelReferencePrice(registry, "tencent/hy4-preview", { at })
+ ?.price,
+ ).toMatchObject({
+ currency: "CNY",
+ inputPerMtok: 6,
+ outputPerMtok: 18,
+ cacheReadPerMtok: 0.3,
+ });
+ expect(
+ resolveModelReferencePrice(registry, "xd", "tencent/hy4-preview", {
+ at,
+ currency: "USD",
+ }),
+ ).toBeUndefined();
+ });
+
+ it("keeps price-only models independent of provider membership", () => {
+ expect(
+ resolveBaseModelReferencePrice(registry, "muse-spark-1.3", { at })?.price,
+ ).toMatchObject({
+ inputPerMtok: 1.25,
+ outputPerMtok: 4.25,
+ cacheReadPerMtok: 0.15,
+ });
+ expect(
+ registry?.models.some((m) => m.modelRef === "meta/muse-spark-1.3"),
+ ).toBe(false);
+ expect(
+ registry?.models.some((m) => m.modelRef === "google/gemini-3.8-flash"),
+ ).toBe(false);
+ });
+
+ it("switches Gemini's promotional price at the published date", () => {
+ expect(
+ resolveBaseModelReferencePrice(registry, "gemini-3.8-flash", {
+ at: "2026-12-31",
+ })?.price,
+ ).toMatchObject({
+ inputPerMtok: 0.75,
+ outputPerMtok: 3.75,
+ cacheReadPerMtok: 0.075,
+ });
+ expect(
+ resolveBaseModelReferencePrice(registry, "gemini-3.8-flash", {
+ at: "2027-01-01",
+ })?.price,
+ ).toMatchObject({
+ inputPerMtok: 1.5,
+ outputPerMtok: 7.5,
+ cacheReadPerMtok: 0.15,
+ });
+ });
+
+ it("does not present the K2.8 reseller estimate as a manufacturer tariff", () => {
+ expect(
+ resolveBaseModelReferencePrice(registry, "moonshotai/kimi-k2.8-preview", {
+ at,
+ }),
+ ).toBeUndefined();
+ expect(
+ resolveModelReferencePrice(
+ registry,
+ "moonshot-kimi-code",
+ "kimi-for-coding",
+ { at, officialOnly: true },
+ ),
+ ).toBeUndefined();
+ });
+});