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。

feat(models): 订阅模型顺序以账号为准,默认显示由目录决定,预设改为一份推荐清单 (#5119)

Dash4c8c031c47b9
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 1a5ae1d6c0..c363b390e0 100644
--- a/apps/desktop/src/main/maker-host/__tests__/activeCatalogDiscovery.test.ts
+++ b/apps/desktop/src/main/maker-host/__tests__/activeCatalogDiscovery.test.ts
@@ -226,6 +226,32 @@ describe('active-catalog discovered augment', () => {
expect(selected.id).toBe('openai-parity');
expect(selected.auth).toEqual({ method: 'oauth', native: 'codex' });
});
+
+ it('独立 ChatGPT 账号同样按账号返回顺序排,不被 Registry sortOrder 改写', () => {
+ // Registry 里 Luna 排在 Sol 前;账号按 Sol、Luna 返回。
+ const account = buildUserProvider(
+ {
+ id: 'openai-order',
+ name: 'Separate account',
+ auth: { method: 'oauth', native: 'codex' },
+ runtimes: {
+ codex: {
+ baseUrl: 'https://chatgpt.com/backend-api/codex',
+ models: [
+ { id: 'gpt-5.6-sol', name: 'Sol' },
+ { id: 'gpt-5.6-luna', name: 'Luna' },
+ ],
+ },
+ },
+ },
+ { modelRegistry: BUNDLED_CATALOG.modelRegistry },
+ );
+ setActiveCatalog({ ...BUNDLED_CATALOG, providers: [...BUNDLED_CATALOG.providers, account] });
+ const selected = getActiveCatalog().providers.find((p) => p.id === account.id)!;
+ const ids = (selected.models.codex ?? []).map((m) => m.id);
+ expect(ids.indexOf('gpt-5.6-sol')).toBe(0);
+ expect(ids.indexOf('gpt-5.6-luna')).toBe(1);
+ });
afterEach(() => {
// 复位全局状态,避免测试间串扰
setActiveCatalog(BUNDLED_CATALOG);
@@ -725,7 +751,12 @@ describe('active-catalog discovered augment', () => {
setDiscoveredCodexModels([fake('gpt-5.7', 17), fake('gpt-5.5', 20)]);
expect(openaiIds('codex')).toEqual(['gpt-5.7', 'gpt-5.5']);
expect(openaiIds('claude-code')).toEqual(['chatgpt/gpt-5.7', 'chatgpt/gpt-5.5']);
- expect(openaiIds('pi')).toEqual([...piBeforeDiscovery, 'chatgpt/gpt-5.7']);
+ // Pi 成员来自 Pi 目录并补上账号新型号;顺序与 Codex 共用账号顺序,目录独有的接在后面。
+ expect(openaiIds('pi')).toEqual([
+ 'chatgpt/gpt-5.7',
+ 'chatgpt/gpt-5.5',
+ ...piBeforeDiscovery.filter((id) => id !== 'chatgpt/gpt-5.5'),
+ ]);
// 动态快照决定存在性,且明确返回的运行时能力高于 registry 基线。
const openai = getActiveCatalog().providers.find((p) => p.id === 'openai');
expect((openai?.models.codex ?? []).find((m) => m.id === 'gpt-5.5')?.contextWindow).toBe(
@@ -817,7 +848,7 @@ describe('anthropic 发现条目的 modelRegistry 元数据基线', () => {
setAnthropicDiscoveredModels([]);
});
- it('供应商显式名称优先,缺项继承公共名称与排序', () => {
+ it('供应商显式名称优先,缺项继承公共名称;顺序以账号为准,仅目录有的接在后面', () => {
setActiveCatalog(BUNDLED_CATALOG);
setAnthropicDiscoveredModels([
anthro('claude-opus-5', 'Claude Opus 5', 0),
@@ -832,26 +863,27 @@ 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-sonnet-5', 'Claude Sonnet 5'],
['claude-fable-5', 'Claude Fable 5'],
['claude-opus-4-8', 'Claude Opus 4.8'],
['claude-opus-4-7', 'Claude Opus 4.7'],
+ ['claude-sonnet-4-6', 'Claude Sonnet 4.6'],
['claude-opus-4-6', 'Claude Opus 4.6'],
['claude-opus-4-5', 'Claude Opus 4.5'],
- ['claude-sonnet-5', 'Claude Sonnet 5'],
- ['claude-sonnet-4-6', 'Claude Sonnet 4.6'],
- ['claude-sonnet-4-5', 'Claude Sonnet 4.5'],
['claude-haiku-4-5', 'Claude Haiku 4.5'],
+ ['claude-sonnet-4-5', 'Claude Sonnet 4.5'],
+ ['claude-opus-5-5', 'Opus 5.5'],
['claude-fable-5-1', 'Fable 5.1'],
['claude-mythos-5', 'Mythos 5'],
]);
+ expect(anthropicList().map((m) => m.sortOrder)).toEqual([...Array(13).keys()]);
expect(
anthropicList('claude-code')
.filter((model) => model.defaultEnabled !== false)
.map((model) => model.id)
.sort(),
- ).toEqual(['claude-fable-5', 'claude-fable-5-1', 'claude-haiku-4-5', 'claude-mythos-5', 'claude-opus-4-8', 'claude-opus-5', 'claude-opus-5-5', 'claude-sonnet-5']);
+ ).toEqual(['claude-fable-5-1', 'claude-haiku-4-5', 'claude-mythos-5', 'claude-opus-5-5', 'claude-sonnet-5']);
// Claude 订阅只供 Claude Code:不投影 Codex bridge,也不给 Pi。
expect(anthropicList('codex')).toEqual([]);
expect(anthropicList('pi')).toEqual([]);
diff --git a/apps/desktop/src/main/maker-host/__tests__/anthropicModelDiscovery.test.ts b/apps/desktop/src/main/maker-host/__tests__/anthropicModelDiscovery.test.ts
index 4e32741122..92388047e8 100644
--- a/apps/desktop/src/main/maker-host/__tests__/anthropicModelDiscovery.test.ts
+++ b/apps/desktop/src/main/maker-host/__tests__/anthropicModelDiscovery.test.ts
@@ -112,7 +112,7 @@ describe('mapAnthropicSdkModels', () => {
defaultEffort: 'high',
supportsFastMode: true,
});
- // supportsEffort=false → 不可调;fast 缺省 false;haiku → 200k + 默认收起。
+ // supportsEffort=false → 不可调;fast 缺省 false;haiku → 200k,不再写死默认收起。
expect(out[1]).toMatchObject({ hasEffortInfo: true, hasFastModeInfo: false });
expect(out[1].model).toMatchObject({
id: 'claude-haiku-4-5',
@@ -120,8 +120,8 @@ describe('mapAnthropicSdkModels', () => {
efforts: [],
defaultEffort: null,
supportsFastMode: false,
- defaultEnabled: false,
});
+ expect(out[1].model.defaultEnabled).toBeUndefined();
});
it('能力字段全缺席 = 未知:目录基线优先,两项来源都为 false', () => {
@@ -135,7 +135,8 @@ describe('mapAnthropicSdkModels', () => {
defaultEffort: 'high',
supportsFastMode: false,
});
- expect(out[1].model).toMatchObject({ efforts: [], defaultEnabled: false });
+ expect(out[1].model).toMatchObject({ efforts: [] });
+ expect(out[1].model.defaultEnabled).toBeUndefined();
});
it('SDK 未下发窗口时使用目录中的官方窗口', () => {
diff --git a/apps/desktop/src/main/maker-host/__tests__/codexModelDiscovery.test.ts b/apps/desktop/src/main/maker-host/__tests__/codexModelDiscovery.test.ts
index de7351ddce..7aa8df2fff 100644
--- a/apps/desktop/src/main/maker-host/__tests__/codexModelDiscovery.test.ts
+++ b/apps/desktop/src/main/maker-host/__tests__/codexModelDiscovery.test.ts
@@ -247,7 +247,7 @@ describe('mapCodexModelsToCatalog', () => {
expect(out.find((m) => m.id === 'gpt-5.6')?.supportsFastMode).toBeUndefined();
});
- it('display name 保持纯净,保留模型自报的全部合法 effort(含 max/ultra),priority 对齐静态排序锚点', () => {
+ it('display name 保持纯净,保留模型自报的全部合法 effort(含 max/ultra),sortOrder 直接取 priority(账号顺序)', () => {
const out = mapCodexModelsToCatalog(SAMPLE);
expect(out.every((m) => !m.name.includes('订阅'))).toBe(true);
// issue #352:max/ultra 是合法 Codex 档,不再被 CODEX_EFFORTS 白名单过滤掉。
@@ -258,9 +258,9 @@ describe('mapCodexModelsToCatalog', () => {
'max',
'ultra',
]);
- expect(out.find((m) => m.id === 'gpt-5.6')?.sortOrder).toBe(19);
- expect(out.find((m) => m.id === 'gpt-5.5')?.sortOrder).toBe(20);
- expect(out.find((m) => m.id === 'gpt-5.4')?.sortOrder).toBe(21);
+ expect(out.find((m) => m.id === 'gpt-5.6')?.sortOrder).toBe(3);
+ expect(out.find((m) => m.id === 'gpt-5.5')?.sortOrder).toBe(7);
+ expect(out.find((m) => m.id === 'gpt-5.4')?.sortOrder).toBe(16);
});
it('只放行 CODEX_EFFORTS 白名单内的档(含 max/ultra),未知 effort id 仍被过滤', () => {
@@ -285,7 +285,7 @@ describe('mapCodexModelsToCatalog', () => {
expect(out[0].efforts).toEqual(['high', 'max', 'ultra']);
});
- it('legacy 默认隐藏策略:gpt-5.4-mini defaultEnabled:false(旧目录可见性不因清单动态化漂移)', () => {
+ it('不再写死隐藏例外:gpt-5.4-mini 发现时同样默认可见(是否收起只看模型目录)', () => {
const out = mapCodexModelsToCatalog({
models: [
{
@@ -299,7 +299,7 @@ describe('mapCodexModelsToCatalog', () => {
},
],
});
- expect(out[0].defaultEnabled).toBe(false);
+ expect(out[0].defaultEnabled).toBe(true);
});
it('坏输入(非对象 / 无 models / 空)→ 空数组,不抛', () => {
@@ -395,10 +395,10 @@ describe('mapCodexAppServerModelsToCatalog', () => {
efforts: ['low', 'xhigh'],
defaultEffort: 'xhigh',
supportsFastMode: true,
- sortOrder: 17,
+ sortOrder: 0,
});
- expect(out[1].defaultEnabled).toBe(false);
- expect(out[1].sortOrder).toBe(17.003);
+ expect(out[1].defaultEnabled).toBe(true);
+ expect(out[1].sortOrder).toBe(3);
// live 协议不给 context_window,这 272k 是统一兜底 → 一律不得标记为已核实。
// 标了它就会被拿去收敛运行期上报的窗口,把真实更大的窗口压成 272k。
expect(out.every((model) => model.contextWindowVerified === undefined)).toBe(true);
diff --git a/apps/desktop/src/main/maker-host/__tests__/codexProxyHost.test.ts b/apps/desktop/src/main/maker-host/__tests__/codexProxyHost.test.ts
index cecf976d06..18b0d6cda6 100644
--- a/apps/desktop/src/main/maker-host/__tests__/codexProxyHost.test.ts
+++ b/apps/desktop/src/main/maker-host/__tests__/codexProxyHost.test.ts
@@ -781,6 +781,8 @@ describe('chatBridgeCapabilitiesForRoute', () => {
it.each([
['https://api.kimi.com/coding/v1', 'k3'],
['https://api.kimi.com/coding/v1/', 'k3-256k'],
+ ['https://api.kimi.com/coding/v1', 'kimi-for-coding'],
+ ['https://api.kimi.com/coding/v1', 'kimi-for-coding-highspeed'],
])('enables image_url for Kimi Code coding-plan route: %s / %s (#2732)', async (upstream, model) => {
const { chatBridgeCapabilitiesForRoute } = await freshCodexProxyHost();
expect(chatBridgeCapabilitiesForRoute(upstream, model).imageInput).toBe('image_url');
@@ -824,18 +826,31 @@ describe('chatBridgeCapabilitiesForRoute', () => {
['https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1', 'qwen3.7-plus'],
['https://coding.dashscope.aliyuncs.com/v1', 'qwen3.8-max-preview'],
['https://coding.dashscope.aliyuncs.com/v1', 'qwen3.6-flash'],
+ ['https://coding.dashscope.aliyuncs.com/v1', 'qwen3.6-plus'],
+ ['https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1', 'qwen3.8-max'],
+ ['https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1', 'qwen3.8-flash'],
])('enables image_url for Qwen on official DashScope host: %s / %s', async (upstream, model) => {
const { chatBridgeCapabilitiesForRoute } = await freshCodexProxyHost();
expect(chatBridgeCapabilitiesForRoute(upstream, model).imageInput).toBe('image_url');
});
it.each([
+ ['https://api.moonshot.cn/v1', 'kimi-k3'],
+ ['https://api.moonshot.ai/v1', 'kimi-k2.7-code'],
+ ['https://api.moonshot.cn/v1', 'kimi-k2.7-code-highspeed'],
['https://api.moonshot.cn/v1', 'kimi-k2.6'],
+ ])('enables image_url for Kimi on official Moonshot host: %s / %s', async (upstream, model) => {
+ const { chatBridgeCapabilitiesForRoute } = await freshCodexProxyHost();
+ expect(chatBridgeCapabilitiesForRoute(upstream, model).imageInput).toBe('image_url');
+ });
+
+ it.each([
+ ['https://api.moonshot.cn/v1', 'kimi-k2.5'],
// Kimi Code: non-HTTPS, spoofed subdomain, and models without verified image support stay closed.
['http://api.kimi.com/coding/v1', 'k3'],
['https://api.kimi.com.evil.example/coding/v1', 'k3'],
['https://api.kimi.com/coding/v1', 'kimi-k3'],
- ['https://api.kimi.com/coding/v1', 'kimi-for-coding'],
+ ['https://api.moonshot.cn/v1', 'kimi-for-coding'],
['https://api.moonshot.cn/v1', 'k3'],
['https://api.deepseek.com/v1', 'kimi-k3'],
['https://api.moonshot.cn.evil.example/v1', 'kimi-k3'],
diff --git a/apps/desktop/src/main/maker-host/__tests__/customProviderOAuth.test.ts b/apps/desktop/src/main/maker-host/__tests__/customProviderOAuth.test.ts
index 9dab1f98b1..ad9b560fbb 100644
--- a/apps/desktop/src/main/maker-host/__tests__/customProviderOAuth.test.ts
+++ b/apps/desktop/src/main/maker-host/__tests__/customProviderOAuth.test.ts
@@ -175,14 +175,15 @@ describe('mergeDiscoveredModelsIntoConfig(发现资料刷新并保留用户字
{ id: 'm2', name: 'M2' },
{ id: '', name: 'bad' },
]);
+ // 新发现的 m2 排在已有 m1 之前。
expect(merged?.runtimes['claude-code']?.models).toEqual([
+ { id: 'm2', name: 'M2', discoveredMetadata: { name: 'M2' } },
{
id: 'm1',
name: 'M1',
nameExplicit: true,
discoveredMetadata: { name: 'OVERRIDE-IGNORED' },
},
- { id: 'm2', name: 'M2', discoveredMetadata: { name: 'M2' } },
]);
// 原配置不被就地修改(纯函数)。
expect(BASE.runtimes['claude-code']?.models).toEqual([{ id: 'm1', name: 'M1' }]);
@@ -201,9 +202,9 @@ describe('mergeDiscoveredModelsIntoConfig(发现资料刷新并保留用户字
{ id: 'bogus', name: 'Bogus', contextWindow: 0 },
]);
expect(merged?.runtimes['claude-code']?.models).toEqual([
- { id: 'm1', name: 'M1' },
{ id: 'big', name: 'Big', discoveredMetadata: { name: 'Big', contextWindow: 1_000_000 } },
{ id: 'bogus', name: 'Bogus', discoveredMetadata: { name: 'Bogus' } },
+ { id: 'm1', name: 'M1' },
]);
});
});
diff --git a/apps/desktop/src/main/maker-host/__tests__/modelPlane.test.ts b/apps/desktop/src/main/maker-host/__tests__/modelPlane.test.ts
index 1bce0d9145..2e62ce9644 100644
--- a/apps/desktop/src/main/maker-host/__tests__/modelPlane.test.ts
+++ b/apps/desktop/src/main/maker-host/__tests__/modelPlane.test.ts
@@ -732,7 +732,7 @@ describe('retired tombstone 与 discovery 回补', () => {
});
describe('本地 override(local 永远最高)', () => {
- it('已有条目仅修改 sortOrder 也立即重排,但 xAI 双 root 保留声明顺序', () => {
+ it('账号顺序压过 Registry sortOrder,本地 sortOrder patch 仍最高;xAI 双 root 保留声明顺序', () => {
setActiveCatalog(
baseCatalog([
gpt6Entry({
@@ -753,7 +753,8 @@ describe('本地 override(local 永远最高)', () => {
{ id: 'gpt-a', name: 'A', contextWindow: 1, efforts: [], defaultEffort: null },
{ id: 'gpt-b', name: 'B', contextWindow: 1, efforts: [], defaultEffort: null },
]);
- expect(models('openai', 'codex').map((model) => model.id)).toEqual(['gpt-b', 'gpt-a']);
+ // Registry 说 b(10) 在 a(20) 前,但账号返回 a、b:以账号为准。
+ expect(models('openai', 'codex').map((model) => model.id)).toEqual(['gpt-a', 'gpt-b']);
const xaiOrder = models('xai', 'codex').map((model) => model.id);
const [firstXai, secondXai] = xaiOrder;
@@ -761,14 +762,14 @@ describe('本地 override(local 永远最高)', () => {
setLocalCatalogOverrides(
overridesOf({
patches: {
- 'openai:gpt-a': { base: { sortOrder: 1 } },
- 'openai:gpt-b': { base: { sortOrder: 30 } },
+ 'openai:gpt-a': { base: { sortOrder: 30 } },
+ 'openai:gpt-b': { base: { sortOrder: 1 } },
[`xai:${firstXai}`]: { base: { sortOrder: 999 } },
[`xai:${secondXai}`]: { base: { sortOrder: -1 } },
},
}),
);
- expect(models('openai', 'codex').map((model) => model.id)).toEqual(['gpt-a', 'gpt-b']);
+ expect(models('openai', 'codex').map((model) => model.id)).toEqual(['gpt-b', 'gpt-a']);
expect(models('xai', 'codex').map((model) => model.id)).toEqual(xaiOrder);
});
@@ -1187,3 +1188,98 @@ it('keeps V4 media routes out of chat root warnings without hiding invalid chat
expect(plan.roots.size).toBe(0);
expect(plan.warnings).toEqual([expect.objectContaining({ modelId: 'broken-chat', reason: 'route has no canonical root agent membership' })]);
});
+
+describe('订阅模型顺序以账号为准', () => {
+ const discovered = (id: string, sortOrder?: number): CatalogModel => ({
+ id,
+ name: id,
+ contextWindow: 1,
+ efforts: [],
+ defaultEffort: null,
+ ...(sortOrder !== undefined ? { sortOrder } : {}),
+ });
+
+ it('Registry 缺条目或缺 sortOrder 的账号模型仍按账号位置排,仅目录有的接在后面', () => {
+ setActiveCatalog(
+ baseCatalog([
+ gpt6Entry({ sortOrder: 1 }),
+ gpt6Entry({
+ id: 'openai/gpt-catalog-only',
+ name: 'Catalog Only',
+ sortOrder: -5,
+ routes: [{ providerId: 'openai', modelId: 'gpt-catalog-only', agents: ['codex'] }],
+ }),
+ ]),
+ );
+ // 账号顺序:priority 小的在前;gpt-new 在 Registry 里没有条目。
+ setDiscoveredCodexModels([discovered('gpt-6', 2), discovered('gpt-new', 1)]);
+ expect(models('openai', 'codex').map((model) => [model.id, model.sortOrder])).toEqual([
+ ['gpt-new', 0],
+ ['gpt-6', 1],
+ ['gpt-catalog-only', 2],
+ ]);
+ // Claude Code bridge 与 Codex root 同序。
+ expect(models('openai', 'claude-code').map((model) => model.id)).toEqual([
+ 'chatgpt/gpt-new',
+ 'chatgpt/gpt-6',
+ ]);
+ });
+
+ it('账号清单为空时用 Registry sortOrder 兜底', () => {
+ setActiveCatalog(
+ baseCatalog([
+ gpt6Entry({ sortOrder: 5 }),
+ gpt6Entry({
+ id: 'openai/gpt-first',
+ name: 'First',
+ sortOrder: 1,
+ routes: [{ providerId: 'openai', modelId: 'gpt-first', agents: ['codex'] }],
+ }),
+ ]),
+ );
+ setDiscoveredCodexModels([]);
+ expect(models('openai', 'codex').map((model) => model.id)).toEqual(['gpt-first', 'gpt-6']);
+ });
+
+ it('Anthropic 按账号返回顺序排,不被 Registry sortOrder 改写', () => {
+ setActiveCatalog(
+ baseCatalog([
+ {
+ id: 'anthropic/claude-a',
+ name: 'A',
+ status: 'active',
+ contextWindow: 200_000,
+ sortOrder: 9,
+ routes: [{ providerId: 'anthropic', modelId: 'claude-a', agents: ['claude-code'] }],
+ } as RegistryEntry,
+ ]),
+ );
+ setAnthropicDiscoveredModels([discovered('claude-a', 0), discovered('claude-b', 1)]);
+ expect(models('anthropic', 'claude-code').map((model) => model.id)).toEqual([
+ 'claude-a',
+ 'claude-b',
+ ]);
+ });
+});
+
+describe('OpenAI 订阅 Pi 与 Codex 同序同显示', () => {
+ const discovered = (id: string, sortOrder: number): CatalogModel => ({
+ id,
+ name: id,
+ contextWindow: 272_000,
+ efforts: [],
+ defaultEffort: null,
+ sortOrder,
+ });
+
+ it('Pi 按账号顺序排列,并沿用目录的不默认显示标记', () => {
+ setActiveCatalog(BUNDLED_CATALOG);
+ setDiscoveredCodexModels([discovered('gpt-5.6-luna', 1), discovered('gpt-6-sol', 0)]);
+ const pi = models('openai', 'pi');
+ const ids = pi.map((model) => model.id);
+ expect(ids.indexOf('chatgpt/gpt-6-sol')).toBeGreaterThanOrEqual(0);
+ expect(ids.indexOf('chatgpt/gpt-6-sol')).toBeLessThan(ids.indexOf('chatgpt/gpt-5.6-luna'));
+ expect(pi.find((model) => model.id === 'chatgpt/gpt-5.6-luna')?.defaultEnabled).toBe(false);
+ expect(pi.find((model) => model.id === 'chatgpt/gpt-6-sol')?.defaultEnabled).not.toBe(false);
+ });
+});
diff --git a/apps/desktop/src/main/maker-host/__tests__/presetCodexImageBridge.test.ts b/apps/desktop/src/main/maker-host/__tests__/presetCodexImageBridge.test.ts
new file mode 100644
index 0000000000..2f47e99ed3
--- /dev/null
+++ b/apps/desktop/src/main/maker-host/__tests__/presetCodexImageBridge.test.ts
@@ -0,0 +1,40 @@
+import { describe, expect, it } from 'vitest';
+
+import { BUNDLED_CATALOG } from '@cindy/model-providers';
+
+import { chatBridgeCapabilitiesForRoute } from '../codex-proxy-host.js';
+
+describe('预设 Codex 图片能力与 Chat 桥接一致', () => {
+ it('走 openai-chat 的 Codex 模型只有桥接已验证时才声明支持图片', () => {
+ const mismatched: string[] = [];
+ for (const preset of BUNDLED_CATALOG.presets ?? []) {
+ const runtime = preset.runtimes.codex;
+ if (!runtime) continue;
+ for (const model of runtime.models) {
+ const wire = model.route?.wireProtocol ?? runtime.wireProtocol ?? 'openai-responses';
+ if (wire !== 'openai-chat' || model.supportsImageInput !== true) continue;
+ const upstream = model.route?.baseUrl ?? runtime.baseUrl;
+ if (chatBridgeCapabilitiesForRoute(upstream, model.id).imageInput !== 'image_url') {
+ mismatched.push(`${preset.id}/${model.id}`);
+ }
+ }
+ }
+ expect(mismatched).toEqual([]);
+ });
+
+ it('第三方直连 Registry 路由不在路由级声明图片输入(路由默认值会作用到 Codex)', () => {
+ const firstParty = new Set(['xd', 'openai', 'anthropic']);
+ const offenders = (BUNDLED_CATALOG.modelRegistry?.models ?? []).flatMap((entry) =>
+ entry.routes
+ .filter(
+ (route) =>
+ !firstParty.has(route.providerId) &&
+ route.agents.includes('codex') &&
+ (route.defaults?.supportsImageInput === true ||
+ route.forceOverrides?.supportsImageInput === true),
+ )
+ .map((route) => `${entry.id} ${route.providerId}:${route.modelId}`),
+ );
+ expect(offenders).toEqual([]);
+ });
+});
diff --git a/apps/desktop/src/main/maker-host/active-catalog.ts b/apps/desktop/src/main/maker-host/active-catalog.ts
index 1c0617ba11..bafc2b1c19 100644
--- a/apps/desktop/src/main/maker-host/active-catalog.ts
+++ b/apps/desktop/src/main/maker-host/active-catalog.ts
@@ -808,10 +808,54 @@ function sortModelsByOrder(models: CatalogModel[]): CatalogModel[] {
}
/**
- * root 装配:registry plan(overlay / 实体化 / retired 标记)→ 本地 override
+ * 账号清单是订阅模型顺序的权威:账号返回的模型按账号顺序在前,只在 Registry 里有的
+ * 模型按 Registry sortOrder 接在其后。结果重写为连续 sortOrder,让选择器、新对话默认、
+ * bridge 等所有按 sortOrder 取序的下游共用同一顺序;Registry 缺条目或缺 sortOrder
+ * 不再让新模型排错位置。账号清单为空时原样返回,Registry 顺序作兜底。
+ */
+function applyAccountOrder(
+ models: readonly CatalogModel[],
+ accountModels: readonly CatalogModel[],
+): CatalogModel[] {
+ if (accountModels.length === 0) return [...models];
+ const rank = new Map(sortModelsByOrder([...accountModels]).map((model, index) => [model.id, index]));
+ const catalogOnly = sortModelsByOrder(models.filter((model) => !rank.has(model.id)));
+ catalogOnly.forEach((model, index) => rank.set(model.id, accountModels.length + index));
+ return models.map((model) => ({ ...model, sortOrder: rank.get(model.id)! }));
+}
+
+/**
+ * OpenAI 订阅的 Pi 清单与 Codex root 共用账号顺序和目录的「不默认显示」标记;成员与
+ * Pi 专属能力仍来自 Pi 目录。账号清单为空时保留 Pi 目录原顺序。
+ */
+function alignOpenAiPiWithAccount(
+ pi: readonly CatalogModel[],
+ accountCodex: readonly CatalogModel[],
+ registry: Catalog['modelRegistry'],
+): CatalogModel[] {
+ const account = accountCodex.map((model) => ({
+ ...model,
+ id: normalizePiModelId('openai', model.id),
+ }));
+ const ordered = account.length > 0 ? sortModelsByOrder(applyAccountOrder(pi, account)) : [...pi];
+ return ordered.map((model) => {
+ const bare = model.id.startsWith(CHATGPT_MODEL_PREFIX)
+ ? model.id.slice(CHATGPT_MODEL_PREFIX.length)
+ : model.id;
+ const entry =
+ registry?.models.find((candidate) => candidate.id === `openai/${bare}`) ??
+ findModelRegistryRoute(registry, 'openai', bare)?.entry;
+ return entry?.defaultEnabled === false && model.defaultEnabled !== false
+ ? { ...model, defaultEnabled: false }
+ : model;
+ });
+}
+
+/**
+ * root 装配:registry plan(overlay / 实体化 / retired 标记)→ 账号顺序 → 本地 override
* (addition 整条胜 + patch 逐字段)→ retired 复标——patch 改 status 也压不掉
* 远端 tombstone,唯一复活通道是完整 local addition(hasLocalAddition 豁免)。
- * overlay / 本地 patch 合并后始终按最终 sortOrder 稳定重排;xAI legacy 根保留
+ * 合并后始终按最终 sortOrder 稳定重排;xAI legacy 根保留
* Registry 声明顺序,与服务端投影给旧客户端的数组保持逐项兼容。
*/
function assembleRoot(
@@ -821,6 +865,7 @@ function assembleRoot(
plan: ModelPlaneRegistryPlan,
preserveDeclarationOrder = false,
connectionId = providerId,
+ accountModels: readonly CatalogModel[] = [],
): CatalogModel[] {
const rootPlan = plan.roots.get(rootPlanKey(providerId, agent));
let out = applyRootRegistryPlan(models, rootPlan);
@@ -858,6 +903,8 @@ function assembleRoot(
};
});
}
+ // 用户本地 sortOrder patch 仍在其后生效(local 永远最高)。
+ out = applyAccountOrder(out, accountModels);
out = applyLocalOverridesToRoot(connectionId, agent, out, localOverrides, plan.warnings, providerId);
if (rootPlan && rootPlan.retired.size > 0) {
out = out.map((m) =>
@@ -1247,7 +1294,18 @@ function computeMerged(): Catalog {
// 实体化条目在未登录时也保持 presence——能否选中由连接态门控,presence ≠ entitlement。
providers = providers.map((p) => {
if (isOpenAiSubscriptionProvider(p)) {
- const root = assembleRoot('openai', 'codex', p.models.codex ?? [], plan, false, p.id);
+ // 独立 ChatGPT 账号把 app-server 清单按返回顺序写进自己的配置(无 sortOrder),
+ // 配置顺序即账号顺序。
+ const discoveredAccountCodex = discoveredByProvider.get(p.id)?.codex ?? [];
+ const accountCodex =
+ p.id === 'openai'
+ ? discoveredCodex
+ : discoveredAccountCodex.length > 0 || p.auth.native !== 'codex'
+ ? discoveredAccountCodex
+ : (p.models.codex ?? []);
+ const root = assembleRoot(
+ 'openai', 'codex', p.models.codex ?? [], plan, false, p.id, accountCodex,
+ );
const withRoot: Provider = { ...p, models: { ...p.models, codex: root } };
const remoteExcluded =
plan.roots.get(rootPlanKey('openai', 'codex'))?.bridgeExcluded ?? new Set<string>();
@@ -1308,15 +1366,20 @@ function computeMerged(): Catalog {
'claude-code',
projected.models['claude-code'] ?? [],
),
- pi: declaredPiModels('openai', p.id === 'openai'
- ? discoveredCodex : discoveredByProvider.get(p.id)?.codex ?? []),
+ pi: alignOpenAiPiWithAccount(
+ declaredPiModels('openai', p.id === 'openai'
+ ? discoveredCodex : discoveredByProvider.get(p.id)?.codex ?? []),
+ accountCodex,
+ (base ?? BUNDLED_CATALOG).modelRegistry,
+ ),
},
};
}
if (providerCatalogId(p) === 'anthropic') {
// Claude 订阅只供 Claude Code(内置 CLI 用它自己的登录),不向 Codex / Pi 投影。
- const seed = p.id === 'anthropic' && anthropicModels.length > 0 ? anthropicModels : (p.models['claude-code'] ?? []);
- const root = assembleRoot('anthropic', 'claude-code', seed, plan, false, p.id);
+ const accountModels = p.id === 'anthropic' ? anthropicModels : [];
+ const seed = accountModels.length > 0 ? accountModels : (p.models['claude-code'] ?? []);
+ const root = assembleRoot('anthropic', 'claude-code', seed, plan, false, p.id, accountModels);
return { ...p, models: { 'claude-code': root } };
}
if (providerCatalogId(p) === 'xai') {
diff --git a/apps/desktop/src/main/maker-host/codex-model-discovery.ts b/apps/desktop/src/main/maker-host/codex-model-discovery.ts
index c3b9772129..d34d3b76ff 100644
--- a/apps/desktop/src/main/maker-host/codex-model-discovery.ts
+++ b/apps/desktop/src/main/maker-host/codex-model-discovery.ts
@@ -53,13 +53,6 @@ function hasPriorityTier(tiers: unknown): boolean {
*/
const CODEX_EFFORTS = new Set(['low', 'medium', 'high', 'xhigh', 'max', 'ultra']);
-/**
- * 默认收起的 slug(旧产品目录 defaultEnabled:false 的延续):清单动态化后注册表不带
- * 可见性梯度(list/hide 之外),legacy 模型的「默认隐藏」是客户端展示策略,不能因
- * 静态段退役而静默漂移成全部可见。用户仍可在设置里手动开启(override 语义不变)。
- */
-const DEFAULT_HIDDEN_SLUGS: ReadonlySet<string> = new Set(['gpt-5.4-mini']);
-
/** Cindy 内部路由专用的 Codex 模型 ID,不应出现在任何用户可见模型目录。 */
const INTERNAL_CODEX_MODEL_IDS: ReadonlySet<string> = new Set(['codex-auto-review']);
@@ -75,37 +68,12 @@ function str(v: unknown): string | null {
return typeof v === 'string' && v.length > 0 ? v : null;
}
-/**
- * 把上游 priority 映射到静态目录已占用的排序锚点。锚点来自当前官方 cache 顺序:
- * Sol(1)→17、Terra(2)→18、Luna(3)→19、5.5(7)→20、5.4(16)→21、Mini(23)→22。
- * 区间线性插值让未来模型真实落在相邻静态模型之间,而不是一律塞到 GPT-5.5 后面。
- */
-function sortOrderForPriority(priority: number): number {
- const anchors = [
- [1, 17],
- [2, 18],
- [3, 19],
- [7, 20],
- [16, 21],
- [23, 22],
- ] as const;
- if (priority <= anchors[0][0]) return anchors[0][1] + (priority - anchors[0][0]) / 1000;
- for (let i = 1; i < anchors.length; i += 1) {
- const [rightPriority, rightOrder] = anchors[i];
- if (priority > rightPriority) continue;
- const [leftPriority, leftOrder] = anchors[i - 1];
- const ratio = (priority - leftPriority) / (rightPriority - leftPriority);
- return leftOrder + (rightOrder - leftOrder) * ratio;
- }
- const [lastPriority, lastOrder] = anchors[anchors.length - 1];
- return lastOrder + (priority - lastPriority) / 1000;
-}
-
/**
* codex models_cache 原始 JSON → 规范化的 Codex CatalogModel[]。纯函数。
*
* 只收 visibility:'list' && supported_in_api:true 且不在内部 ID 集合的模型;缺 slug 则跳过。
- * sortOrder 由 codex 的 priority 派生到 gpt 分组的一个子带内(纯展示,不影响路由 / 去重)。
+ * sortOrder 直接取 codex 的 priority(官方 picker 顺序);active-catalog 以它作为账号顺序
+ * 重排 root,不再映射到 Registry 的排序锚点。
*/
export function mapCodexModelsToCatalog(raw: unknown): CatalogModel[] {
const models =
@@ -165,8 +133,7 @@ export function mapCodexModelsToCatalog(raw: unknown): CatalogModel[] {
}),
name: displayName,
group: 'gpt',
- // 以静态模型的已知 priority/order 为锚点插值;active-catalog 对新增项做稳定排序。
- sortOrder: sortOrderForPriority(priority),
+ sortOrder: priority,
description: str(m.description) ?? undefined,
contextWindow,
...(contextWindowMax !== undefined ? { contextWindowMax } : {}),
@@ -177,8 +144,8 @@ export function mapCodexModelsToCatalog(raw: unknown): CatalogModel[] {
efforts: efforts as CatalogModel['efforts'],
defaultEffort,
status: 'active',
- // 新发现的模型默认可见(用户抱怨过看不到模型);legacy 模型沿用旧目录的默认隐藏策略。
- defaultEnabled: !DEFAULT_HIDDEN_SLUGS.has(slug),
+ // 新发现的模型默认可见;哪些不默认显示只由模型目录的 defaultEnabled 决定。
+ defaultEnabled: true,
};
if (efforts.includes('xhigh')) model.effortDisplayNames = { xhigh: 'Extra High' };
if (Array.isArray(m.service_tiers)) model.supportsFastMode = hasPriorityTier(m.service_tiers);
@@ -242,8 +209,8 @@ export function mapCodexAppServerModelsToCatalog(
}),
name: str(raw.displayName) ?? slug,
group: 'gpt',
- // app-server 已按官方 picker 顺序返回;给每项稳定的小数锚点保住该顺序。
- sortOrder: 17 + index / 1000,
+ // app-server 已按官方 picker 顺序返回;按返回位置记账户顺序。
+ sortOrder: index,
...(str(raw.description) ? { description: raw.description } : {}),
// 刻意**不**设 contextWindowVerified: live 协议不给 context_window, 这 272k 是
// 统一兜底而非该模型的真实上限。标了它就会被拿去收敛运行期上报的窗口, 把真实
@@ -252,7 +219,7 @@ export function mapCodexAppServerModelsToCatalog(
efforts: efforts as CatalogModel['efforts'],
defaultEffort,
status: 'active',
- defaultEnabled: !DEFAULT_HIDDEN_SLUGS.has(slug),
+ defaultEnabled: true,
...(Array.isArray(raw.serviceTiers) || Array.isArray(raw.additionalSpeedTiers)
? { supportsFastMode }
: {}),
diff --git a/apps/desktop/src/main/maker-host/codex-proxy-host.ts b/apps/desktop/src/main/maker-host/codex-proxy-host.ts
index b5cfbcbb34..947903436e 100644
--- a/apps/desktop/src/main/maker-host/codex-proxy-host.ts
+++ b/apps/desktop/src/main/maker-host/codex-proxy-host.ts
@@ -971,7 +971,19 @@ const MOONSHOT_CHAT_HOSTS = new Set(['api.moonshot.cn', 'api.moonshot.ai']);
/** Kimi Code (coding plan) official endpoint DNS boundary. */
const KIMI_CODING_CHAT_HOST = 'api.kimi.com';
/** Model ids on the Kimi Code Codex (openai-chat) route verified for image input. */
-const KIMI_CODING_IMAGE_CHAT_MODELS = new Set(['k3', 'k3-256k']);
+const KIMI_CODING_IMAGE_CHAT_MODELS = new Set([
+ 'k3',
+ 'k3-256k',
+ 'kimi-for-coding',
+ 'kimi-for-coding-highspeed',
+]);
+/** Moonshot 开放平台上官方文档确认支持图片输入的 model id。 */
+const MOONSHOT_IMAGE_CHAT_MODELS = new Set([
+ 'kimi-k3',
+ 'kimi-k2.7-code',
+ 'kimi-k2.7-code-highspeed',
+ 'kimi-k2.6',
+]);
/** 火山方舟(豆包)官方 DNS 边界:ark.<region>.volces.com(如 ark.cn-beijing.volces.com)。 */
const VOLCENGINE_ARK_CHAT_HOST_RE = /^ark\.[a-z0-9-]+\.volces\.com$/;
/** 阿里云百炼 Coding Plan / Token Plan / 按量付费官方 DNS 边界。 */
@@ -998,7 +1010,11 @@ function isDoubaoVisionModel(model: string): boolean {
/** 已确认支持图片输入的 Qwen model id 白名单。 */
const QWEN_IMAGE_CHAT_MODELS = new Set([
'qwen3.6-flash',
+ 'qwen3.6-plus',
'qwen3.7-plus',
+ 'qwen3.8-flash',
+ 'qwen3.8-max',
+ // 已下线,旧 id 由百炼路由到 qwen3.8-max;保留给存量连接。
'qwen3.8-max-preview',
]);
@@ -1110,7 +1126,7 @@ function isVerifiedImageChatRoute(upstream: string, realModel: string): boolean
}
if (url.protocol !== 'https:') return false;
const host = url.hostname.toLowerCase();
- if (realModel === 'kimi-k3') return MOONSHOT_CHAT_HOSTS.has(host);
+ if (MOONSHOT_IMAGE_CHAT_MODELS.has(realModel)) return MOONSHOT_CHAT_HOSTS.has(host);
if (KIMI_CODING_IMAGE_CHAT_MODELS.has(realModel)) return host === KIMI_CODING_CHAT_HOST;
if (isDoubaoVisionModel(realModel)) return VOLCENGINE_ARK_CHAT_HOST_RE.test(host);
if (isQwenImageChatModel(realModel)) return DASHSCOPE_CODING_CHAT_HOSTS.has(host);
diff --git a/apps/desktop/src/main/maker-host/model-discovery/anthropic.ts b/apps/desktop/src/main/maker-host/model-discovery/anthropic.ts
index 3535dc5c42..a57bc7d5f6 100644
--- a/apps/desktop/src/main/maker-host/model-discovery/anthropic.ts
+++ b/apps/desktop/src/main/maker-host/model-discovery/anthropic.ts
@@ -245,9 +245,7 @@ export function mapAnthropicSdkModels(raw: unknown): SdkMappedModel[] {
defaultEffort,
supportsFastMode: e.supportsFastMode === true,
status: 'active',
- // 旧产品目录刻意把 haiku 收起(defaultEnabled:false);默认可见性是客户端
- // 展示策略,不随清单动态化而漂移。
- ...(/haiku/.test(id) ? { defaultEnabled: false } : {}),
+ // 默认可见;哪些不默认显示只由模型目录的 defaultEnabled 决定。
},
});
}
diff --git a/apps/desktop/src/main/maker-host/model-plane/modelPlanePolicy.ts b/apps/desktop/src/main/maker-host/model-plane/modelPlanePolicy.ts
index 59df07cbaa..734d2790d6 100644
--- a/apps/desktop/src/main/maker-host/model-plane/modelPlanePolicy.ts
+++ b/apps/desktop/src/main/maker-host/model-plane/modelPlanePolicy.ts
@@ -116,16 +116,12 @@ const VALID_EFFORTS: ReadonlySet<string> = new Set([
]);
type Effort = CatalogModel['efforts'][number];
-/** Claude 的 OpenAI bridge 默认收起的旧型号;与既有目录行为保持一致。 */
-const BRIDGE_DEFAULT_HIDDEN_SLUGS: ReadonlySet<string> = new Set(['gpt-5.4', 'gpt-5.4-mini']);
-
-/** OpenAI Codex root → Claude bridge。 */
+/**
+ * OpenAI Codex root → Claude bridge。bridge 的默认可见性由 consumer overlay 统一处理
+ * (默认关闭,Registry perAgent 可显式打开),这里不再按型号写死例外。
+ */
export function toChatgptBridgeModel(model: CatalogModel): CatalogModel {
- return {
- ...model,
- id: `${CHATGPT_MODEL_PREFIX}${model.id}`,
- ...(BRIDGE_DEFAULT_HIDDEN_SLUGS.has(model.id) ? { defaultEnabled: false } : {}),
- };
+ return { ...model, id: `${CHATGPT_MODEL_PREFIX}${model.id}` };
}
/** 单 root 的 registry 消费计划:先算好,合并期零决策。 */
diff --git a/apps/desktop/src/renderer/__tests__/modelManagementPresentation.test.ts b/apps/desktop/src/renderer/__tests__/modelManagementPresentation.test.ts
index b26cbd0a96..f33dcc4277 100644
--- a/apps/desktop/src/renderer/__tests__/modelManagementPresentation.test.ts
+++ b/apps/desktop/src/renderer/__tests__/modelManagementPresentation.test.ts
@@ -3,6 +3,7 @@ import {
compareModelNames,
groupModelsForManagement,
modelBrand,
+ sortModelsForManagement,
} from '../components/settings/modelManagementPresentation';
describe('model management presentation', () => {
@@ -111,3 +112,26 @@ describe('model management presentation', () => {
expect(modelBrand({ id: 'tencent/hy4-preview' })?.label).toBe('Tencent');
});
});
+
+describe('sortModelsForManagement', () => {
+ it('来源给出完整顺序时与选择器一致(按 sortOrder)', () => {
+ const models = [
+ { id: 'gpt-5.6', name: 'GPT-5.6', sortOrder: 2 },
+ { id: 'gpt-6-astra', name: 'GPT-6 Astra', sortOrder: 0 },
+ { id: 'gpt-6-sol', name: 'GPT-6 Sol', sortOrder: 1 },
+ ];
+ expect(sortModelsForManagement(models).map((m) => m.id)).toEqual([
+ 'gpt-6-astra',
+ 'gpt-6-sol',
+ 'gpt-5.6',
+ ]);
+ });
+
+ it('只有部分条目带 sortOrder 时退回按名称/版本排序', () => {
+ const models = [
+ { id: 'google/gemini-3.5-flash', name: 'Gemini 3.5 Flash', sortOrder: 1 },
+ { id: 'google/gemini-3.8-flash', name: 'Gemini 3.8 Flash' },
+ ];
+ expect(sortModelsForManagement(models)[0]?.id).toBe('google/gemini-3.8-flash');
+ });
+});
diff --git a/apps/desktop/src/renderer/components/settings/UnifiedModelList.tsx b/apps/desktop/src/renderer/components/settings/UnifiedModelList.tsx
index c868a150b2..1bf7604c01 100644
--- a/apps/desktop/src/renderer/components/settings/UnifiedModelList.tsx
+++ b/apps/desktop/src/renderer/components/settings/UnifiedModelList.tsx
@@ -73,10 +73,10 @@ import {
import { LocalPackagingTag } from './LocalPackagingTag';
import { ModelAdvancedDrawer } from './ModelAdvancedDrawer';
import {
- compareModelNames,
groupModelsForManagement,
MANAGEMENT_KIND_ORDER,
modelBrand,
+ sortModelsForManagement,
type ManagementKind,
type ManagementView,
} from './modelManagementPresentation';
@@ -403,6 +403,18 @@ function rowCategory(row: UnionModelRow): ModelCategory {
return rep ? classifyModel(rep) : 'ungrouped';
}
+/** 沉底分区与分组同口径排序:sortOrder 取自每行代表条目。 */
+function sortRowsForManagement(rows: readonly UnionModelRow[]): UnionModelRow[] {
+ return sortModelsForManagement(
+ rows.map((row) => ({
+ id: row.id,
+ name: row.name,
+ sortOrder: row.byAgent[row.avail[0]]?.sortOrder,
+ row,
+ })),
+ ).map(({ row }) => row);
+}
+
export function managementKindsOfRow(row: UnionModelRow, userProvider: boolean): ManagementKind[] {
const kinds = new Set<ManagementKind>();
for (const agent of row.avail) {
@@ -777,8 +789,8 @@ export function UnifiedModelList({
brand: g.brand,
rows: g.models.map((m) => repByRow.get(m.id)).filter((r): r is UnionModelRow => !!r),
})),
- hiddenRows: [...hidden].sort(compareModelNames),
- disabledRows: [...disabled].sort(compareModelNames),
+ hiddenRows: sortRowsForManagement(hidden),
+ disabledRows: sortRowsForManagement(disabled),
};
// visibilityVersion:沉底判定读 modelVisibilityPrefs,开关一拨行要立刻迁移。
}, [
diff --git a/apps/desktop/src/renderer/components/settings/modelManagementPresentation.ts b/apps/desktop/src/renderer/components/settings/modelManagementPresentation.ts
index 13e827859d..8675fc991e 100644
--- a/apps/desktop/src/renderer/components/settings/modelManagementPresentation.ts
+++ b/apps/desktop/src/renderer/components/settings/modelManagementPresentation.ts
@@ -29,6 +29,20 @@ export function compareModelNames(
);
}
+/**
+ * 设置页组内顺序与模型选择器一致:来源给出完整顺序(每项都有 sortOrder,如按账号顺序
+ * 装配的订阅)时按 sortOrder;只要有一项缺 sortOrder,局部权重会把新型号压到旧的
+ * 策展位置之后,这时退回 compareModelNames。
+ */
+export function sortModelsForManagement<T extends Pick<CatalogModel, 'id' | 'name' | 'sortOrder'>>(
+ models: readonly T[],
+): T[] {
+ const fullyOrdered = models.every((model) => typeof model.sortOrder === 'number');
+ return [...models].sort((a, b) =>
+ fullyOrdered ? a.sortOrder! - b.sortOrder! || compareModelNames(a, b) : compareModelNames(a, b),
+ );
+}
+
export const MANAGEMENT_KIND_ORDER = [
'chat',
'image',
@@ -44,7 +58,7 @@ export const MANAGEMENT_KIND_ORDER = [
export type ManagementKind = (typeof MANAGEMENT_KIND_ORDER)[number];
export type ManagementView = 'brand' | 'model';
-export function groupModelsForManagement<T extends Pick<CatalogModel, 'id' | 'name'>>(
+export function groupModelsForManagement<T extends Pick<CatalogModel, 'id' | 'name' | 'sortOrder'>>(
models: readonly T[],
view: ManagementView,
kindOf: (model: T) => ManagementKind,
@@ -76,5 +90,5 @@ export function groupModelsForManagement<T extends Pick<CatalogModel, 'id' | 'na
? 1
: 0),
)
- .map((group) => ({ ...group, models: [...group.models].sort(compareModelNames) }));
+ .map((group) => ({ ...group, models: sortModelsForManagement(group.models) }));
}
diff --git a/apps/desktop/src/renderer/lib/__tests__/customProviders.test.ts b/apps/desktop/src/renderer/lib/__tests__/customProviders.test.ts
index 9b8cd00496..bb9d523f7e 100644
--- a/apps/desktop/src/renderer/lib/__tests__/customProviders.test.ts
+++ b/apps/desktop/src/renderer/lib/__tests__/customProviders.test.ts
@@ -644,7 +644,7 @@ describe('appendDiscoveredCustomProviderModels', () => {
.toContainEqual(expect.objectContaining({ id: 'anthropic/openai/new[1m]' }));
expect(existing[0].id).toBe('anthropic/openai/new[1m]');
});
- it('appends new models without overriding native-engine defaults', () => {
+ it('puts new models first without overriding native-engine defaults', () => {
const result = appendDiscoveredCustomProviderModels(
[{ id: 'kept', name: 'Kept' }],
[
@@ -656,8 +656,8 @@ describe('appendDiscoveredCustomProviderModels', () => {
);
expect(result).toEqual({
models: [
- { id: 'kept', name: 'Kept', nameExplicit: true, discoveredMetadata: { name: 'New name' } },
{ id: 'new', name: 'New', discoveredMetadata: { name: 'New' } },
+ { id: 'kept', name: 'Kept', nameExplicit: true, discoveredMetadata: { name: 'New name' } },
],
addedIds: ['new'],
});
diff --git a/docs/dev-rules/model-catalog-maintenance.md b/docs/dev-rules/model-catalog-maintenance.md
index daf374f42f..7715adc841 100644
--- a/docs/dev-rules/model-catalog-maintenance.md
+++ b/docs/dev-rules/model-catalog-maintenance.md
@@ -41,7 +41,7 @@ Catalog (version)
| 要改什么 | 写入位置 / 责任侧 | 不能顺带改变什么 |
| --- | --- | --- |
| 型号公共名称、说明、窗口、输出、思考能力 | Registry `baseModels[].defaults` | 价格、账号权限、地址和凭证不在公共继承内 |
-| 接入条目状态、排序、默认开启标记 | Registry `models[]` 顶层 | 显示开关不等于成员资格;见下文默认可见性 |
+| 接入条目状态、排序、默认开启标记 | Registry `models[]` 顶层 | 显示开关不等于成员资格;订阅账号排序以账号为准,见下文模型排序与默认可见性 |
| 某供应商的上游 ID、支持路由、普通默认 | `models[].routes[]` / `routes[].defaults` | 普通默认不能压过实报 |
| Claude Code / Codex 的工作默认 | `models[].perAgent`,引擎必须被该条目 route 声明 | 不把工作预算当供应商承诺容量 |
| Pi 公共成员和 Pi 默认资料 | `providers[].models.pi`;订阅账号发现另补新型号,公共资料仍按 Registry 合并 | 复用已实现的订阅传输,不复制其他引擎的专属能力 |
@@ -72,12 +72,64 @@ Pi 走 `providers[].models.pi`(用户补丁 perAgent.pi 另属合法 schema)
`defaultEffort` 的已配置默认优先于供应商实报的推荐档,再适配实际支持能力,force / 用户覆盖仍优先。
详细字段及成员空值规则以 [模型资料优先级](../product-rules/model-metadata-precedence.md) 为唯一正本。
+<a id="ordering"></a>
+## 模型排序:账号优先,目录兜底
+
+OpenAI(Codex 订阅)与 Anthropic(Claude 订阅)的 root 有账号模型清单时,`sortOrder` 以账号
+返回顺序为准:Codex 取 `models_cache.json` 的 `priority` 或 app-server `model/list` 的返回位置,
+Claude 取 SDK `supportedModels()` 的返回位置。只在 Registry 里有、账号没返回的模型按 Registry
+`sortOrder` 接在其后。装配时重写为连续 `sortOrder`,选择器、设置页、新对话默认与 Claude Code
+bridge 共用这一顺序;OpenAI 订阅的 Pi 清单成员与能力仍来自 Pi 目录,但同样按账号顺序排列,
+并沿用 Registry 条目的 `defaultEnabled: false`;用户本地 `sortOrder` patch 仍最高。拿不到账号清单时才用 Registry `sortOrder`。
+xAI 保留 Registry 声明顺序,XD 以 Gateway `/models` 为准,均不受此规则影响。
+第三方 API key 连接(MiMo、Kimi Code 等预设及自定义端点)没有 sortOrder,按连接配置里的
+顺序排:首次添加用接口返回的顺序;之后刷新发现的新型号排在已有型号之前(保持接口返回的
+相对顺序),已有型号位置不动(`mergeDiscoveredRuntimeModels`)。
+
+新对话默认模型不跟排序绑定的例外只有服务端按区域下发的 `newSessionDefault`;公共 Registry 的
+同名字段不进入活动目录。未标记时取排序第一的默认可见模型,即账号返回的第一个可见模型。
+
+设置页管理列表组内与选择器同序:组内每项都带 `sortOrder` 时按它排;只要有一项缺失,退回
+按系列名 A–Z、同系列版本号降序,避免局部权重把新型号压到旧策展位置之后。
+
+<a id="presets"></a>
+## 第三方预设:一份推荐清单
+
+`providers.json` 的每个预设只在顶层写一份 `models` 推荐清单,数组顺序即推荐顺序;
+`runtimes[引擎]` 只放地址、协议、模型目录等连接信息,不再按引擎各写一份模型。
+加载时由 `expandPresetModels` 展开回各引擎清单,下游与服务端下发的旧格式形状一致。
+
+- 协议限制导致某模型只在部分引擎可用时写 `engines`(如 OpenCode Go 的 Anthropic 协议模型、
+ GLM Coding Plan 只给 Claude Code 的 `[1m]` 变体)。
+- 引擎专属字段写 `engineOverrides[引擎]`:Pi 的推理档位、按模型路由,以及确有差异的窗口
+ (如 GLM Coding Plan 裸 `glm-5.2` 在 Claude Code 不写窗口、1M 走 `[1m]` 条目,Pi 为 1M)。
+- `engines` 的每一项与 `engineOverrides` 的每个键都只能是本预设已声明的引擎;拼错或写成
+ 其它形状时整条预设被拒绝(即使 `runtimes` 另带旧格式清单),不静默丢模型或忽略覆盖。
+- 本文件是源格式,旧客户端读不懂顶层清单,不能直接发布到旧 OSS `cfg/providers.json`
+ (该文件自 2026-07 冻结,旧客户端经公共 API 与服务端投影拿到展开后的形状)。
+- 名称与参数以厂商官方文档为准;未列入推荐清单的型号由 Pi 模型资料补入并默认隐藏。
+- `presetModels.test.ts` 校验随包预设不再出现按引擎的清单。服务端分片同样只写一份推荐
+ 清单,由 `generateCatalog.mjs` 展开后下发;同 id 的服务端预设整体覆盖随包版本,所以
+ 推荐清单与参数两边保持一致。服务端的连接设置(含 Pi 照抄 Claude Code 的兼容映射)
+ 以服务端为准,随包版本的原生 Pi 地址只在离线时使用。
+
<a id="visibility"></a>
## 默认可见性:产品合同与实现差异
[产品合同](configuration-and-overrides.md#模型可见性):用户开关优先,否则跟随目录 defaultEnabled。
-xAI 已直接保留目录默认开关;其他订阅/Gateway 的 `selectDefaultModels` 仍可能将 true 筛成 false,不删除成员或写用户偏好。
-这是待收敛的行为差异,不是合同豁免。排查须同时检查上游值、活动目录值和用户 override;本文不改变行为。
+
+- **不默认显示的型号只写在目录里**:条目标 `defaultEnabled: false`,未标的一律默认显示,
+ 所以新出的型号一定可见。客户端发现代码不按型号写死隐藏例外(2026-09-26 起移除了
+ `gpt-5.4-mini`、Haiku、bridge `gpt-5.4` 等硬编码)。
+- 保留的是按状态或引擎的规则,不针对具体型号:`deprecated`、`requires_payment` 默认关闭;
+ 跨 Harness bridge(如 Claude Code 里的 `chatgpt/*`)与自定义连接的兼容引擎默认关闭,
+ Registry `perAgent` 可显式打开。
+- **XD 路由一律使用独立的 `xd/*` 条目**,不与订阅或其他供应商共用条目:服务端生成
+ Gateway `/models` 时读取 XD 路由所在条目的名称、排序与 `defaultEnabled`,共用会让订阅侧
+ 调整连带改动 XD。型号规格经 `modelRef` 继承同一公共型号,不重复维护。
+ `xdRegistryEntries.test.ts` 校验离线 Registry 不出现混用条目。
+
+排查须同时检查上游值、活动目录值和用户 override。
<a id="release"></a>
## 更新、下发与验收
diff --git a/docs/model-catalog-history.md b/docs/model-catalog-history.md
index 1e195e17fe..b3e43db79d 100644
--- a/docs/model-catalog-history.md
+++ b/docs/model-catalog-history.md
@@ -3,6 +3,38 @@
> 参考记录,不是当前配置或部署状态。当前维护规则见 [模型配置与下发](dev-rules/model-catalog-maintenance.md)。
> 下列文字记录各批次当时的事实,不能相互当作后续状态的证明。引用时须带日期、来源和验证范围。
+## 第三方预设与服务端对齐(2026-09-26)
+
+依据各厂商官方文档(2026-09-26 核对)处理下线、别名与不存在的型号,并以线上服务端推荐清单为基础
+与客户端对齐(连接设置沿用客户端的原生协议地址):
+
+- 百炼 Token Plan:`qwen3.8-max-preview` 已下线(旧 id 路由到 `qwen3.8-max`),改为 `qwen3.8-max`;
+ 按官方清单补 Qwen3.8-Flash、DeepSeek-V4.1-Flash、GLM-5.3;团队版删去 10-10 下架的 DeepSeek-V3.2。
+ Coding Plan 改为官方推荐的 Qwen3.7-Plus、Qwen3.6-Plus、Kimi K2.5、GLM-5、MiniMax-M2.5,保留两个 Coder。
+ 窗口取官方最大输入,默认开思考的型号取思考模式最大输入(Qwen3.x 为 983,616)。
+- GLM Coding Plan:官方只支持 `glm-5.3`、`glm-5.3-flash`,5.2/5.1 已路由到 5.3;Claude Code 用官方
+ `[1m]` 写法,删去文档中不存在的 `glm-5.2[1m]`。
+- DeepSeek:`deepseek-v4-flash` 为临时别名,改用官方推荐的 `deepseek-flash`(1,048,576,支持图片)。
+- OpenCode Go:MiMo V2.5 于 2026-10-21 下线且无转发,改为 MiMo-V2.6-Pro / Flash,并补兼容层配置。
+- OpenRouter:删去平台上不存在的 `qwen/qwen3.8-max`。
+- Kimi Code:`api.kimi.com` 为国内地址、`api.kimi.ai` 为海外地址,均为官方地址,不改。
+- Codex 桥接图片白名单补上官方确认支持图片的 Kimi(Moonshot / Kimi Code)与 Qwen 型号。
+- DeepSeek 直连条目以 `deepseek-flash` 为首条路由,`deepseek-v4-flash` 旧别名路由保留在后,只供已有
+ 连接解析参考价。两条路由都不在路由级声明图片输入(路由默认值会作用到 Codex 的 Chat 桥接),
+ 图片能力按预设各引擎声明。
+- 客户端 Registry revision 为 `2026-09-26T12:00:00.005Z`:服务端 `2026-09-26T12:00:00.004Z` 不含
+ 客户端独有、需先随客户端发布的 Grok 4.7 Fast(#5060),两份内容不同故使用不同 revision。
+
+## 订阅默认只显示最新一代(2026-09-26)
+
+客户端离线 Registry revision 更新为 `2026-09-26T12:00:00.000Z`。GPT 订阅默认只显示
+GPT-6 Sol / Luna / Astra,GPT-5.6 Sol / Terra / Luna 标记 `defaultEnabled: false`;
+Claude 订阅默认显示各系列最新版 Opus 5.5、Fable 5.1、Sonnet 5、Haiku 4.5、Mythos 5,
+Opus 5、Fable 5、Opus 4.8 标记不默认显示。所有与订阅或其他供应商共用条目的 XD 路由
+(Claude 9 个、DeepSeek V4 Pro/Flash、GPT-5.4 Nano,共 13 个)拆为独立 `xd/*` 条目,
+沿用改动前的显示设置;对比 50 条 XD 路由的解析资料,拆分前后无差异。
+用户已有显示开关不变。Server 正本需同步同一改动后才会下发。
+
## GPT-6 Sol / Luna 与 Claude Opus 5.5(2026-09-23)
客户端离线 Registry revision 更新为 `2026-09-23T00:00:00.003Z`,新增
diff --git a/docs/product-rules/model-selector-unified.md b/docs/product-rules/model-selector-unified.md
index b5d6957c5f..feb995a3bc 100644
--- a/docs/product-rules/model-selector-unified.md
+++ b/docs/product-rules/model-selector-unified.md
@@ -31,7 +31,7 @@
- L1:厂商图标 · 模型名(弹性,截断) · 价格档/折扣/订阅徽标 · ☆ · 右侧**常驻三元组**`[引擎图标] 深度 [⚡]` · 选中勾。
- L2:一句描述(截断)。
- 三元组**所有行同构、永远显示**——引擎可见性靠一致的结构位,不靠出错才显示;自定义未收藏的行整组提亮一档(secondary)。
-- 分组:收藏 → 推荐(仅已有任务)→ 供应商分组。推荐区先放当前模型,再放同生效引擎的模型;推荐中的模型从下方供应商组移除,空组不渲染标题或间距。供应商侧栏仍基于完整目录。新任务不展示同引擎推荐。组间顺序遵循「设置 → 模型供应商」的拖动排序(本地会话;device-link 用被控端快照顺序,不套控制端本地序),组内按服务端下发 group/sortOrder。收藏区条目**不**从供应商组中去重移除(收藏是配置副本,模型本体仍在原地)。
+- 分组:收藏 → 推荐(仅已有任务)→ 供应商分组。推荐区先放当前模型,再放同生效引擎的模型;推荐中的模型从下方供应商组移除,空组不渲染标题或间距。供应商侧栏仍基于完整目录。新任务不展示同引擎推荐。组间顺序遵循「设置 → 模型供应商」的拖动排序(本地会话;device-link 用被控端快照顺序,不套控制端本地序),组内按 group/sortOrder;订阅账号(OpenAI、Anthropic)有账号模型清单时 sortOrder 以账号返回顺序为准,只在目录里有的模型接在其后,目录 sortOrder 仅在拿不到账号清单时兜底,见 [模型排序](../dev-rules/model-catalog-maintenance.md#ordering)。收藏区条目**不**从供应商组中去重移除(收藏是配置副本,模型本体仍在原地)。
- 折扣表达:价格档 `¥/$` 串按折后价连续填充(付费亮、折扣灰),后跟淡染徽标 `↓60%`;详情(title+浮层)写全「折扣中 · 标准价 X · 省 Y%」。中文计价 ¥,英文 $。
供应商图标下方以 22 × 3px 横线显示账号通用周限额的**剩余比例**;图标格统一高 38px,数据更新不改变布局。常态灰色,剩余低于 30% 为警示色,剩余不高于 10% 为严重色,复用额度语义 token。悬停与键盘聚焦的 Tip 显示完整连接名、周剩余百分比和“还有多久重置”。紧凑区域优先倒计时,使用上游重置时间计算,不把已过期窗口推断为已补满。
diff --git a/packages/model-compat/src/upstream-profiles.json b/packages/model-compat/src/upstream-profiles.json
index 96a3059b9c..226046dda1 100644
--- a/packages/model-compat/src/upstream-profiles.json
+++ b/packages/model-compat/src/upstream-profiles.json
@@ -316,6 +316,24 @@
"xhigh": "enabled",
"max": "enabled"
},
+ "mimo-v2.6-pro": {
+ "none": "disabled",
+ "minimal": "disabled",
+ "low": "disabled",
+ "medium": "enabled",
+ "high": "enabled",
+ "xhigh": "enabled",
+ "max": "enabled"
+ },
+ "mimo-v2.6-flash": {
+ "none": "disabled",
+ "minimal": "disabled",
+ "low": "disabled",
+ "medium": "enabled",
+ "high": "enabled",
+ "xhigh": "enabled",
+ "max": "enabled"
+ },
"glm-5": {
"none": "disabled",
"minimal": "disabled",
@@ -359,6 +377,8 @@
"deepseek-v4-flash": true
},
"thinkingToggleModels": [
+ "mimo-v2.6-pro",
+ "mimo-v2.6-flash",
"mimo-v2.5",
"mimo-v2.5-pro",
"glm-5",
@@ -557,6 +577,12 @@
"adapter": "openai-chat",
"authKind": "key",
"modelWireDefaults": {
+ "deepseek-flash": {
+ "wire": "openai-responses",
+ "inbound": [
+ "responses"
+ ]
+ },
"deepseek-v4-flash": {
"wire": "openai-responses",
"inbound": [
@@ -571,6 +597,9 @@
}
},
"modelResponsesTerminalRepair": {
+ "deepseek-flash": {
+ "graceMs": 5000
+ },
"deepseek-v4-flash": {
"graceMs": 5000
},
@@ -588,6 +617,13 @@
"requiresAdjacentResponsesToolResults": true,
"annotateEmptyToolOutputs": true,
"modelReasoningEffortMap": {
+ "deepseek-flash": {
+ "low": "low",
+ "medium": "high",
+ "high": "high",
+ "xhigh": "high",
+ "max": "max"
+ },
"deepseek-v4-pro": {
"low": "low",
"medium": "high",
@@ -604,10 +640,12 @@
}
},
"modelSupportsReasoningSummaries": {
+ "deepseek-flash": true,
"deepseek-v4-pro": true,
"deepseek-v4-flash": true
},
"preserveReasoningContentModels": [
+ "deepseek-flash",
"deepseek-v4-pro",
"deepseek-v4-flash"
]
diff --git a/packages/model-providers/catalog/model-registry.json b/packages/model-providers/catalog/model-registry.json
index af4fecf825..809297f78f 100644
--- a/packages/model-providers/catalog/model-registry.json
+++ b/packages/model-providers/catalog/model-registry.json
@@ -1,6 +1,6 @@
{
"schemaVersion": 5,
- "updatedAt": "2026-09-24T14:16:12.766Z",
+ "updatedAt": "2026-09-26T12:00:00.005Z",
"models": [
{
"id": "openai/gpt-6-sol",
@@ -102,7 +102,8 @@
}
],
"nativeApi": "openai-responses",
- "modelRef": "openai/gpt-5.6-sol"
+ "modelRef": "openai/gpt-5.6-sol",
+ "defaultEnabled": false
},
{
"id": "openai/gpt-5.6-sol[1m]",
@@ -188,7 +189,8 @@
}
],
"nativeApi": "openai-responses",
- "modelRef": "openai/gpt-5.6-terra"
+ "modelRef": "openai/gpt-5.6-terra",
+ "defaultEnabled": false
},
{
"id": "xd/gpt-5.6-terra",
@@ -248,7 +250,8 @@
"claude-code": {
"contextWindow": 272000
}
- }
+ },
+ "defaultEnabled": false
},
{
"id": "xd/gpt-5.6-luna",
@@ -561,7 +564,18 @@
"supportsFastMode": false
},
"referencePriceGroup": "global"
- },
+ }
+ ],
+ "nativeApi": "anthropic-messages",
+ "modelRef": "anthropic/claude-fable-5",
+ "defaultEnabled": false
+ },
+ {
+ "id": "xd/claude-fable-5",
+ "name": "Fable 5",
+ "status": "active",
+ "sortOrder": 1,
+ "routes": [
{
"providerId": "xd",
"modelId": "claude-fable-5",
@@ -603,7 +617,18 @@
"supportsFastMode": false
},
"referencePriceGroup": "global"
- },
+ }
+ ],
+ "nativeApi": "anthropic-messages",
+ "modelRef": "anthropic/claude-opus-5",
+ "defaultEnabled": false
+ },
+ {
+ "id": "xd/claude-opus-5",
+ "name": "Opus 5",
+ "status": "active",
+ "sortOrder": 0,
+ "routes": [
{
"providerId": "xd",
"modelId": "claude-opus-5",
@@ -630,7 +655,18 @@
"supportsFastMode": false
},
"referencePriceGroup": "global"
- },
+ }
+ ],
+ "nativeApi": "anthropic-messages",
+ "modelRef": "anthropic/claude-opus-4-8",
+ "defaultEnabled": false
+ },
+ {
+ "id": "xd/claude-opus-4-8",
+ "name": "Opus 4.8",
+ "status": "active",
+ "sortOrder": 2,
+ "routes": [
{
"providerId": "xd",
"modelId": "claude-opus-4-8",
@@ -658,7 +694,17 @@
"supportsFastMode": false
},
"referencePriceGroup": "global"
- },
+ }
+ ],
+ "nativeApi": "anthropic-messages",
+ "modelRef": "anthropic/claude-opus-4-7"
+ },
+ {
+ "id": "xd/claude-opus-4-7",
+ "name": "Opus 4.7",
+ "status": "active",
+ "sortOrder": 3,
+ "routes": [
{
"providerId": "xd",
"modelId": "claude-opus-4-7",
@@ -669,7 +715,8 @@
}
],
"nativeApi": "anthropic-messages",
- "modelRef": "anthropic/claude-opus-4-7"
+ "modelRef": "anthropic/claude-opus-4-7",
+ "defaultEnabled": false
},
{
"id": "anthropic/claude-opus-4-6",
@@ -686,7 +733,17 @@
"supportsFastMode": false
},
"referencePriceGroup": "global"
- },
+ }
+ ],
+ "nativeApi": "anthropic-messages",
+ "modelRef": "anthropic/claude-opus-4-6"
+ },
+ {
+ "id": "xd/claude-opus-4-6",
+ "name": "Opus 4.6",
+ "status": "active",
+ "sortOrder": 4,
+ "routes": [
{
"providerId": "xd",
"modelId": "claude-opus-4-6",
@@ -697,7 +754,8 @@
}
],
"nativeApi": "anthropic-messages",
- "modelRef": "anthropic/claude-opus-4-6"
+ "modelRef": "anthropic/claude-opus-4-6",
+ "defaultEnabled": false
},
{
"id": "anthropic/claude-opus-4-5",
@@ -714,7 +772,17 @@
"supportsFastMode": false
},
"referencePriceGroup": "global"
- },
+ }
+ ],
+ "nativeApi": "anthropic-messages",
+ "modelRef": "anthropic/claude-opus-4-5"
+ },
+ {
+ "id": "xd/claude-opus-4-5",
+ "name": "Opus 4.5",
+ "status": "active",
+ "sortOrder": 5,
+ "routes": [
{
"providerId": "xd",
"modelId": "claude-opus-4-5",
@@ -725,7 +793,8 @@
}
],
"nativeApi": "anthropic-messages",
- "modelRef": "anthropic/claude-opus-4-5"
+ "modelRef": "anthropic/claude-opus-4-5",
+ "defaultEnabled": false
},
{
"id": "anthropic/claude-sonnet-5",
@@ -741,7 +810,17 @@
"supportsFastMode": false
},
"referencePriceGroup": "global"
- },
+ }
+ ],
+ "nativeApi": "anthropic-messages",
+ "modelRef": "anthropic/claude-sonnet-5"
+ },
+ {
+ "id": "xd/claude-sonnet-5",
+ "name": "Sonnet 5",
+ "status": "active",
+ "sortOrder": 6,
+ "routes": [
{
"providerId": "xd",
"modelId": "claude-sonnet-5",
@@ -769,7 +848,17 @@
"supportsFastMode": false
},
"referencePriceGroup": "global"
- },
+ }
+ ],
+ "nativeApi": "anthropic-messages",
+ "modelRef": "anthropic/claude-sonnet-4-6"
+ },
+ {
+ "id": "xd/claude-sonnet-4-6",
+ "name": "Sonnet 4.6",
+ "status": "active",
+ "sortOrder": 7,
+ "routes": [
{
"providerId": "xd",
"modelId": "claude-sonnet-4-6",
@@ -780,7 +869,8 @@
}
],
"nativeApi": "anthropic-messages",
- "modelRef": "anthropic/claude-sonnet-4-6"
+ "modelRef": "anthropic/claude-sonnet-4-6",
+ "defaultEnabled": false
},
{
"id": "anthropic/claude-sonnet-4-5",
@@ -797,7 +887,17 @@
"supportsFastMode": false
},
"referencePriceGroup": "global"
- },
+ }
+ ],
+ "nativeApi": "anthropic-messages",
+ "modelRef": "anthropic/claude-sonnet-4-5"
+ },
+ {
+ "id": "xd/claude-sonnet-4-5",
+ "name": "Sonnet 4.5",
+ "status": "active",
+ "sortOrder": 8,
+ "routes": [
{
"providerId": "xd",
"modelId": "claude-sonnet-4-5",
@@ -808,7 +908,8 @@
}
],
"nativeApi": "anthropic-messages",
- "modelRef": "anthropic/claude-sonnet-4-5"
+ "modelRef": "anthropic/claude-sonnet-4-5",
+ "defaultEnabled": false
},
{
"id": "anthropic/claude-haiku-4-5",
@@ -825,7 +926,17 @@
"supportsFastMode": false
},
"referencePriceGroup": "global"
- },
+ }
+ ],
+ "nativeApi": "anthropic-messages",
+ "modelRef": "anthropic/claude-haiku-4-5"
+ },
+ {
+ "id": "xd/claude-haiku-4-5",
+ "name": "Haiku 4.5",
+ "status": "active",
+ "sortOrder": 9,
+ "routes": [
{
"providerId": "xd",
"modelId": "claude-haiku-4-5",
@@ -836,7 +947,8 @@
}
],
"nativeApi": "anthropic-messages",
- "modelRef": "anthropic/claude-haiku-4-5"
+ "modelRef": "anthropic/claude-haiku-4-5",
+ "defaultEnabled": true
},
{
"id": "xai/grok-4.7",
@@ -1535,17 +1647,26 @@
"sortOrder": 45,
"routes": [
{
- "providerId": "xd",
- "modelId": "deepseek/deepseek-v4-pro",
+ "providerId": "deepseek",
+ "modelId": "deepseek-v4-pro",
"agents": ["claude-code", "codex"],
"defaults": {
"supportsFastMode": false
},
"referencePriceGroup": "global"
- },
+ }
+ ],
+ "nativeApi": "openai-completions",
+ "modelRef": "deepseek/deepseek-v4-pro"
+ },
+ {
+ "id": "xd/deepseek-deepseek-v4-pro",
+ "name": "DeepSeek V4 Pro",
+ "sortOrder": 45,
+ "routes": [
{
- "providerId": "deepseek",
- "modelId": "deepseek-v4-pro",
+ "providerId": "xd",
+ "modelId": "deepseek/deepseek-v4-pro",
"agents": ["claude-code", "codex"],
"defaults": {
"supportsFastMode": false
@@ -1562,11 +1683,12 @@
"sortOrder": 46,
"routes": [
{
- "providerId": "xd",
- "modelId": "deepseek/deepseek-v4-flash",
+ "providerId": "deepseek",
+ "modelId": "deepseek-flash",
"agents": ["claude-code", "codex"],
"defaults": {
- "supportsFastMode": false
+ "supportsFastMode": false,
+ "name": "DeepSeek-Flash"
},
"referencePriceGroup": "global"
},
@@ -1583,6 +1705,24 @@
"nativeApi": "openai-completions",
"modelRef": "deepseek/deepseek-v4-flash"
},
+ {
+ "id": "xd/deepseek-deepseek-v4-flash",
+ "name": "DeepSeek V4 Flash",
+ "sortOrder": 46,
+ "routes": [
+ {
+ "providerId": "xd",
+ "modelId": "deepseek/deepseek-v4-flash",
+ "agents": ["claude-code", "codex"],
+ "defaults": {
+ "supportsFastMode": false
+ },
+ "referencePriceGroup": "global"
+ }
+ ],
+ "nativeApi": "openai-completions",
+ "modelRef": "deepseek/deepseek-v4-flash"
+ },
{
"id": "openai/gpt-5.4-nano",
"name": "GPT-5.4-Nano",
@@ -1595,7 +1735,17 @@
"modelId": "gpt-5.4-nano",
"agents": ["claude-code", "codex"],
"referencePriceGroup": "global"
- },
+ }
+ ],
+ "nativeApi": "openai-responses",
+ "modelRef": "openai/gpt-5.4-nano"
+ },
+ {
+ "id": "xd/gpt-5.4-nano",
+ "name": "GPT-5.4-Nano",
+ "status": "active",
+ "sortOrder": 101,
+ "routes": [
{
"providerId": "xd",
"modelId": "gpt-5.4-nano",
@@ -1603,7 +1753,8 @@
}
],
"nativeApi": "openai-responses",
- "modelRef": "openai/gpt-5.4-nano"
+ "modelRef": "openai/gpt-5.4-nano",
+ "defaultEnabled": false
},
{
"id": "xd/codex-gpt-5.4-mini",
diff --git a/packages/model-providers/catalog/provider-interface-models.json b/packages/model-providers/catalog/provider-interface-models.json
index a68d45b00b..b2c315a470 100644
--- a/packages/model-providers/catalog/provider-interface-models.json
+++ b/packages/model-providers/catalog/provider-interface-models.json
@@ -345,6 +345,14 @@
"api": "openai-completions",
"endpoint": "https://opencode.ai/zen/go/v1/chat/completions"
},
+ "mimo-v2.6-pro": {
+ "api": "openai-completions",
+ "endpoint": "https://opencode.ai/zen/go/v1/chat/completions"
+ },
+ "mimo-v2.6-flash": {
+ "api": "openai-completions",
+ "endpoint": "https://opencode.ai/zen/go/v1/chat/completions"
+ },
"minimax-m3": {
"api": "anthropic-messages",
"endpoint": "https://opencode.ai/zen/go/v1/messages"
diff --git a/packages/model-providers/catalog/providers.json b/packages/model-providers/catalog/providers.json
index f2d79aac14..fbe5fcd733 100644
--- a/packages/model-providers/catalog/providers.json
+++ b/packages/model-providers/catalog/providers.json
@@ -431,27 +431,25 @@
"id": "sub2api",
"name": "Sub2API",
"docsUrl": "https://github.com/Wei-Shaw/sub2api",
+ "models": [],
"runtimes": {
"claude-code": {
"baseUrl": "https://{endpoint}/v1",
"baseUrlEditable": true,
"wireProtocol": "openai-responses",
- "modelsUrl": "https://{endpoint}/v1/models?client_version=0.147.0",
- "models": []
+ "modelsUrl": "https://{endpoint}/v1/models?client_version=0.147.0"
},
"codex": {
"baseUrl": "https://{endpoint}/v1",
"baseUrlEditable": true,
"wireProtocol": "openai-responses",
- "modelsUrl": "https://{endpoint}/v1/models?client_version=0.147.0",
- "models": []
+ "modelsUrl": "https://{endpoint}/v1/models?client_version=0.147.0"
},
"pi": {
"baseUrl": "https://{endpoint}/v1",
"baseUrlEditable": true,
"wireProtocol": "openai-responses",
- "modelsUrl": "https://{endpoint}/v1/models?client_version=0.147.0",
- "models": []
+ "modelsUrl": "https://{endpoint}/v1/models?client_version=0.147.0"
}
}
},
@@ -460,57 +458,56 @@
"name": "OpenRouter",
"docsUrl": "https://openrouter.ai/docs/cookbook/coding-agents/claude-code-integration",
"regionHint": "global",
+ "models": [
+ {
+ "id": "z-ai/glm-5.2",
+ "name": "GLM-5.2",
+ "contextWindow": 1048576,
+ "supportsImageInput": false
+ },
+ {
+ "id": "moonshotai/kimi-k2.6",
+ "name": "Kimi K2.6",
+ "contextWindow": 262144,
+ "supportsImageInput": true
+ },
+ {
+ "id": "deepseek/deepseek-v4-pro",
+ "name": "DeepSeek V4 Pro",
+ "contextWindow": 1048576,
+ "supportsImageInput": false,
+ "engines": ["claude-code", "pi"]
+ },
+ {
+ "id": "qwen/qwen3.8-27b",
+ "name": "Qwen3.8 27B",
+ "contextWindow": 1000000,
+ "supportsImageInput": true
+ },
+ {
+ "id": "qwen/qwen3.8-2.4t-a95b",
+ "name": "Qwen3.8 2.4T A95B",
+ "contextWindow": 1048576,
+ "supportsImageInput": false
+ },
+ {
+ "id": "qwen/qwen3.8-flash",
+ "name": "Qwen3.8 Flash",
+ "contextWindow": 1000000,
+ "supportsImageInput": true
+ }
+ ],
"runtimes": {
"claude-code": {
- "baseUrl": "https://openrouter.ai/api",
- "models": [
- {
- "id": "z-ai/glm-5.2",
- "name": "GLM-5.2 (OpenRouter)"
- },
- {
- "id": "moonshotai/kimi-k2.6",
- "name": "Kimi K2.6 (OpenRouter)"
- },
- {
- "id": "deepseek/deepseek-v4-pro",
- "name": "DeepSeek V4 Pro (OpenRouter)",
- "contextWindow": 1000000
- }
- ]
+ "baseUrl": "https://openrouter.ai/api"
},
"codex": {
- "baseUrl": "https://openrouter.ai/api/v1",
- "models": [
- {
- "id": "z-ai/glm-5.2",
- "name": "GLM-5.2 (OpenRouter)"
- },
- {
- "id": "moonshotai/kimi-k2.6",
- "name": "Kimi K2.6 (OpenRouter)"
- }
- ]
+ "baseUrl": "https://openrouter.ai/api/v1"
},
"pi": {
"baseUrl": "https://openrouter.ai/api/v1",
"wireProtocol": "openai-chat",
- "modelsUrl": "https://openrouter.ai/api/v1/models",
- "models": [
- {
- "id": "z-ai/glm-5.2",
- "name": "GLM-5.2 (OpenRouter)"
- },
- {
- "id": "moonshotai/kimi-k2.6",
- "name": "Kimi K2.6 (OpenRouter)"
- },
- {
- "id": "deepseek/deepseek-v4-pro",
- "name": "DeepSeek V4 Pro (OpenRouter)",
- "contextWindow": 1000000
- }
- ]
+ "modelsUrl": "https://openrouter.ai/api/v1/models"
}
}
},
@@ -518,72 +515,52 @@
"id": "deepseek",
"name": "DeepSeek",
"docsUrl": "https://api-docs.deepseek.com/guides/anthropic_api",
+ "models": [
+ {
+ "id": "deepseek-flash",
+ "name": "DeepSeek-Flash",
+ "contextWindow": 1048576,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "pi": {
+ "reasoning": true,
+ "reasoningEfforts": ["low", "high", "max"],
+ "reasoningDefaultEffort": "high"
+ },
+ "codex": {
+ "supportsImageInput": false
+ }
+ }
+ },
+ {
+ "id": "deepseek-v4-pro",
+ "name": "DeepSeek-V4-Pro",
+ "contextWindow": 1048576,
+ "supportsImageInput": false,
+ "engineOverrides": {
+ "pi": {
+ "reasoning": true,
+ "reasoningEfforts": ["high", "max"],
+ "reasoningDefaultEffort": "high"
+ }
+ }
+ }
+ ],
"runtimes": {
"claude-code": {
"baseUrl": "https://api.deepseek.com/anthropic",
- "models": [
- {
- "id": "deepseek-v4-flash",
- "name": "DeepSeek V4 Flash",
- "contextWindow": 1000000
- },
- {
- "id": "deepseek-v4-pro",
- "name": "DeepSeek V4 Pro",
- "contextWindow": 1000000
- }
- ],
"modelsUrl": "https://api.deepseek.com/models"
},
"codex": {
"baseUrl": "https://api.deepseek.com",
"wireProtocol": "openai-chat",
- "models": [
- {
- "id": "deepseek-v4-flash",
- "name": "DeepSeek V4 Flash",
- "contextWindow": 1000000
- },
- {
- "id": "deepseek-v4-pro",
- "name": "DeepSeek V4 Pro",
- "contextWindow": 1000000
- }
- ],
"modelsUrl": "https://api.deepseek.com/models"
},
"pi": {
"baseUrl": "https://api.deepseek.com",
"wireProtocol": "openai-chat",
"modelsUrl": "https://api.deepseek.com/models",
- "piCatalogProviderId": "deepseek",
- "models": [
- {
- "id": "deepseek-v4-flash",
- "name": "DeepSeek V4 Flash",
- "contextWindow": 1000000,
- "reasoning": true,
- "reasoningEfforts": ["low", "high", "max"],
- "reasoningDefaultEffort": "high"
- },
- {
- "id": "deepseek-v4-flash-vision-exp",
- "name": "DeepSeek V4 Flash Vision Exp",
- "contextWindow": 1000000,
- "supportsImageInput": true,
- "reasoning": true,
- "reasoningEfforts": ["low", "high", "max"],
- "reasoningDefaultEffort": "high"
- },
- {
- "id": "deepseek-v4-pro",
- "name": "DeepSeek V4 Pro",
- "contextWindow": 1000000,
- "reasoning": true,
- "reasoningEfforts": ["high", "max"],
- "reasoningDefaultEffort": "high"
- }
- ]
+ "piCatalogProviderId": "deepseek"
}
}
},
@@ -594,47 +571,44 @@
"nameZhTW": "智譜 GLM(中國大陸)",
"docsUrl": "https://docs.bigmodel.cn/cn/guide/develop/claude",
"regionHint": "cn",
+ "models": [
+ {
+ "id": "glm-5.3-flash",
+ "name": "GLM-5.3-Flash",
+ "contextWindow": 1000000,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "codex": {
+ "supportsImageInput": false
+ }
+ }
+ },
+ {
+ "id": "glm-5.3",
+ "name": "GLM-5.3",
+ "contextWindow": 1000000,
+ "supportsImageInput": false
+ },
+ {
+ "id": "glm-5.2",
+ "name": "GLM-5.2"
+ },
+ {
+ "id": "glm-5.1",
+ "name": "GLM-5.1"
+ }
+ ],
"runtimes": {
"claude-code": {
- "baseUrl": "https://open.bigmodel.cn/api/anthropic",
- "models": [
- {
- "id": "glm-5.2",
- "name": "GLM-5.2"
- },
- {
- "id": "glm-5.1",
- "name": "GLM-5.1"
- }
- ]
+ "baseUrl": "https://open.bigmodel.cn/api/anthropic"
},
"codex": {
"baseUrl": "https://open.bigmodel.cn/api/paas/v4",
- "wireProtocol": "openai-chat",
- "models": [
- {
- "id": "glm-5.2",
- "name": "GLM-5.2"
- },
- {
- "id": "glm-5.1",
- "name": "GLM-5.1"
- }
- ]
+ "wireProtocol": "openai-chat"
},
"pi": {
"baseUrl": "https://open.bigmodel.cn/api/paas/v4",
- "wireProtocol": "openai-chat",
- "models": [
- {
- "id": "glm-5.2",
- "name": "GLM-5.2"
- },
- {
- "id": "glm-5.1",
- "name": "GLM-5.1"
- }
- ]
+ "wireProtocol": "openai-chat"
}
}
},
@@ -643,47 +617,44 @@
"name": "Z.ai GLM (Global)",
"docsUrl": "https://docs.z.ai/devpack/tool/claude",
"regionHint": "global",
+ "models": [
+ {
+ "id": "glm-5.3-flash",
+ "name": "GLM-5.3-Flash",
+ "contextWindow": 1000000,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "codex": {
+ "supportsImageInput": false
+ }
+ }
+ },
+ {
+ "id": "glm-5.3",
+ "name": "GLM-5.3",
+ "contextWindow": 1000000,
+ "supportsImageInput": false
+ },
+ {
+ "id": "glm-5.2",
+ "name": "GLM-5.2"
+ },
+ {
+ "id": "glm-5.1",
+ "name": "GLM-5.1"
+ }
+ ],
"runtimes": {
"claude-code": {
- "baseUrl": "https://api.z.ai/api/anthropic",
- "models": [
- {
- "id": "glm-5.2",
- "name": "GLM-5.2"
- },
- {
- "id": "glm-5.1",
- "name": "GLM-5.1"
- }
- ]
+ "baseUrl": "https://api.z.ai/api/anthropic"
},
"codex": {
"baseUrl": "https://api.z.ai/api/paas/v4",
- "wireProtocol": "openai-chat",
- "models": [
- {
- "id": "glm-5.2",
- "name": "GLM-5.2"
- },
- {
- "id": "glm-5.1",
- "name": "GLM-5.1"
- }
- ]
+ "wireProtocol": "openai-chat"
},
"pi": {
"baseUrl": "https://api.z.ai/api/paas/v4",
- "wireProtocol": "openai-chat",
- "models": [
- {
- "id": "glm-5.2",
- "name": "GLM-5.2"
- },
- {
- "id": "glm-5.1",
- "name": "GLM-5.1"
- }
- ]
+ "wireProtocol": "openai-chat"
}
}
},
@@ -694,112 +665,54 @@
"nameZhTW": "Kimi (Moonshot 中國大陸)",
"docsUrl": "https://platform.moonshot.cn/docs/guide/agent-support",
"regionHint": "cn",
+ "models": [
+ {
+ "id": "kimi-k3",
+ "name": "Kimi K3",
+ "contextWindow": 1048576,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "pi": {
+ "reasoning": true,
+ "reasoningEfforts": ["low", "high", "max"],
+ "reasoningDefaultEffort": "max"
+ }
+ }
+ },
+ {
+ "id": "kimi-k2.7-code",
+ "name": "Kimi K2.7 Code",
+ "contextWindow": 262144,
+ "supportsImageInput": true
+ },
+ {
+ "id": "kimi-k2.7-code-highspeed",
+ "name": "Kimi K2.7 Code HighSpeed",
+ "contextWindow": 262144,
+ "supportsImageInput": true
+ },
+ {
+ "id": "kimi-k2.6",
+ "name": "Kimi K2.6",
+ "contextWindow": 262144,
+ "supportsImageInput": true
+ }
+ ],
"runtimes": {
"claude-code": {
"baseUrl": "https://api.moonshot.cn/anthropic",
- "models": [
- {
- "id": "kimi-k3",
- "name": "Kimi K3",
- "contextWindow": 1000000
- },
- {
- "id": "kimi-k2.7-code",
- "name": "Kimi K2.7 Code",
- "contextWindow": 262144
- },
- {
- "id": "kimi-k2.6",
- "name": "Kimi K2.6",
- "contextWindow": 262144
- }
- ],
"modelsUrl": "https://api.moonshot.cn/v1/models"
},
"codex": {
"baseUrl": "https://api.moonshot.cn/v1",
"wireProtocol": "openai-chat",
- "models": [
- {
- "id": "kimi-k3",
- "name": "Kimi K3"
- },
- {
- "id": "kimi-k2.7-code",
- "name": "Kimi K2.7 Code"
- },
- {
- "id": "kimi-k2.6",
- "name": "Kimi K2.6"
- }
- ],
"modelsUrl": "https://api.moonshot.cn/v1/models"
},
"pi": {
"baseUrl": "https://api.moonshot.cn/v1",
"wireProtocol": "openai-chat",
"modelsUrl": "https://api.moonshot.cn/v1/models",
- "piCatalogProviderId": "moonshotai-cn",
- "models": [
- {
- "id": "kimi-k2-0711-preview",
- "name": "Kimi K2 0711",
- "contextWindow": 131072
- },
- {
- "id": "kimi-k2-0905-preview",
- "name": "Kimi K2 0905",
- "contextWindow": 262144
- },
- {
- "id": "kimi-k2-thinking",
- "name": "Kimi K2 Thinking",
- "contextWindow": 262144
- },
- {
- "id": "kimi-k2-thinking-turbo",
- "name": "Kimi K2 Thinking Turbo",
- "contextWindow": 262144
- },
- {
- "id": "kimi-k2-turbo-preview",
- "name": "Kimi K2 Turbo",
- "contextWindow": 262144
- },
- {
- "id": "kimi-k2.5",
- "name": "Kimi K2.5",
- "contextWindow": 262144,
- "supportsImageInput": true
- },
- {
- "id": "kimi-k2.6",
- "name": "Kimi K2.6",
- "contextWindow": 262144,
- "supportsImageInput": true
- },
- {
- "id": "kimi-k2.7-code",
- "name": "Kimi K2.7 Code",
- "contextWindow": 262144,
- "supportsImageInput": true
- },
- {
- "id": "kimi-k2.7-code-highspeed",
- "name": "Kimi K2.7 Code HighSpeed",
- "contextWindow": 262144,
- "supportsImageInput": true
- },
- {
- "id": "kimi-k3",
- "name": "Kimi K3",
- "contextWindow": 1048576,
- "supportsImageInput": true,
- "reasoning": true,
- "reasoningEfforts": ["low", "high", "max"],
- "reasoningDefaultEffort": "max"
- }
- ]
+ "piCatalogProviderId": "moonshotai-cn"
}
}
},
@@ -808,112 +721,54 @@
"name": "Kimi (Moonshot Global)",
"docsUrl": "https://platform.moonshot.ai/docs/guide/agent-support",
"regionHint": "global",
+ "models": [
+ {
+ "id": "kimi-k3",
+ "name": "Kimi K3",
+ "contextWindow": 1048576,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "pi": {
+ "reasoning": true,
+ "reasoningEfforts": ["low", "high", "max"],
+ "reasoningDefaultEffort": "max"
+ }
+ }
+ },
+ {
+ "id": "kimi-k2.7-code",
+ "name": "Kimi K2.7 Code",
+ "contextWindow": 262144,
+ "supportsImageInput": true
+ },
+ {
+ "id": "kimi-k2.7-code-highspeed",
+ "name": "Kimi K2.7 Code HighSpeed",
+ "contextWindow": 262144,
+ "supportsImageInput": true
+ },
+ {
+ "id": "kimi-k2.6",
+ "name": "Kimi K2.6",
+ "contextWindow": 262144,
+ "supportsImageInput": true
+ }
+ ],
"runtimes": {
"claude-code": {
"baseUrl": "https://api.moonshot.ai/anthropic",
- "models": [
- {
- "id": "kimi-k3",
- "name": "Kimi K3",
- "contextWindow": 1000000
- },
- {
- "id": "kimi-k2.7-code",
- "name": "Kimi K2.7 Code",
- "contextWindow": 262144
- },
- {
- "id": "kimi-k2.6",
- "name": "Kimi K2.6",
- "contextWindow": 262144
- }
- ],
"modelsUrl": "https://api.moonshot.ai/v1/models"
},
"codex": {
"baseUrl": "https://api.moonshot.ai/v1",
"wireProtocol": "openai-chat",
- "models": [
- {
- "id": "kimi-k3",
- "name": "Kimi K3"
- },
- {
- "id": "kimi-k2.7-code",
- "name": "Kimi K2.7 Code"
- },
- {
- "id": "kimi-k2.6",
- "name": "Kimi K2.6"
- }
- ],
"modelsUrl": "https://api.moonshot.ai/v1/models"
},
"pi": {
"baseUrl": "https://api.moonshot.ai/v1",
"wireProtocol": "openai-chat",
"modelsUrl": "https://api.moonshot.ai/v1/models",
- "piCatalogProviderId": "moonshotai",
- "models": [
- {
- "id": "kimi-k2-0711-preview",
- "name": "Kimi K2 0711",
- "contextWindow": 131072
- },
- {
- "id": "kimi-k2-0905-preview",
- "name": "Kimi K2 0905",
- "contextWindow": 262144
- },
- {
- "id": "kimi-k2-thinking",
- "name": "Kimi K2 Thinking",
- "contextWindow": 262144
- },
- {
- "id": "kimi-k2-thinking-turbo",
- "name": "Kimi K2 Thinking Turbo",
- "contextWindow": 262144
- },
- {
- "id": "kimi-k2-turbo-preview",
- "name": "Kimi K2 Turbo",
- "contextWindow": 262144
- },
- {
- "id": "kimi-k2.5",
- "name": "Kimi K2.5",
- "contextWindow": 262144,
- "supportsImageInput": true
- },
- {
- "id": "kimi-k2.6",
- "name": "Kimi K2.6",
- "contextWindow": 262144,
- "supportsImageInput": true
- },
- {
- "id": "kimi-k2.7-code",
- "name": "Kimi K2.7 Code",
- "contextWindow": 262144,
- "supportsImageInput": true
- },
- {
- "id": "kimi-k2.7-code-highspeed",
- "name": "Kimi K2.7 Code HighSpeed",
- "contextWindow": 262144,
- "supportsImageInput": true
- },
- {
- "id": "kimi-k3",
- "name": "Kimi K3",
- "contextWindow": 1048576,
- "supportsImageInput": true,
- "reasoning": true,
- "reasoningEfforts": ["low", "high", "max"],
- "reasoningDefaultEffort": "max"
- }
- ]
+ "piCatalogProviderId": "moonshotai"
}
}
},
@@ -923,89 +778,52 @@
"nameEn": "Kimi Code (coding plan)",
"nameZhTW": "Kimi Code(程式設計計劃包月)",
"docsUrl": "https://www.kimi.com/zh-cn/help/kimi-code/third-party-agents",
- "runtimes": {
- "claude-code": {
- "baseUrl": "https://api.kimi.com/coding",
- "models": [
- {
- "id": "kimi-for-coding",
- "name": "Kimi K2.8 Preview",
- "contextWindow": 1048576,
- "supportsImageInput": true
- },
- {
- "id": "kimi-for-coding-highspeed",
- "name": "Kimi for Coding 高速版",
- "contextWindow": 262144
- },
- {
- "id": "k3",
- "name": "Kimi K3",
- "contextWindow": 262144
+ "models": [
+ {
+ "id": "kimi-for-coding",
+ "name": "Kimi K2.8 Preview",
+ "contextWindow": 1048576,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "pi": {
+ "reasoning": true,
+ "reasoningEfforts": ["low", "high", "max"],
+ "reasoningDefaultEffort": "max"
}
- ]
+ }
},
- "codex": {
- "baseUrl": "https://api.kimi.com/coding/v1",
- "wireProtocol": "openai-chat",
- "models": [
- {
- "id": "kimi-for-coding",
- "name": "Kimi K2.8 Preview",
- "contextWindow": 1048576,
- "supportsImageInput": true
- },
- {
- "id": "kimi-for-coding-highspeed",
- "name": "Kimi for Coding 高速版",
- "contextWindow": 262144
- },
- {
- "id": "k3",
- "name": "Kimi K3",
- "contextWindow": 262144
- }
- ]
+ {
+ "id": "kimi-for-coding-highspeed",
+ "name": "Kimi K2.7 Code HighSpeed",
+ "contextWindow": 262144,
+ "supportsImageInput": true
},
- "pi": {
- "baseUrl": "https://api.kimi.com/coding",
- "wireProtocol": "anthropic-messages",
- "piCatalogProviderId": "kimi-coding",
- "models": [
- {
- "id": "k3",
- "name": "Kimi K3",
- "contextWindow": 1048576,
- "supportsImageInput": true,
- "reasoning": true,
- "reasoningEfforts": ["low", "high", "max"],
- "reasoningDefaultEffort": "high"
- },
- {
- "id": "k3-256k",
- "name": "Kimi K3-256K",
- "contextWindow": 262144,
- "supportsImageInput": true,
+ {
+ "id": "k3",
+ "name": "Kimi K3",
+ "contextWindow": 262144,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "pi": {
"reasoning": true,
"reasoningEfforts": ["low", "high", "max"],
"reasoningDefaultEffort": "high"
- },
- {
- "id": "kimi-for-coding",
- "name": "Kimi K2.8 Preview",
- "contextWindow": 1048576,
- "supportsImageInput": true,
- "reasoning": true,
- "reasoningEfforts": ["low", "high", "max"],
- "reasoningDefaultEffort": "max"
- },
- {
- "id": "kimi-for-coding-highspeed",
- "name": "Kimi For Coding HighSpeed",
- "contextWindow": 262144,
- "supportsImageInput": true
}
- ]
+ }
+ }
+ ],
+ "runtimes": {
+ "claude-code": {
+ "baseUrl": "https://api.kimi.com/coding"
+ },
+ "codex": {
+ "baseUrl": "https://api.kimi.com/coding/v1",
+ "wireProtocol": "openai-chat"
+ },
+ "pi": {
+ "baseUrl": "https://api.kimi.com/coding",
+ "wireProtocol": "anthropic-messages",
+ "piCatalogProviderId": "kimi-coding"
}
}
},
@@ -1016,57 +834,67 @@
"nameZhTW": "MiniMax(中國大陸)",
"docsUrl": "https://platform.minimaxi.com/docs/api-reference/responses-create",
"regionHint": "cn",
+ "models": [
+ {
+ "id": "MiniMax-M3",
+ "name": "MiniMax-M3",
+ "contextWindow": 1000000,
+ "supportsImageInput": true
+ },
+ {
+ "id": "MiniMax-M2.7",
+ "name": "MiniMax-M2.7",
+ "contextWindow": 204800,
+ "supportsImageInput": false
+ },
+ {
+ "id": "MiniMax-M2.7-highspeed",
+ "name": "MiniMax-M2.7-highspeed",
+ "contextWindow": 204800,
+ "supportsImageInput": false
+ },
+ {
+ "id": "MiniMax-M2.5",
+ "name": "MiniMax-M2.5",
+ "contextWindow": 204800,
+ "supportsImageInput": false
+ },
+ {
+ "id": "MiniMax-M2.5-highspeed",
+ "name": "MiniMax-M2.5-highspeed",
+ "contextWindow": 204800,
+ "supportsImageInput": false
+ },
+ {
+ "id": "MiniMax-M2.1",
+ "name": "MiniMax-M2.1",
+ "contextWindow": 204800,
+ "supportsImageInput": false
+ },
+ {
+ "id": "MiniMax-M2.1-highspeed",
+ "name": "MiniMax-M2.1-highspeed",
+ "contextWindow": 204800,
+ "supportsImageInput": false
+ },
+ {
+ "id": "MiniMax-M2",
+ "name": "MiniMax-M2",
+ "contextWindow": 204800,
+ "supportsImageInput": false
+ }
+ ],
"runtimes": {
"claude-code": {
- "baseUrl": "https://api.minimaxi.com/anthropic",
- "models": [
- {
- "id": "MiniMax-M3",
- "name": "MiniMax M3",
- "contextWindow": 1000000
- },
- {
- "id": "MiniMax-M2.5",
- "name": "MiniMax M2.5"
- }
- ]
+ "baseUrl": "https://api.minimaxi.com/anthropic"
},
"codex": {
- "baseUrl": "https://api.minimaxi.com/v1",
- "models": [
- {
- "id": "MiniMax-M3",
- "name": "MiniMax M3",
- "contextWindow": 1000000
- },
- {
- "id": "MiniMax-M2.5",
- "name": "MiniMax M2.5"
- }
- ]
+ "baseUrl": "https://api.minimaxi.com/v1"
},
"pi": {
"baseUrl": "https://api.minimaxi.com/anthropic",
"wireProtocol": "anthropic-messages",
- "piCatalogProviderId": "minimax-cn",
- "models": [
- {
- "id": "MiniMax-M2.7",
- "name": "MiniMax-M2.7",
- "contextWindow": 204800
- },
- {
- "id": "MiniMax-M2.7-highspeed",
- "name": "MiniMax-M2.7-highspeed",
- "contextWindow": 204800
- },
- {
- "id": "MiniMax-M3",
- "name": "MiniMax-M3",
- "contextWindow": 1048576,
- "supportsImageInput": true
- }
- ]
+ "piCatalogProviderId": "minimax-cn"
}
}
},
@@ -1075,57 +903,67 @@
"name": "MiniMax (Global)",
"docsUrl": "https://platform.minimax.io/docs/api-reference/responses-create",
"regionHint": "global",
+ "models": [
+ {
+ "id": "MiniMax-M3",
+ "name": "MiniMax-M3",
+ "contextWindow": 1000000,
+ "supportsImageInput": true
+ },
+ {
+ "id": "MiniMax-M2.7",
+ "name": "MiniMax-M2.7",
+ "contextWindow": 204800,
+ "supportsImageInput": false
+ },
+ {
+ "id": "MiniMax-M2.7-highspeed",
+ "name": "MiniMax-M2.7-highspeed",
+ "contextWindow": 204800,
+ "supportsImageInput": false
+ },
+ {
+ "id": "MiniMax-M2.5",
+ "name": "MiniMax-M2.5",
+ "contextWindow": 204800,
+ "supportsImageInput": false
+ },
+ {
+ "id": "MiniMax-M2.5-highspeed",
+ "name": "MiniMax-M2.5-highspeed",
+ "contextWindow": 204800,
+ "supportsImageInput": false
+ },
+ {
+ "id": "MiniMax-M2.1",
+ "name": "MiniMax-M2.1",
+ "contextWindow": 204800,
+ "supportsImageInput": false
+ },
+ {
+ "id": "MiniMax-M2.1-highspeed",
+ "name": "MiniMax-M2.1-highspeed",
+ "contextWindow": 204800,
+ "supportsImageInput": false
+ },
+ {
+ "id": "MiniMax-M2",
+ "name": "MiniMax-M2",
+ "contextWindow": 204800,
+ "supportsImageInput": false
+ }
+ ],
"runtimes": {
"claude-code": {
- "baseUrl": "https://api.minimax.io/anthropic",
- "models": [
- {
- "id": "MiniMax-M3",
- "name": "MiniMax M3",
- "contextWindow": 1000000
- },
- {
- "id": "MiniMax-M2.5",
- "name": "MiniMax M2.5"
- }
- ]
+ "baseUrl": "https://api.minimax.io/anthropic"
},
"codex": {
- "baseUrl": "https://api.minimax.io/v1",
- "models": [
- {
- "id": "MiniMax-M3",
- "name": "MiniMax M3",
- "contextWindow": 1000000
- },
- {
- "id": "MiniMax-M2.5",
- "name": "MiniMax M2.5"
- }
- ]
+ "baseUrl": "https://api.minimax.io/v1"
},
"pi": {
"baseUrl": "https://api.minimax.io/anthropic",
"wireProtocol": "anthropic-messages",
- "piCatalogProviderId": "minimax",
- "models": [
- {
- "id": "MiniMax-M2.7",
- "name": "MiniMax-M2.7",
- "contextWindow": 204800
- },
- {
- "id": "MiniMax-M2.7-highspeed",
- "name": "MiniMax-M2.7-highspeed",
- "contextWindow": 204800
- },
- {
- "id": "MiniMax-M3",
- "name": "MiniMax-M3",
- "contextWindow": 1048576,
- "supportsImageInput": true
- }
- ]
+ "piCatalogProviderId": "minimax"
}
}
},
@@ -1136,61 +974,68 @@
"nameZhTW": "阿里雲百鍊 Coding Plan(包月)",
"docsUrl": "https://help.aliyun.com/zh/model-studio/coding-plan",
"regionHint": "cn",
+ "models": [
+ {
+ "id": "qwen3.7-plus",
+ "name": "Qwen3.7-Plus",
+ "contextWindow": 983616,
+ "supportsImageInput": true
+ },
+ {
+ "id": "qwen3.6-plus",
+ "name": "Qwen3.6-Plus",
+ "contextWindow": 983616,
+ "supportsImageInput": true
+ },
+ {
+ "id": "kimi-k2.5",
+ "name": "Kimi K2.5",
+ "contextWindow": 229376,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "codex": {
+ "supportsImageInput": false
+ }
+ }
+ },
+ {
+ "id": "glm-5",
+ "name": "GLM-5",
+ "contextWindow": 169984,
+ "supportsImageInput": false
+ },
+ {
+ "id": "MiniMax-M2.5",
+ "name": "MiniMax-M2.5",
+ "contextWindow": 196608,
+ "supportsImageInput": false
+ },
+ {
+ "id": "qwen3-coder-next",
+ "name": "Qwen3 Coder Next",
+ "contextWindow": 204800,
+ "supportsImageInput": false
+ },
+ {
+ "id": "qwen3-coder-plus",
+ "name": "Qwen3-Coder-Plus",
+ "contextWindow": 997952,
+ "supportsImageInput": false
+ }
+ ],
"runtimes": {
"claude-code": {
"baseUrl": "https://coding.dashscope.aliyuncs.com/apps/anthropic",
- "modelsUrl": "https://coding.dashscope.aliyuncs.com/v1/models",
- "models": [
- {
- "id": "qwen3.7-plus",
- "name": "Qwen 3.7 Plus"
- },
- {
- "id": "qwen3-coder-next",
- "name": "Qwen3 Coder Next"
- },
- {
- "id": "qwen3-coder-plus",
- "name": "Qwen3 Coder Plus"
- }
- ]
+ "modelsUrl": "https://coding.dashscope.aliyuncs.com/v1/models"
},
"codex": {
"baseUrl": "https://coding.dashscope.aliyuncs.com/v1",
- "wireProtocol": "openai-chat",
- "models": [
- {
- "id": "qwen3.7-plus",
- "name": "Qwen 3.7 Plus"
- },
- {
- "id": "qwen3-coder-next",
- "name": "Qwen3 Coder Next"
- },
- {
- "id": "qwen3-coder-plus",
- "name": "Qwen3 Coder Plus"
- }
- ]
+ "wireProtocol": "openai-chat"
},
"pi": {
"baseUrl": "https://coding.dashscope.aliyuncs.com/v1",
"wireProtocol": "openai-chat",
- "modelsUrl": "https://coding.dashscope.aliyuncs.com/v1/models",
- "models": [
- {
- "id": "qwen3.7-plus",
- "name": "Qwen 3.7 Plus"
- },
- {
- "id": "qwen3-coder-next",
- "name": "Qwen3 Coder Next"
- },
- {
- "id": "qwen3-coder-plus",
- "name": "Qwen3 Coder Plus"
- }
- ]
+ "modelsUrl": "https://coding.dashscope.aliyuncs.com/v1/models"
}
}
},
@@ -1201,518 +1046,308 @@
"nameZhTW": "阿里雲百鍊 Token Plan(個人版)",
"docsUrl": "https://help.aliyun.com/zh/model-studio/token-plan-personal-overview",
"regionHint": "cn",
- "runtimes": {
- "claude-code": {
- "baseUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/apps/anthropic",
- "modelsUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1/models",
- "models": [
- {
- "id": "qwen3.8-max-preview",
- "name": "Qwen 3.8 Max Preview",
- "contextWindow": 983616
- },
- {
- "id": "qwen3.7-max",
- "name": "Qwen 3.7 Max",
- "contextWindow": 992000
- },
- {
- "id": "qwen3.7-plus",
- "name": "Qwen 3.7 Plus",
- "contextWindow": 1000000
- },
- {
- "id": "qwen3.6-flash",
- "name": "Qwen 3.6 Flash",
- "contextWindow": 1000000
- },
- {
- "id": "glm-5.2",
- "name": "GLM-5.2",
- "contextWindow": 1000000
- },
- {
- "id": "deepseek-v4-pro",
- "name": "DeepSeek V4 Pro",
- "contextWindow": 1048576
+ "models": [
+ {
+ "id": "qwen3.8-max",
+ "name": "Qwen3.8-Max",
+ "contextWindow": 983616,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "pi": {
+ "reasoning": true,
+ "reasoningEfforts": ["low", "medium", "xhigh"],
+ "reasoningDefaultEffort": "medium"
}
- ]
+ }
},
- "codex": {
- "baseUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",
- "wireProtocol": "openai-chat",
- "modelsUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1/models",
- "models": [
- {
- "id": "qwen3.8-max-preview",
- "name": "Qwen 3.8 Max Preview",
- "contextWindow": 983616
- },
- {
- "id": "qwen3.7-max",
- "name": "Qwen 3.7 Max",
- "contextWindow": 992000
- },
- {
- "id": "qwen3.7-plus",
- "name": "Qwen 3.7 Plus",
- "contextWindow": 1000000
- },
- {
- "id": "qwen3.6-flash",
- "name": "Qwen 3.6 Flash",
- "contextWindow": 1000000
- },
- {
- "id": "glm-5.2",
- "name": "GLM-5.2",
- "contextWindow": 1000000
- },
- {
- "id": "deepseek-v4-pro",
- "name": "DeepSeek V4 Pro",
- "contextWindow": 1048576
+ {
+ "id": "qwen3.8-flash",
+ "name": "Qwen3.8-Flash",
+ "contextWindow": 983616,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "pi": {
+ "reasoning": true,
+ "reasoningEfforts": ["low", "medium", "xhigh"],
+ "reasoningDefaultEffort": "medium"
}
- ]
+ }
},
- "pi": {
- "baseUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",
- "wireProtocol": "openai-chat",
- "modelsUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1/models",
- "piCatalogProviderId": "qwen-token-plan-cn",
- "models": [
- {
- "id": "MiniMax-M2.5",
- "name": "MiniMax-M2.5",
- "contextWindow": 196608
- },
- {
- "id": "deepseek-v3.2",
- "name": "DeepSeek V3.2",
- "contextWindow": 131072
- },
- {
- "id": "deepseek-v4-flash",
- "name": "DeepSeek V4 Flash",
- "contextWindow": 1000000,
- "reasoning": true,
- "reasoningEfforts": ["high", "max"],
- "reasoningDefaultEffort": "high"
- },
- {
- "id": "deepseek-v4-flash-0731",
- "name": "DeepSeek V4 Flash 0731",
- "contextWindow": 1000000,
- "reasoning": true,
- "reasoningEfforts": ["high", "max"],
- "reasoningDefaultEffort": "high"
- },
- {
- "id": "deepseek-v4-pro",
- "name": "DeepSeek V4 Pro",
- "contextWindow": 1000000,
- "reasoning": true,
- "reasoningEfforts": ["high", "max"],
- "reasoningDefaultEffort": "high"
- },
- {
- "id": "deepseek-v4-pro-0813",
- "name": "DeepSeek V4 Pro 0813",
- "contextWindow": 1000000,
- "reasoning": true,
- "reasoningEfforts": ["high", "max"],
- "reasoningDefaultEffort": "high"
- },
- {
- "id": "glm-5",
- "name": "GLM-5",
- "contextWindow": 202752,
- "reasoning": true,
- "reasoningEfforts": ["high", "max"],
- "reasoningDefaultEffort": "high"
- },
- {
- "id": "glm-5.1",
- "name": "GLM-5.1",
- "contextWindow": 202752,
+ {
+ "id": "qwen3.7-max",
+ "name": "Qwen3.7-Max",
+ "contextWindow": 983616,
+ "supportsImageInput": false
+ },
+ {
+ "id": "qwen3.7-plus",
+ "name": "Qwen3.7-Plus",
+ "contextWindow": 983616,
+ "supportsImageInput": true
+ },
+ {
+ "id": "qwen3.6-flash",
+ "name": "Qwen3.6-Flash",
+ "contextWindow": 983616,
+ "supportsImageInput": true
+ },
+ {
+ "id": "deepseek-v4.1-flash",
+ "name": "DeepSeek-V4.1-Flash",
+ "contextWindow": 1000000,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "codex": {
+ "supportsImageInput": false
+ }
+ }
+ },
+ {
+ "id": "deepseek-v4-pro",
+ "name": "DeepSeek-V4-Pro",
+ "contextWindow": 1000000,
+ "supportsImageInput": false,
+ "engineOverrides": {
+ "pi": {
"reasoning": true,
"reasoningEfforts": ["high", "max"],
"reasoningDefaultEffort": "high"
- },
- {
- "id": "glm-5.2",
- "name": "GLM-5.2",
- "contextWindow": 1000000,
+ }
+ }
+ },
+ {
+ "id": "glm-5.3",
+ "name": "GLM-5.3",
+ "contextWindow": 1048576,
+ "supportsImageInput": false
+ },
+ {
+ "id": "glm-5.2",
+ "name": "GLM-5.2",
+ "contextWindow": 1048576,
+ "supportsImageInput": false,
+ "engineOverrides": {
+ "pi": {
"reasoning": true,
"reasoningEfforts": ["high", "max"],
"reasoningDefaultEffort": "high"
- },
- {
- "id": "kimi-k2.5",
- "name": "Kimi K2.5",
- "contextWindow": 262144,
- "supportsImageInput": true
- },
- {
- "id": "kimi-k2.6",
- "name": "Kimi K2.6",
- "contextWindow": 262144,
- "supportsImageInput": true
- },
- {
- "id": "kimi-k2.7-code",
- "name": "Kimi K2.7 Code",
- "contextWindow": 262144,
- "supportsImageInput": true
- },
- {
- "id": "qwen3.6-flash",
- "name": "Qwen3.6 Flash",
- "contextWindow": 1000000,
- "supportsImageInput": true
- },
- {
- "id": "qwen3.6-plus",
- "name": "Qwen3.6 Plus",
- "contextWindow": 1000000,
- "supportsImageInput": true
- },
- {
- "id": "qwen3.7-max",
- "name": "Qwen3.7 Max",
- "contextWindow": 1000000
- },
- {
- "id": "qwen3.7-plus",
- "name": "Qwen3.7 Plus",
- "contextWindow": 1000000,
- "supportsImageInput": true
- },
- {
- "id": "qwen3.8-flash",
- "name": "Qwen3.8 Flash",
- "contextWindow": 1000000,
- "supportsImageInput": true,
- "reasoning": true,
- "reasoningEfforts": ["low", "medium", "xhigh"],
- "reasoningDefaultEffort": "medium"
- },
- {
- "id": "qwen3.8-max",
- "name": "Qwen3.8 Max",
- "contextWindow": 1000000,
- "supportsImageInput": true,
- "reasoning": true,
- "reasoningEfforts": ["low", "medium", "xhigh"],
- "reasoningDefaultEffort": "medium"
}
- ]
+ }
}
- }
- },
- {
- "id": "aliyun-bailian-token-plan-team-cn",
- "name": "阿里云百炼 Token Plan(团队版)",
- "nameEn": "Alibaba Cloud Bailian Token Plan (Team)",
- "nameZhTW": "阿里雲百鍊 Token Plan(團隊版)",
- "docsUrl": "https://help.aliyun.com/zh/model-studio/token-plan-team-overview",
- "regionHint": "cn",
+ ],
"runtimes": {
"claude-code": {
"baseUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/apps/anthropic",
- "modelsUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1/models",
- "models": [
- {
- "id": "qwen3.8-max-preview",
- "name": "Qwen 3.8 Max Preview",
- "contextWindow": 983616
- },
- {
- "id": "qwen3.7-max",
- "name": "Qwen 3.7 Max",
- "contextWindow": 992000
- },
- {
- "id": "qwen3.7-plus",
- "name": "Qwen 3.7 Plus",
- "contextWindow": 1000000
- },
- {
- "id": "qwen3.6-plus",
- "name": "Qwen 3.6 Plus",
- "contextWindow": 1000000
- },
- {
- "id": "qwen3.6-flash",
- "name": "Qwen 3.6 Flash",
- "contextWindow": 1000000
- },
- {
- "id": "deepseek-v4-pro",
- "name": "DeepSeek V4 Pro",
- "contextWindow": 1048576
- },
- {
- "id": "deepseek-v4-flash",
- "name": "DeepSeek V4 Flash",
- "contextWindow": 1048576
- },
- {
- "id": "deepseek-v3.2",
- "name": "DeepSeek V3.2",
- "contextWindow": 131072
- },
- {
- "id": "kimi-k2.7-code",
- "name": "Kimi K2.7 Code",
- "contextWindow": 262144
- },
- {
- "id": "kimi-k2.6",
- "name": "Kimi K2.6",
- "contextWindow": 262144
- },
- {
- "id": "kimi-k2.5",
- "name": "Kimi K2.5",
- "contextWindow": 262144
- },
- {
- "id": "glm-5.2",
- "name": "GLM-5.2",
- "contextWindow": 1000000
- },
- {
- "id": "glm-5.1",
- "name": "GLM-5.1",
- "contextWindow": 202752
- },
- {
- "id": "glm-5",
- "name": "GLM-5",
- "contextWindow": 202752
- },
- {
- "id": "MiniMax-M2.5",
- "name": "MiniMax M2.5",
- "contextWindow": 196608
- }
- ]
+ "modelsUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1/models"
},
"codex": {
"baseUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",
"wireProtocol": "openai-chat",
- "modelsUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1/models",
- "models": [
- {
- "id": "qwen3.8-max-preview",
- "name": "Qwen 3.8 Max Preview",
- "contextWindow": 983616
- },
- {
- "id": "qwen3.7-max",
- "name": "Qwen 3.7 Max",
- "contextWindow": 992000
- },
- {
- "id": "qwen3.7-plus",
- "name": "Qwen 3.7 Plus",
- "contextWindow": 1000000
- },
- {
- "id": "qwen3.6-plus",
- "name": "Qwen 3.6 Plus",
- "contextWindow": 1000000
- },
- {
- "id": "qwen3.6-flash",
- "name": "Qwen 3.6 Flash",
- "contextWindow": 1000000
- },
- {
- "id": "deepseek-v4-pro",
- "name": "DeepSeek V4 Pro",
- "contextWindow": 1048576
- },
- {
- "id": "deepseek-v4-flash",
- "name": "DeepSeek V4 Flash",
- "contextWindow": 1048576
- },
- {
- "id": "deepseek-v3.2",
- "name": "DeepSeek V3.2",
- "contextWindow": 131072
- },
- {
- "id": "kimi-k2.7-code",
- "name": "Kimi K2.7 Code",
- "contextWindow": 262144
- },
- {
- "id": "kimi-k2.6",
- "name": "Kimi K2.6",
- "contextWindow": 262144
- },
- {
- "id": "kimi-k2.5",
- "name": "Kimi K2.5",
- "contextWindow": 262144
- },
- {
- "id": "glm-5.2",
- "name": "GLM-5.2",
- "contextWindow": 1000000
- },
- {
- "id": "glm-5.1",
- "name": "GLM-5.1",
- "contextWindow": 202752
- },
- {
- "id": "glm-5",
- "name": "GLM-5",
- "contextWindow": 202752
- },
- {
- "id": "MiniMax-M2.5",
- "name": "MiniMax M2.5",
- "contextWindow": 196608
- }
- ]
+ "modelsUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1/models"
},
"pi": {
"baseUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",
"wireProtocol": "openai-chat",
"modelsUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1/models",
- "piCatalogProviderId": "qwen-token-plan-cn",
- "models": [
- {
- "id": "MiniMax-M2.5",
- "name": "MiniMax-M2.5",
- "contextWindow": 196608
- },
- {
- "id": "deepseek-v3.2",
- "name": "DeepSeek V3.2",
- "contextWindow": 131072
- },
- {
- "id": "deepseek-v4-flash",
- "name": "DeepSeek V4 Flash",
- "contextWindow": 1000000,
+ "piCatalogProviderId": "qwen-token-plan-cn"
+ }
+ }
+ },
+ {
+ "id": "aliyun-bailian-token-plan-team-cn",
+ "name": "阿里云百炼 Token Plan(团队版)",
+ "nameEn": "Alibaba Cloud Bailian Token Plan (Team)",
+ "nameZhTW": "阿里雲百鍊 Token Plan(團隊版)",
+ "docsUrl": "https://help.aliyun.com/zh/model-studio/token-plan-team-overview",
+ "regionHint": "cn",
+ "models": [
+ {
+ "id": "qwen3.8-max",
+ "name": "Qwen3.8-Max",
+ "contextWindow": 983616,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "pi": {
"reasoning": true,
- "reasoningEfforts": ["high", "max"],
- "reasoningDefaultEffort": "high"
- },
- {
- "id": "deepseek-v4-flash-0731",
- "name": "DeepSeek V4 Flash 0731",
- "contextWindow": 1000000,
+ "reasoningEfforts": ["low", "medium", "xhigh"],
+ "reasoningDefaultEffort": "medium"
+ }
+ }
+ },
+ {
+ "id": "qwen3.8-flash",
+ "name": "Qwen3.8-Flash",
+ "contextWindow": 983616,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "pi": {
"reasoning": true,
- "reasoningEfforts": ["high", "max"],
- "reasoningDefaultEffort": "high"
- },
- {
- "id": "deepseek-v4-pro",
- "name": "DeepSeek V4 Pro",
- "contextWindow": 1000000,
+ "reasoningEfforts": ["low", "medium", "xhigh"],
+ "reasoningDefaultEffort": "medium"
+ }
+ }
+ },
+ {
+ "id": "qwen3.7-max",
+ "name": "Qwen3.7-Max",
+ "contextWindow": 983616,
+ "supportsImageInput": false
+ },
+ {
+ "id": "qwen3.7-plus",
+ "name": "Qwen3.7-Plus",
+ "contextWindow": 983616,
+ "supportsImageInput": true
+ },
+ {
+ "id": "qwen3.6-plus",
+ "name": "Qwen3.6-Plus",
+ "contextWindow": 983616,
+ "supportsImageInput": true
+ },
+ {
+ "id": "qwen3.6-flash",
+ "name": "Qwen3.6-Flash",
+ "contextWindow": 983616,
+ "supportsImageInput": true
+ },
+ {
+ "id": "deepseek-v4.1-flash",
+ "name": "DeepSeek-V4.1-Flash",
+ "contextWindow": 1000000,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "codex": {
+ "supportsImageInput": false
+ }
+ }
+ },
+ {
+ "id": "deepseek-v4-pro",
+ "name": "DeepSeek-V4-Pro",
+ "contextWindow": 1000000,
+ "supportsImageInput": false,
+ "engineOverrides": {
+ "pi": {
"reasoning": true,
"reasoningEfforts": ["high", "max"],
"reasoningDefaultEffort": "high"
- },
- {
- "id": "deepseek-v4-pro-0813",
- "name": "DeepSeek V4 Pro 0813",
- "contextWindow": 1000000,
+ }
+ }
+ },
+ {
+ "id": "deepseek-v4-flash",
+ "name": "DeepSeek-V4-Flash",
+ "contextWindow": 1000000,
+ "supportsImageInput": false,
+ "engineOverrides": {
+ "pi": {
"reasoning": true,
"reasoningEfforts": ["high", "max"],
"reasoningDefaultEffort": "high"
- },
- {
- "id": "glm-5",
- "name": "GLM-5",
- "contextWindow": 202752,
+ }
+ }
+ },
+ {
+ "id": "kimi-k2.7-code",
+ "name": "Kimi K2.7 Code",
+ "contextWindow": 229376,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "codex": {
+ "supportsImageInput": false
+ }
+ }
+ },
+ {
+ "id": "kimi-k2.6",
+ "name": "Kimi K2.6",
+ "contextWindow": 229376,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "codex": {
+ "supportsImageInput": false
+ }
+ }
+ },
+ {
+ "id": "kimi-k2.5",
+ "name": "Kimi K2.5",
+ "contextWindow": 229376,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "codex": {
+ "supportsImageInput": false
+ }
+ }
+ },
+ {
+ "id": "glm-5.3",
+ "name": "GLM-5.3",
+ "contextWindow": 1048576,
+ "supportsImageInput": false
+ },
+ {
+ "id": "glm-5.2",
+ "name": "GLM-5.2",
+ "contextWindow": 1048576,
+ "supportsImageInput": false,
+ "engineOverrides": {
+ "pi": {
"reasoning": true,
"reasoningEfforts": ["high", "max"],
"reasoningDefaultEffort": "high"
- },
- {
- "id": "glm-5.1",
- "name": "GLM-5.1",
- "contextWindow": 202752,
+ }
+ }
+ },
+ {
+ "id": "glm-5.1",
+ "name": "GLM-5.1",
+ "contextWindow": 169984,
+ "supportsImageInput": false,
+ "engineOverrides": {
+ "pi": {
"reasoning": true,
"reasoningEfforts": ["high", "max"],
"reasoningDefaultEffort": "high"
- },
- {
- "id": "glm-5.2",
- "name": "GLM-5.2",
- "contextWindow": 1000000,
+ }
+ }
+ },
+ {
+ "id": "glm-5",
+ "name": "GLM-5",
+ "contextWindow": 169984,
+ "supportsImageInput": false,
+ "engineOverrides": {
+ "pi": {
"reasoning": true,
"reasoningEfforts": ["high", "max"],
"reasoningDefaultEffort": "high"
- },
- {
- "id": "kimi-k2.5",
- "name": "Kimi K2.5",
- "contextWindow": 262144,
- "supportsImageInput": true
- },
- {
- "id": "kimi-k2.6",
- "name": "Kimi K2.6",
- "contextWindow": 262144,
- "supportsImageInput": true
- },
- {
- "id": "kimi-k2.7-code",
- "name": "Kimi K2.7 Code",
- "contextWindow": 262144,
- "supportsImageInput": true
- },
- {
- "id": "qwen3.6-flash",
- "name": "Qwen3.6 Flash",
- "contextWindow": 1000000,
- "supportsImageInput": true
- },
- {
- "id": "qwen3.6-plus",
- "name": "Qwen3.6 Plus",
- "contextWindow": 1000000,
- "supportsImageInput": true
- },
- {
- "id": "qwen3.7-max",
- "name": "Qwen3.7 Max",
- "contextWindow": 1000000
- },
- {
- "id": "qwen3.7-plus",
- "name": "Qwen3.7 Plus",
- "contextWindow": 1000000,
- "supportsImageInput": true
- },
- {
- "id": "qwen3.8-flash",
- "name": "Qwen3.8 Flash",
- "contextWindow": 1000000,
- "supportsImageInput": true,
- "reasoning": true,
- "reasoningEfforts": ["low", "medium", "xhigh"],
- "reasoningDefaultEffort": "medium"
- },
- {
- "id": "qwen3.8-max",
- "name": "Qwen3.8 Max",
- "contextWindow": 1000000,
- "supportsImageInput": true,
- "reasoning": true,
- "reasoningEfforts": ["low", "medium", "xhigh"],
- "reasoningDefaultEffort": "medium"
}
- ]
+ }
+ },
+ {
+ "id": "MiniMax-M2.5",
+ "name": "MiniMax-M2.5",
+ "contextWindow": 196608,
+ "supportsImageInput": false
+ }
+ ],
+ "runtimes": {
+ "claude-code": {
+ "baseUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/apps/anthropic",
+ "modelsUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1/models"
+ },
+ "codex": {
+ "baseUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",
+ "wireProtocol": "openai-chat",
+ "modelsUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1/models"
+ },
+ "pi": {
+ "baseUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",
+ "wireProtocol": "openai-chat",
+ "modelsUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1/models",
+ "piCatalogProviderId": "qwen-token-plan-cn"
}
}
},
@@ -1721,50 +1356,33 @@
"name": "Google Gemini API",
"docsUrl": "https://ai.google.dev/gemini-api/docs/openai",
"regionHint": "global",
+ "models": [
+ {
+ "id": "gemini-3.6-flash",
+ "name": "Gemini 3.6 Flash",
+ "contextWindow": 1000000
+ },
+ {
+ "id": "gemini-3.5-flash",
+ "name": "Gemini 3.5 Flash",
+ "contextWindow": 1000000
+ },
+ {
+ "id": "gemini-3.5-flash-lite",
+ "name": "Gemini 3.5 Flash-Lite",
+ "contextWindow": 1000000
+ }
+ ],
"runtimes": {
"codex": {
"baseUrl": "https://generativelanguage.googleapis.com/v1beta/openai",
"wireProtocol": "openai-chat",
- "modelsUrl": "https://generativelanguage.googleapis.com/v1beta/openai/models",
- "models": [
- {
- "id": "gemini-3.6-flash",
- "name": "Gemini 3.6 Flash",
- "contextWindow": 1000000
- },
- {
- "id": "gemini-3.5-flash",
- "name": "Gemini 3.5 Flash",
- "contextWindow": 1000000
- },
- {
- "id": "gemini-3.5-flash-lite",
- "name": "Gemini 3.5 Flash-Lite",
- "contextWindow": 1000000
- }
- ]
+ "modelsUrl": "https://generativelanguage.googleapis.com/v1beta/openai/models"
},
"pi": {
"baseUrl": "https://generativelanguage.googleapis.com/v1beta/openai",
"wireProtocol": "openai-chat",
- "modelsUrl": "https://generativelanguage.googleapis.com/v1beta/openai/models",
- "models": [
- {
- "id": "gemini-3.6-flash",
- "name": "Gemini 3.6 Flash",
- "contextWindow": 1000000
- },
- {
- "id": "gemini-3.5-flash",
- "name": "Gemini 3.5 Flash",
- "contextWindow": 1000000
- },
- {
- "id": "gemini-3.5-flash-lite",
- "name": "Gemini 3.5 Flash-Lite",
- "contextWindow": 1000000
- }
- ]
+ "modelsUrl": "https://generativelanguage.googleapis.com/v1beta/openai/models"
}
}
},
@@ -1773,17 +1391,16 @@
"name": "LiteLLM Proxy",
"docsUrl": "https://docs.litellm.ai/docs/proxy/quick_start",
"authMethod": "none",
+ "models": [],
"runtimes": {
"codex": {
"baseUrl": "http://127.0.0.1:4000/v1",
- "baseUrlEditable": true,
- "models": []
+ "baseUrlEditable": true
},
"pi": {
"baseUrl": "http://127.0.0.1:4000/v1",
"wireProtocol": "openai-chat",
- "baseUrlEditable": true,
- "models": []
+ "baseUrlEditable": true
}
}
},
@@ -1792,24 +1409,22 @@
"name": "LM Studio",
"docsUrl": "https://lmstudio.ai/docs/app/api",
"authMethod": "none",
+ "models": [],
"runtimes": {
"claude-code": {
"baseUrl": "http://127.0.0.1:1234",
"wireProtocol": "anthropic-messages",
- "baseUrlEditable": true,
- "models": []
+ "baseUrlEditable": true
},
"codex": {
"baseUrl": "http://127.0.0.1:1234/v1",
"wireProtocol": "openai-chat",
- "baseUrlEditable": true,
- "models": []
+ "baseUrlEditable": true
},
"pi": {
"baseUrl": "http://127.0.0.1:1234/v1",
"wireProtocol": "openai-chat",
- "baseUrlEditable": true,
- "models": []
+ "baseUrlEditable": true
}
}
},
@@ -1818,18 +1433,17 @@
"name": "llama.cpp",
"docsUrl": "https://github.com/ggml-org/llama.cpp/blob/master/tools/server/README.md",
"authMethod": "none",
+ "models": [],
"runtimes": {
"codex": {
"baseUrl": "http://127.0.0.1:8080/v1",
"wireProtocol": "openai-chat",
- "baseUrlEditable": true,
- "models": []
+ "baseUrlEditable": true
},
"pi": {
"baseUrl": "http://127.0.0.1:8080/v1",
"wireProtocol": "openai-chat",
- "baseUrlEditable": true,
- "models": []
+ "baseUrlEditable": true
}
}
},
@@ -1838,18 +1452,17 @@
"name": "vLLM",
"docsUrl": "https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html",
"authMethod": "none",
+ "models": [],
"runtimes": {
"codex": {
"baseUrl": "http://127.0.0.1:8000/v1",
"wireProtocol": "openai-chat",
- "baseUrlEditable": true,
- "models": []
+ "baseUrlEditable": true
},
"pi": {
"baseUrl": "http://127.0.0.1:8000/v1",
"wireProtocol": "openai-chat",
- "baseUrlEditable": true,
- "models": []
+ "baseUrlEditable": true
}
}
},
@@ -1857,40 +1470,26 @@
"id": "longcat",
"name": "LongCat",
"docsUrl": "https://longcat.chat/platform/docs/zh/",
+ "models": [
+ {
+ "id": "LongCat-2.0",
+ "name": "LongCat 2.0",
+ "contextWindow": 1000000
+ }
+ ],
"runtimes": {
"claude-code": {
"baseUrl": "https://api.longcat.chat/anthropic",
- "modelsUrl": "https://api.longcat.chat/openai/v1/models",
- "models": [
- {
- "id": "LongCat-2.0",
- "name": "LongCat 2.0",
- "contextWindow": 1000000
- }
- ]
+ "modelsUrl": "https://api.longcat.chat/openai/v1/models"
},
"codex": {
"baseUrl": "https://api.longcat.chat/openai/v1",
- "modelsUrl": "https://api.longcat.chat/openai/v1/models",
- "models": [
- {
- "id": "LongCat-2.0",
- "name": "LongCat 2.0",
- "contextWindow": 1000000
- }
- ]
+ "modelsUrl": "https://api.longcat.chat/openai/v1/models"
},
"pi": {
"baseUrl": "https://api.longcat.chat/openai/v1",
"wireProtocol": "openai-chat",
- "modelsUrl": "https://api.longcat.chat/openai/v1/models",
- "models": [
- {
- "id": "LongCat-2.0",
- "name": "LongCat 2.0",
- "contextWindow": 1000000
- }
- ]
+ "modelsUrl": "https://api.longcat.chat/openai/v1/models"
}
}
},
@@ -1901,29 +1500,56 @@
"nameZhTW": "智譜 GLM Coding Plan(中國大陸)",
"docsUrl": "https://docs.bigmodel.cn/cn/coding-plan/quick-start",
"regionHint": "cn",
- "runtimes": {
- "claude-code": {
- "baseUrl": "https://open.bigmodel.cn/api/anthropic",
- "models": [
- {
- "id": "glm-5.3[1m]",
- "name": "GLM-5.3 (1M)",
- "contextWindow": 1000000
- },
- {
- "id": "glm-5.2[1m]",
- "name": "GLM-5.2 (1M)",
- "contextWindow": 1000000
- },
- {
- "id": "glm-5.2",
- "name": "GLM-5.2"
+ "models": [
+ {
+ "id": "glm-5.3[1m]",
+ "name": "GLM-5.3 (1M)",
+ "contextWindow": 1000000,
+ "supportsImageInput": false,
+ "engines": ["claude-code"]
+ },
+ {
+ "id": "glm-5.3-flash[1m]",
+ "name": "GLM-5.3-Flash (1M)",
+ "contextWindow": 1000000,
+ "supportsImageInput": true,
+ "engines": ["claude-code"]
+ },
+ {
+ "id": "glm-5.3",
+ "name": "GLM-5.3",
+ "contextWindow": 1000000,
+ "supportsImageInput": false,
+ "engines": ["codex", "pi"],
+ "engineOverrides": {
+ "pi": {
+ "reasoning": true,
+ "reasoningEfforts": ["low", "high", "max"],
+ "reasoningDefaultEffort": "high"
+ }
+ }
+ },
+ {
+ "id": "glm-5.3-flash",
+ "name": "GLM-5.3-Flash",
+ "contextWindow": 1000000,
+ "supportsImageInput": true,
+ "engines": ["codex", "pi"],
+ "engineOverrides": {
+ "pi": {
+ "reasoning": true,
+ "reasoningEfforts": ["low", "high", "max"],
+ "reasoningDefaultEffort": "high"
},
- {
- "id": "glm-5.1",
- "name": "GLM-5.1"
+ "codex": {
+ "supportsImageInput": false
}
- ]
+ }
+ }
+ ],
+ "runtimes": {
+ "claude-code": {
+ "baseUrl": "https://open.bigmodel.cn/api/anthropic"
},
"codex": {
"baseUrl": "https://open.bigmodel.cn/api/coding/paas/v4",
@@ -1934,92 +1560,12 @@
"modelsUrl": "https://open.bigmodel.cn/api/v1/models",
"wireProtocol": "openai-responses"
}
- ],
- "models": [
- {
- "id": "glm-5.2",
- "name": "GLM-5.2"
- },
- {
- "id": "glm-5.1",
- "name": "GLM-5.1"
- }
]
},
"pi": {
"baseUrl": "https://open.bigmodel.cn/api/coding/paas/v4",
"wireProtocol": "openai-chat",
- "piCatalogProviderId": "zai-coding-cn",
- "models": [
- {
- "id": "glm-4.6v",
- "name": "GLM-4.6V",
- "contextWindow": 128000,
- "supportsImageInput": true
- },
- {
- "id": "glm-4.7",
- "name": "GLM-4.7",
- "contextWindow": 204800
- },
- {
- "id": "glm-5-turbo",
- "name": "GLM-5-Turbo",
- "contextWindow": 200000
- },
- {
- "id": "glm-5.1",
- "name": "GLM-5.1",
- "contextWindow": 200000
- },
- {
- "id": "glm-5.2",
- "name": "GLM-5.2",
- "contextWindow": 1000000,
- "reasoning": true,
- "reasoningEfforts": ["high", "max"],
- "reasoningDefaultEffort": "high"
- },
- {
- "id": "glm-5.2-highspeed",
- "name": "GLM-5.2 Highspeed",
- "contextWindow": 1000000,
- "reasoning": true,
- "reasoningEfforts": ["high", "max"],
- "reasoningDefaultEffort": "high"
- },
- {
- "id": "glm-5.3",
- "name": "GLM-5.3",
- "contextWindow": 1000000,
- "reasoning": true,
- "reasoningEfforts": ["low", "high", "max"],
- "reasoningDefaultEffort": "high"
- },
- {
- "id": "glm-5.3-flash",
- "name": "GLM-5.3-Flash",
- "contextWindow": 1000000,
- "supportsImageInput": true,
- "reasoning": true,
- "reasoningEfforts": ["low", "high", "max"],
- "reasoningDefaultEffort": "high"
- },
- {
- "id": "glm-5.3-highspeed",
- "name": "GLM-5.3 Highspeed",
- "contextWindow": 1000000,
- "reasoning": true,
- "reasoningEfforts": ["low", "high", "max"],
- "reasoningDefaultEffort": "high"
- },
- {
- "id": "glm-5v-turbo",
- "name": "GLM-5V-Turbo",
- "contextWindow": 200000,
- "supportsImageInput": true
- }
- ]
+ "piCatalogProviderId": "zai-coding-cn"
}
}
},
@@ -2028,101 +1574,65 @@
"name": "Z.ai GLM Coding Plan (Global)",
"docsUrl": "https://docs.z.ai/devpack/overview",
"regionHint": "global",
- "runtimes": {
- "claude-code": {
- "baseUrl": "https://api.z.ai/api/anthropic",
- "models": [
- {
- "id": "glm-5.3[1m]",
- "name": "GLM-5.3 (1M)",
- "contextWindow": 1000000
- },
- {
- "id": "glm-5.2[1m]",
- "name": "GLM-5.2 (1M)",
- "contextWindow": 1000000
- },
- {
- "id": "glm-5.2",
- "name": "GLM-5.2"
- },
- {
- "id": "glm-5.1",
- "name": "GLM-5.1"
- }
- ]
+ "models": [
+ {
+ "id": "glm-5.3[1m]",
+ "name": "GLM-5.3 (1M)",
+ "contextWindow": 1000000,
+ "supportsImageInput": false,
+ "engines": ["claude-code"]
},
- "codex": {
- "baseUrl": "https://api.z.ai/api/coding/paas/v4",
- "wireProtocol": "openai-chat",
- "models": [
- {
- "id": "glm-5.2",
- "name": "GLM-5.2"
- },
- {
- "id": "glm-5.1",
- "name": "GLM-5.1"
- }
- ]
+ {
+ "id": "glm-5.3-flash[1m]",
+ "name": "GLM-5.3-Flash (1M)",
+ "contextWindow": 1000000,
+ "supportsImageInput": true,
+ "engines": ["claude-code"]
},
- "pi": {
- "baseUrl": "https://api.z.ai/api/coding/paas/v4",
- "wireProtocol": "openai-chat",
- "piCatalogProviderId": "zai",
- "models": [
- {
- "id": "glm-4.7",
- "name": "GLM-4.7",
- "contextWindow": 204800
- },
- {
- "id": "glm-5-turbo",
- "name": "GLM-5-Turbo",
- "contextWindow": 200000
- },
- {
- "id": "glm-5.2",
- "name": "GLM-5.2",
- "contextWindow": 1000000,
- "reasoning": true,
- "reasoningEfforts": ["high", "max"],
- "reasoningDefaultEffort": "high"
- },
- {
- "id": "glm-5.2-highspeed",
- "name": "GLM-5.2 Highspeed",
- "contextWindow": 1000000,
- "reasoning": true,
- "reasoningEfforts": ["high", "max"],
- "reasoningDefaultEffort": "high"
- },
- {
- "id": "glm-5.3",
- "name": "GLM-5.3",
- "contextWindow": 1000000,
+ {
+ "id": "glm-5.3",
+ "name": "GLM-5.3",
+ "contextWindow": 1000000,
+ "supportsImageInput": false,
+ "engines": ["codex", "pi"],
+ "engineOverrides": {
+ "pi": {
"reasoning": true,
"reasoningEfforts": ["low", "high", "max"],
"reasoningDefaultEffort": "high"
- },
- {
- "id": "glm-5.3-flash",
- "name": "GLM-5.3-Flash",
- "contextWindow": 1000000,
- "supportsImageInput": true,
+ }
+ }
+ },
+ {
+ "id": "glm-5.3-flash",
+ "name": "GLM-5.3-Flash",
+ "contextWindow": 1000000,
+ "supportsImageInput": true,
+ "engines": ["codex", "pi"],
+ "engineOverrides": {
+ "pi": {
"reasoning": true,
"reasoningEfforts": ["low", "high", "max"],
"reasoningDefaultEffort": "high"
},
- {
- "id": "glm-5.3-highspeed",
- "name": "GLM-5.3 Highspeed",
- "contextWindow": 1000000,
- "reasoning": true,
- "reasoningEfforts": ["low", "high", "max"],
- "reasoningDefaultEffort": "high"
+ "codex": {
+ "supportsImageInput": false
}
- ]
+ }
+ }
+ ],
+ "runtimes": {
+ "claude-code": {
+ "baseUrl": "https://api.z.ai/api/anthropic"
+ },
+ "codex": {
+ "baseUrl": "https://api.z.ai/api/coding/paas/v4",
+ "wireProtocol": "openai-chat"
+ },
+ "pi": {
+ "baseUrl": "https://api.z.ai/api/coding/paas/v4",
+ "wireProtocol": "openai-chat",
+ "piCatalogProviderId": "zai"
}
}
},
@@ -2132,61 +1642,53 @@
"nameEn": "Xiaomi MiMo API (pay as you go)",
"docsUrl": "https://mimo.mi.com/docs/zh-CN/quick-start/summary/first-api-call",
"regionHint": "cn",
- "runtimes": {
- "claude-code": {
- "baseUrl": "https://api.xiaomimimo.com/anthropic",
- "models": [
- {
- "id": "mimo-v2.6-pro",
- "name": "MiMo V2.6 Pro",
- "contextWindow": 1000000
- },
- {
- "id": "mimo-v2.6-flash",
- "name": "MiMo V2.6 Flash",
- "contextWindow": 1000000
+ "models": [
+ {
+ "id": "mimo-v2.6-pro",
+ "name": "MiMo-V2.6-Pro",
+ "contextWindow": 1048576,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "codex": {
+ "supportsImageInput": false
}
- ]
+ }
},
- "codex": {
- "baseUrl": "https://api.xiaomimimo.com/v1",
- "wireProtocol": "openai-chat",
- "models": [
- {
- "id": "mimo-v2.6-pro",
- "name": "MiMo V2.6 Pro",
- "contextWindow": 1000000
- },
- {
- "id": "mimo-v2.6-flash",
- "name": "MiMo V2.6 Flash",
- "contextWindow": 1000000
+ {
+ "id": "mimo-v2.6-flash",
+ "name": "MiMo-V2.6-Flash",
+ "contextWindow": 1048576,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "codex": {
+ "supportsImageInput": false
}
- ]
+ }
+ },
+ {
+ "id": "mimo-v2.6-pro-ultraspeed",
+ "name": "MiMo-V2.6-Pro-UltraSpeed",
+ "contextWindow": 1048576,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "codex": {
+ "supportsImageInput": false
+ }
+ }
+ }
+ ],
+ "runtimes": {
+ "claude-code": {
+ "baseUrl": "https://api.xiaomimimo.com/anthropic"
+ },
+ "codex": {
+ "baseUrl": "https://api.xiaomimimo.com/v1",
+ "wireProtocol": "openai-chat"
},
"pi": {
"baseUrl": "https://api.xiaomimimo.com/v1",
"wireProtocol": "openai-chat",
- "piCatalogProviderId": "xiaomi",
- "models": [
- {
- "id": "mimo-v2.6-pro",
- "name": "MiMo-V2.6-Pro",
- "contextWindow": 1048576,
- "supportsImageInput": true
- },
- {
- "id": "mimo-v2.6-flash",
- "name": "MiMo-V2.6-Flash",
- "contextWindow": 1048576,
- "supportsImageInput": true
- },
- {
- "id": "mimo-v2.6-pro-ultraspeed",
- "name": "MiMo-V2.6-Pro-UltraSpeed",
- "contextWindow": 1048576
- }
- ]
+ "piCatalogProviderId": "xiaomi"
}
}
},
@@ -2196,56 +1698,42 @@
"nameEn": "Xiaomi MiMo Token Plan",
"docsUrl": "https://mimo.mi.com/docs/zh-CN/quick-start/summary/first-api-call",
"regionHint": "cn",
+ "models": [
+ {
+ "id": "mimo-v2.6-pro",
+ "name": "MiMo-V2.6-Pro",
+ "contextWindow": 1048576,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "codex": {
+ "supportsImageInput": false
+ }
+ }
+ },
+ {
+ "id": "mimo-v2.6-flash",
+ "name": "MiMo-V2.6-Flash",
+ "contextWindow": 1048576,
+ "supportsImageInput": true,
+ "engineOverrides": {
+ "codex": {
+ "supportsImageInput": false
+ }
+ }
+ }
+ ],
"runtimes": {
"claude-code": {
- "baseUrl": "https://token-plan-cn.xiaomimimo.com/anthropic",
- "models": [
- {
- "id": "mimo-v2.6-pro",
- "name": "MiMo V2.6 Pro",
- "contextWindow": 1000000
- },
- {
- "id": "mimo-v2.6-flash",
- "name": "MiMo V2.6 Flash",
- "contextWindow": 1000000
- }
- ]
+ "baseUrl": "https://token-plan-cn.xiaomimimo.com/anthropic"
},
"codex": {
"baseUrl": "https://token-plan-cn.xiaomimimo.com/v1",
- "wireProtocol": "openai-chat",
- "models": [
- {
- "id": "mimo-v2.6-pro",
- "name": "MiMo V2.6 Pro",
- "contextWindow": 1000000
- },
- {
- "id": "mimo-v2.6-flash",
- "name": "MiMo V2.6 Flash",
- "contextWindow": 1000000
- }
- ]
+ "wireProtocol": "openai-chat"
},
"pi": {
"baseUrl": "https://token-plan-cn.xiaomimimo.com/v1",
"wireProtocol": "openai-chat",
- "piCatalogProviderId": "xiaomi-token-plan-cn",
- "models": [
- {
- "id": "mimo-v2.6-pro",
- "name": "MiMo-V2.6-Pro",
- "contextWindow": 1048576,
- "supportsImageInput": true
- },
- {
- "id": "mimo-v2.6-flash",
- "name": "MiMo-V2.6-Flash",
- "contextWindow": 1048576,
- "supportsImageInput": true
- }
- ]
+ "piCatalogProviderId": "xiaomi-token-plan-cn"
}
}
},
@@ -2255,35 +1743,23 @@
"nameEn": "Volcengine Ark Agent Plan",
"docsUrl": "https://docs.volcengine.com/docs/82379/2373738",
"regionHint": "cn",
+ "models": [
+ {
+ "id": "ark-code-latest",
+ "name": "Ark Code Latest"
+ }
+ ],
"runtimes": {
"claude-code": {
- "baseUrl": "https://ark.cn-beijing.volces.com/api/plan",
- "models": [
- {
- "id": "ark-code-latest",
- "name": "Ark Code Latest"
- }
- ]
+ "baseUrl": "https://ark.cn-beijing.volces.com/api/plan"
},
"codex": {
"baseUrl": "https://ark.cn-beijing.volces.com/api/plan/v3",
- "wireProtocol": "openai-chat",
- "models": [
- {
- "id": "ark-code-latest",
- "name": "Ark Code Latest"
- }
- ]
+ "wireProtocol": "openai-chat"
},
"pi": {
"baseUrl": "https://ark.cn-beijing.volces.com/api/plan/v3",
- "wireProtocol": "openai-chat",
- "models": [
- {
- "id": "ark-code-latest",
- "name": "Ark Code Latest"
- }
- ]
+ "wireProtocol": "openai-chat"
}
}
},
@@ -2293,35 +1769,23 @@
"nameEn": "Volcengine Ark Coding Plan",
"docsUrl": "https://www.volcengine.com/docs/82379/1925114",
"regionHint": "cn",
+ "models": [
+ {
+ "id": "ark-code-latest",
+ "name": "Ark Code Latest"
+ }
+ ],
"runtimes": {
"claude-code": {
- "baseUrl": "https://ark.cn-beijing.volces.com/api/coding",
- "models": [
- {
- "id": "ark-code-latest",
- "name": "Ark Code Latest"
- }
- ]
+ "baseUrl": "https://ark.cn-beijing.volces.com/api/coding"
},
"codex": {
"baseUrl": "https://ark.cn-beijing.volces.com/api/coding/v3",
- "wireProtocol": "openai-chat",
- "models": [
- {
- "id": "ark-code-latest",
- "name": "Ark Code Latest"
- }
- ]
+ "wireProtocol": "openai-chat"
},
"pi": {
"baseUrl": "https://ark.cn-beijing.volces.com/api/coding/v3",
- "wireProtocol": "openai-chat",
- "models": [
- {
- "id": "ark-code-latest",
- "name": "Ark Code Latest"
- }
- ]
+ "wireProtocol": "openai-chat"
}
}
},
@@ -2332,47 +1796,27 @@
"nameZhTW": "騰訊雲 Coding Plan",
"docsUrl": "https://cloud.tencent.com/document/product/1823/130092",
"regionHint": "cn",
+ "models": [
+ {
+ "id": "tc-code-latest",
+ "name": "Tencent Code Latest"
+ },
+ {
+ "id": "glm-5",
+ "name": "GLM-5"
+ }
+ ],
"runtimes": {
"claude-code": {
- "baseUrl": "https://api.lkeap.cloud.tencent.com/coding/anthropic",
- "models": [
- {
- "id": "tc-code-latest",
- "name": "Tencent Code Latest"
- },
- {
- "id": "glm-5",
- "name": "GLM-5"
- }
- ]
+ "baseUrl": "https://api.lkeap.cloud.tencent.com/coding/anthropic"
},
"codex": {
"baseUrl": "https://api.lkeap.cloud.tencent.com/coding/v3",
- "wireProtocol": "openai-chat",
- "models": [
- {
- "id": "tc-code-latest",
- "name": "Tencent Code Latest"
- },
- {
- "id": "glm-5",
- "name": "GLM-5"
- }
- ]
+ "wireProtocol": "openai-chat"
},
"pi": {
"baseUrl": "https://api.lkeap.cloud.tencent.com/coding/v3",
- "wireProtocol": "openai-chat",
- "models": [
- {
- "id": "tc-code-latest",
- "name": "Tencent Code Latest"
- },
- {
- "id": "glm-5",
- "name": "GLM-5"
- }
- ]
+ "wireProtocol": "openai-chat"
}
}
},
@@ -2381,193 +1825,180 @@
"name": "OpenCode Go",
"docsUrl": "https://opencode.ai/docs/go/",
"regionHint": "global",
- "runtimes": {
- "claude-code": {
- "baseUrl": "https://opencode.ai/zen/go",
- "modelsUrl": "https://opencode.ai/zen/go/v1/models",
- "models": [
- {
- "id": "minimax-m3",
- "name": "MiniMax M3"
- },
- {
- "id": "minimax-m2.7",
- "name": "MiniMax M2.7"
- },
- {
- "id": "minimax-m2.5",
- "name": "MiniMax M2.5"
- },
- {
- "id": "qwen3.7-max",
- "name": "Qwen3.7 Max"
- },
- {
- "id": "qwen3.7-plus",
- "name": "Qwen3.7 Plus"
- },
- {
- "id": "qwen3.6-plus",
- "name": "Qwen3.6 Plus"
- }
- ]
- },
- "codex": {
- "baseUrl": "https://opencode.ai/zen/go/v1",
- "wireProtocol": "openai-chat",
- "modelsUrl": "https://opencode.ai/zen/go/v1/models",
- "models": [
- {
- "id": "grok-4.5",
- "name": "Grok 4.5"
- },
- {
- "id": "glm-5.2",
- "name": "GLM-5.2"
- },
- {
- "id": "glm-5.1",
- "name": "GLM-5.1"
- },
- {
- "id": "kimi-k3",
- "name": "Kimi K3"
- },
- {
- "id": "kimi-k2.7-code",
- "name": "Kimi K2.7 Code"
- },
- {
- "id": "kimi-k2.6",
- "name": "Kimi K2.6"
- },
- {
- "id": "mimo-v2.5",
- "name": "MiMo V2.5"
- },
- {
- "id": "mimo-v2.5-pro",
- "name": "MiMo V2.5 Pro"
- },
- {
- "id": "deepseek-v4-pro",
- "name": "DeepSeek V4 Pro"
- },
- {
- "id": "deepseek-v4-flash",
- "name": "DeepSeek V4 Flash"
- },
- {
- "id": "hy3",
- "name": "Hy3"
- }
- ]
- },
- "pi": {
- "baseUrl": "https://opencode.ai/zen/go/v1",
- "wireProtocol": "openai-chat",
- "modelsUrl": "https://opencode.ai/zen/go/v1/models",
- "models": [
- {
- "id": "minimax-m3",
- "name": "MiniMax M3",
+ "models": [
+ {
+ "id": "minimax-m3",
+ "name": "MiniMax M3",
+ "engines": ["claude-code", "pi"],
+ "engineOverrides": {
+ "pi": {
"piApi": "anthropic-messages",
"route": {
"baseUrl": "https://opencode.ai/zen/go",
"wireProtocol": "anthropic-messages"
}
- },
- {
- "id": "minimax-m2.7",
- "name": "MiniMax M2.7",
+ }
+ }
+ },
+ {
+ "id": "minimax-m2.7",
+ "name": "MiniMax M2.7",
+ "engines": ["claude-code", "pi"],
+ "engineOverrides": {
+ "pi": {
"piApi": "anthropic-messages",
"route": {
"baseUrl": "https://opencode.ai/zen/go",
"wireProtocol": "anthropic-messages"
}
- },
- {
- "id": "minimax-m2.5",
- "name": "MiniMax M2.5",
+ }
+ }
+ },
+ {
+ "id": "minimax-m2.5",
+ "name": "MiniMax M2.5",
+ "engines": ["claude-code", "pi"],
+ "engineOverrides": {
+ "pi": {
"piApi": "anthropic-messages",
"route": {
"baseUrl": "https://opencode.ai/zen/go",
"wireProtocol": "anthropic-messages"
}
- },
- {
- "id": "qwen3.7-max",
- "name": "Qwen3.7 Max",
+ }
+ }
+ },
+ {
+ "id": "qwen3.7-max",
+ "name": "Qwen3.7 Max",
+ "engines": ["claude-code", "pi"],
+ "engineOverrides": {
+ "pi": {
"piApi": "anthropic-messages",
"route": {
"baseUrl": "https://opencode.ai/zen/go",
"wireProtocol": "anthropic-messages"
}
- },
- {
- "id": "qwen3.7-plus",
- "name": "Qwen3.7 Plus",
+ }
+ }
+ },
+ {
+ "id": "qwen3.7-plus",
+ "name": "Qwen3.7 Plus",
+ "engines": ["claude-code", "pi"],
+ "engineOverrides": {
+ "pi": {
"piApi": "anthropic-messages",
"route": {
"baseUrl": "https://opencode.ai/zen/go",
"wireProtocol": "anthropic-messages"
}
- },
- {
- "id": "qwen3.6-plus",
- "name": "Qwen3.6 Plus",
+ }
+ }
+ },
+ {
+ "id": "qwen3.6-plus",
+ "name": "Qwen3.6 Plus",
+ "engines": ["claude-code", "pi"],
+ "engineOverrides": {
+ "pi": {
"piApi": "anthropic-messages",
"route": {
"baseUrl": "https://opencode.ai/zen/go",
"wireProtocol": "anthropic-messages"
}
- },
- {
- "id": "grok-4.5",
- "name": "Grok 4.5",
+ }
+ }
+ },
+ {
+ "id": "grok-4.5",
+ "name": "Grok 4.5",
+ "engines": ["codex", "pi"],
+ "engineOverrides": {
+ "pi": {
"piApi": "openai-responses"
- },
- {
- "id": "glm-5.2",
- "name": "GLM-5.2"
- },
- {
- "id": "glm-5.1",
- "name": "GLM-5.1"
- },
- {
- "id": "kimi-k3",
- "name": "Kimi K3"
- },
- {
- "id": "kimi-k2.7-code",
- "name": "Kimi K2.7 Code"
- },
- {
- "id": "kimi-k2.6",
- "name": "Kimi K2.6"
- },
- {
- "id": "mimo-v2.5",
- "name": "MiMo V2.5"
- },
- {
- "id": "mimo-v2.5-pro",
- "name": "MiMo V2.5 Pro"
- },
- {
- "id": "deepseek-v4-pro",
- "name": "DeepSeek V4 Pro"
- },
- {
- "id": "deepseek-v4-flash",
- "name": "DeepSeek V4 Flash"
- },
- {
- "id": "hy3",
- "name": "Hy3"
}
- ]
+ }
+ },
+ {
+ "id": "glm-5.2",
+ "name": "GLM-5.2",
+ "engines": ["codex", "pi"]
+ },
+ {
+ "id": "glm-5.1",
+ "name": "GLM-5.1",
+ "engines": ["codex", "pi"]
+ },
+ {
+ "id": "kimi-k3",
+ "name": "Kimi K3",
+ "engines": ["codex", "pi"]
+ },
+ {
+ "id": "kimi-k2.7-code",
+ "name": "Kimi K2.7 Code",
+ "engines": ["codex", "pi"]
+ },
+ {
+ "id": "kimi-k2.6",
+ "name": "Kimi K2.6",
+ "engines": ["codex", "pi"]
+ },
+ {
+ "id": "mimo-v2.6-pro",
+ "name": "MiMo-V2.6-Pro",
+ "contextWindow": 1048576,
+ "supportsImageInput": true,
+ "engines": ["codex", "pi"],
+ "engineOverrides": {
+ "codex": {
+ "supportsImageInput": false
+ }
+ }
+ },
+ {
+ "id": "mimo-v2.6-flash",
+ "name": "MiMo-V2.6-Flash",
+ "contextWindow": 1048576,
+ "supportsImageInput": true,
+ "engines": ["codex", "pi"],
+ "engineOverrides": {
+ "codex": {
+ "supportsImageInput": false
+ }
+ }
+ },
+ {
+ "id": "deepseek-v4-pro",
+ "name": "DeepSeek V4 Pro",
+ "engines": ["codex", "pi"]
+ },
+ {
+ "id": "deepseek-v4-flash",
+ "name": "DeepSeek V4 Flash",
+ "engines": ["codex", "pi"]
+ },
+ {
+ "id": "hy3",
+ "name": "Hy3",
+ "engines": ["codex", "pi"]
+ }
+ ],
+ "runtimes": {
+ "claude-code": {
+ "baseUrl": "https://opencode.ai/zen/go",
+ "modelsUrl": "https://opencode.ai/zen/go/v1/models"
+ },
+ "codex": {
+ "baseUrl": "https://opencode.ai/zen/go/v1",
+ "wireProtocol": "openai-chat",
+ "modelsUrl": "https://opencode.ai/zen/go/v1/models"
+ },
+ "pi": {
+ "baseUrl": "https://opencode.ai/zen/go/v1",
+ "wireProtocol": "openai-chat",
+ "modelsUrl": "https://opencode.ai/zen/go/v1/models"
}
}
},
@@ -2576,61 +2007,33 @@
"name": "Vercel AI Gateway",
"docsUrl": "https://vercel.com/docs/ai-gateway/coding-agents",
"regionHint": "global",
+ "models": [
+ {
+ "id": "anthropic/claude-sonnet-4.6",
+ "name": "Claude Sonnet 4.6 (Vercel)"
+ },
+ {
+ "id": "openai/gpt-5.4",
+ "name": "GPT-5.4 (Vercel)"
+ },
+ {
+ "id": "xai/grok-4.5",
+ "name": "Grok 4.5 (Vercel)"
+ }
+ ],
"runtimes": {
"claude-code": {
"baseUrl": "https://ai-gateway.vercel.sh",
- "modelsUrl": "https://ai-gateway.vercel.sh/v1/models",
- "models": [
- {
- "id": "anthropic/claude-sonnet-4.6",
- "name": "Claude Sonnet 4.6 (Vercel)"
- },
- {
- "id": "openai/gpt-5.4",
- "name": "GPT-5.4 (Vercel)"
- },
- {
- "id": "xai/grok-4.5",
- "name": "Grok 4.5 (Vercel)"
- }
- ]
+ "modelsUrl": "https://ai-gateway.vercel.sh/v1/models"
},
"codex": {
"baseUrl": "https://ai-gateway.vercel.sh/v1",
- "modelsUrl": "https://ai-gateway.vercel.sh/v1/models",
- "models": [
- {
- "id": "anthropic/claude-sonnet-4.6",
- "name": "Claude Sonnet 4.6 (Vercel)"
- },
- {
- "id": "openai/gpt-5.4",
- "name": "GPT-5.4 (Vercel)"
- },
- {
- "id": "xai/grok-4.5",
- "name": "Grok 4.5 (Vercel)"
- }
- ]
+ "modelsUrl": "https://ai-gateway.vercel.sh/v1/models"
},
"pi": {
"baseUrl": "https://ai-gateway.vercel.sh/v1",
"wireProtocol": "openai-chat",
- "modelsUrl": "https://ai-gateway.vercel.sh/v1/models",
- "models": [
- {
- "id": "anthropic/claude-sonnet-4.6",
- "name": "Claude Sonnet 4.6 (Vercel)"
- },
- {
- "id": "openai/gpt-5.4",
- "name": "GPT-5.4 (Vercel)"
- },
- {
- "id": "xai/grok-4.5",
- "name": "Grok 4.5 (Vercel)"
- }
- ]
+ "modelsUrl": "https://ai-gateway.vercel.sh/v1/models"
}
}
}
diff --git a/packages/model-providers/src/__tests__/catalog.test.ts b/packages/model-providers/src/__tests__/catalog.test.ts
index 2f6f82dc16..8c7699e023 100644
--- a/packages/model-providers/src/__tests__/catalog.test.ts
+++ b/packages/model-providers/src/__tests__/catalog.test.ts
@@ -388,35 +388,35 @@ describe("bundled catalog validity (dynamic-first contract)", () => {
});
it("DeepSeek 预设携带厂商文档确认的 1M contextWindow (#735)", () => {
- // 官方 V4 起全线 1M(api-docs.deepseek.com news260424);预设不带时
- // buildUserProvider 回落 200K 保守默认,长上下文模型被错误降级。
+ // 官方 Codex 目录的 context_window 为 1,048,576;预设不带时 buildUserProvider
+ // 回落 200K 保守默认,长上下文模型被错误降级。deepseek-v4-flash 已是临时别名,
+ // 推荐改用官方的 deepseek-flash(V4.1-Flash)。
const presets = BUNDLED_CATALOG.presets ?? [];
const deepseek = presets.find((p) => p.id === "deepseek");
expect(deepseek).toBeDefined();
for (const [agent, rt] of Object.entries(deepseek!.runtimes)) {
- for (const id of ["deepseek-v4-flash", "deepseek-v4-pro"]) {
+ for (const id of ["deepseek-flash", "deepseek-v4-pro"]) {
const m = rt!.models.find((x) => x.id === id);
- expect(m?.contextWindow, `${agent}/${id}`).toBe(1_000_000);
+ expect(m?.contextWindow, `${agent}/${id}`).toBe(1_048_576);
}
}
- // OpenRouter 托管的同款模型页面同样标注 1,048,576,取与仓库口径一致的 1M。
+ // OpenRouter 模型接口标注 1,048,576。
const openrouter = presets.find((p) => p.id === "openrouter");
expect(
openrouter?.runtimes["claude-code"]?.models.find(
(m) => m.id === "deepseek/deepseek-v4-pro",
)?.contextWindow,
- ).toBe(1_000_000);
- expect(deepseek?.runtimes.pi).toMatchObject({
- wireProtocol: "openai-chat",
- models: [
- { id: "deepseek-v4-flash" },
- { id: "deepseek-v4-flash-vision-exp" },
- { id: "deepseek-v4-pro" },
- ],
- });
+ ).toBe(1_048_576);
+ // 推荐清单三个引擎共用;vision-exp 只由 Pi 模型资料补入且默认隐藏。
+ expect(deepseek?.runtimes.pi?.wireProtocol).toBe("openai-chat");
+ expect(
+ deepseek?.runtimes.pi?.models
+ .filter((m) => m.defaultEnabled !== false)
+ .map((m) => m.id),
+ ).toEqual(["deepseek-flash", "deepseek-v4-pro"]);
});
- it("Kimi Code(编程计划)按各 harness 的权威目录保留 contextWindow", () => {
+ it("Kimi Code(编程计划)各 harness 共用官方核实的 contextWindow", () => {
const presets = BUNDLED_CATALOG.presets ?? [];
const kimiCode = presets.find((p) => p.id === "moonshot-kimi-code");
expect(kimiCode).toBeDefined();
@@ -431,7 +431,8 @@ describe("bundled catalog validity (dynamic-first contract)", () => {
expect(
rt!.models.find((m) => m.id === "k3")?.contextWindow,
`${agent}/k3`,
- ).toBe(agent === "pi" ? 1_048_576 : 262_144);
+ // 官方:K3 的 1,048,576 只对高档位开放,取所有档位都成立的 262,144。
+ ).toBe(262_144);
}
});
diff --git a/packages/model-providers/src/__tests__/modelDiscoveryChannels.test.ts b/packages/model-providers/src/__tests__/modelDiscoveryChannels.test.ts
index a7f309bb88..076a1313a0 100644
--- a/packages/model-providers/src/__tests__/modelDiscoveryChannels.test.ts
+++ b/packages/model-providers/src/__tests__/modelDiscoveryChannels.test.ts
@@ -299,3 +299,19 @@ describe('Sub2API manifest capabilities', () => {
expect(models.every(m => m.discoveredMetadata?.contextWindowMax === undefined)).toBe(true);
});
});
+
+describe('mergeDiscoveredRuntimeModels 排序', () => {
+ it('新发现的型号排在已有型号之前,已有型号位置不动', () => {
+ const existing = [
+ { id: 'old-b', name: 'Old B' },
+ { id: 'old-a', name: 'Old A' },
+ ];
+ const merged = mergeDiscoveredRuntimeModels(existing, [
+ { id: 'old-a', name: 'Old A' },
+ { id: 'new-1', name: 'New 1' },
+ { id: 'old-b', name: 'Old B' },
+ { id: 'new-2', name: 'New 2' },
+ ]);
+ expect(merged.map((model) => model.id)).toEqual(['new-1', 'new-2', 'old-b', 'old-a']);
+ });
+});
diff --git a/packages/model-providers/src/__tests__/presetModels.test.ts b/packages/model-providers/src/__tests__/presetModels.test.ts
new file mode 100644
index 0000000000..ec8fa90008
--- /dev/null
+++ b/packages/model-providers/src/__tests__/presetModels.test.ts
@@ -0,0 +1,133 @@
+import { readFileSync } from "node:fs";
+import { describe, expect, it } from "vitest";
+
+import { BUNDLED_CATALOG, sanitizePresets } from "../catalog.js";
+import { expandPresetModels } from "../presetModels.js";
+
+const rawPresets = (
+ JSON.parse(
+ readFileSync(
+ new URL("../../catalog/providers.json", import.meta.url),
+ "utf8",
+ ),
+ ) as { presets: Record<string, unknown>[] }
+).presets;
+
+describe("预设推荐模型单一清单", () => {
+ it("随包预设只在顶层写一份清单,不再按引擎各写一份", () => {
+ const perEngine = rawPresets.filter((preset) =>
+ Object.values(
+ preset.runtimes as Record<string, Record<string, unknown>>,
+ ).some((runtime) => "models" in runtime),
+ );
+ expect(perEngine.map((preset) => preset.id)).toEqual([]);
+ expect(rawPresets.every((preset) => Array.isArray(preset.models))).toBe(
+ true,
+ );
+ });
+
+ it("按 engines 过滤、按 engineOverrides 覆盖,并保持推荐顺序", () => {
+ const expanded = expandPresetModels({
+ id: "demo",
+ name: "Demo",
+ models: [
+ { id: "a", name: "A", contextWindow: 1000 },
+ { id: "b", name: "B", engines: ["claude-code"] },
+ {
+ id: "c",
+ name: "C",
+ engineOverrides: {
+ pi: { reasoning: true, reasoningEfforts: ["high"] },
+ },
+ },
+ ],
+ runtimes: {
+ "claude-code": { baseUrl: "https://example.com/anthropic" },
+ pi: { baseUrl: "https://example.com/v1", wireProtocol: "openai-chat" },
+ },
+ });
+ expect(expanded).not.toHaveProperty("models");
+ expect(expanded.runtimes["claude-code"]).toEqual({
+ baseUrl: "https://example.com/anthropic",
+ models: [
+ { id: "a", name: "A", contextWindow: 1000 },
+ { id: "b", name: "B" },
+ { id: "c", name: "C" },
+ ],
+ });
+ expect(
+ (expanded.runtimes.pi as unknown as { models: unknown[] }).models,
+ ).toEqual([
+ { id: "a", name: "A", contextWindow: 1000 },
+ { id: "c", name: "C", reasoning: true, reasoningEfforts: ["high"] },
+ ]);
+ });
+
+ it("旧的按引擎格式(服务端下发)原样可用", () => {
+ const legacy = {
+ id: "legacy",
+ name: "Legacy",
+ runtimes: {
+ codex: {
+ baseUrl: "https://example.com/v1",
+ models: [{ id: "x", name: "X" }],
+ },
+ },
+ };
+ expect(expandPresetModels(legacy)).toBe(legacy);
+ expect(sanitizePresets([legacy])).toHaveLength(1);
+ });
+
+ it("engines / engineOverrides 畸形时整条预设被拒绝,不展开到全部引擎", () => {
+ const base = {
+ id: "bad",
+ name: "Bad",
+ runtimes: {
+ "claude-code": { baseUrl: "https://example.com/anthropic" },
+ codex: { baseUrl: "https://example.com/v1" },
+ },
+ };
+ for (const malformed of [
+ { engines: "codex" },
+ { engines: [1] },
+ { engines: [] },
+ { engines: ["codxe"] },
+ { engines: ["pi"] },
+ { engineOverrides: [] },
+ { engineOverrides: { pi: "x" } },
+ { engineOverrides: { codxe: { supportsImageInput: false } } },
+ { engines: ["codex", "pi"] },
+ { engineOverrides: { pi: { supportsImageInput: false } } },
+ ]) {
+ const preset = {
+ ...base,
+ models: [{ id: "m", name: "M", ...malformed }],
+ };
+ expect(expandPresetModels(preset)).toBe(preset);
+ expect(sanitizePresets([preset])).toEqual([]);
+ }
+ });
+
+ it("混合格式下引擎字段畸形时,即使 runtimes 自带清单也整条拒绝", () => {
+ const preset = {
+ id: "mixed",
+ name: "Mixed",
+ runtimes: {
+ codex: {
+ baseUrl: "https://example.com/v1",
+ models: [{ id: "legacy", name: "Legacy" }],
+ },
+ },
+ models: [{ id: "m", name: "M", engines: ["codxe"] }],
+ };
+ expect(sanitizePresets([preset])).toEqual([]);
+ expect(sanitizePresets([{ ...preset, models: { id: "m" } }])).toEqual([]);
+ });
+
+ it("所有随包预设展开后都通过校验", () => {
+ expect(sanitizePresets(rawPresets)).toHaveLength(rawPresets.length);
+ expect(BUNDLED_CATALOG.presets?.length).toBeGreaterThanOrEqual(
+ rawPresets.length,
+ );
+ });
+});
diff --git a/packages/model-providers/src/__tests__/presets.test.ts b/packages/model-providers/src/__tests__/presets.test.ts
index 6173265496..b697f95362 100644
--- a/packages/model-providers/src/__tests__/presets.test.ts
+++ b/packages/model-providers/src/__tests__/presets.test.ts
@@ -907,16 +907,17 @@ describe('MiniMax OpenAI Responses 预设契约 (issue #345)', () => {
const preset = BUNDLED_CATALOG.presets?.find((candidate) => candidate.id === id);
expect(preset?.docsUrl).toBe(docsUrl);
expect(preset?.runtimes['claude-code']?.baseUrl).toMatch(/\/anthropic$/);
- expect(preset?.runtimes['claude-code']?.models.filter(model => model.defaultEnabled !== false)).toEqual([
- { id: 'MiniMax-M3', name: 'MiniMax M3', contextWindow: 1_000_000 },
- { id: 'MiniMax-M2.5', name: 'MiniMax M2.5' },
- ]);
+ // 以线上服务端推荐清单为准(M2 系列仍在官方文档中)。
+ const expected = [
+ { id: 'MiniMax-M3', name: 'MiniMax-M3', contextWindow: 1_000_000, supportsImageInput: true },
+ ...['MiniMax-M2.7', 'MiniMax-M2.7-highspeed', 'MiniMax-M2.5', 'MiniMax-M2.5-highspeed',
+ 'MiniMax-M2.1', 'MiniMax-M2.1-highspeed', 'MiniMax-M2'].map((id) => (
+ { id, name: id, contextWindow: 204_800, supportsImageInput: false })),
+ ];
+ expect(preset?.runtimes['claude-code']?.models.filter(model => model.defaultEnabled !== false)).toEqual(expected);
expect({ ...preset?.runtimes.codex, models: preset?.runtimes.codex?.models.filter(model => model.defaultEnabled !== false) }).toEqual({
baseUrl: codexBaseUrl,
- models: [
- { id: 'MiniMax-M3', name: 'MiniMax M3', contextWindow: 1_000_000 },
- { id: 'MiniMax-M2.5', name: 'MiniMax M2.5' },
- ],
+ models: expected,
});
});
});
@@ -1004,14 +1005,14 @@ describe('官方渠道预设契约', () => {
it('DeepSeek 的 Pi runtime 来自官方目录并保留逐模型推理档位', () => {
const pi = preset('deepseek')?.runtimes.pi;
expect(pi?.piCatalogProviderId).toBe('deepseek');
- expect(pi?.models.find((model) => model.id === 'deepseek-v4-flash')).toMatchObject({
- contextWindow: 1_000_000,
+ expect(pi?.models.find((model) => model.id === 'deepseek-flash')).toMatchObject({
+ contextWindow: 1_048_576,
reasoning: true,
reasoningEfforts: ['low', 'high', 'max'],
reasoningDefaultEffort: 'high',
});
expect(pi?.models.find((model) => model.id === 'deepseek-v4-pro')).toMatchObject({
- contextWindow: 1_000_000,
+ contextWindow: 1_048_576,
reasoning: true,
reasoningEfforts: ['high', 'max'],
reasoningDefaultEffort: 'high',
@@ -1081,35 +1082,47 @@ describe('官方渠道预设契约', () => {
const codingPlan = preset('aliyun-bailian-coding');
const personalTokenPlan = preset('aliyun-bailian-token-plan-cn');
const teamTokenPlan = preset('aliyun-bailian-token-plan-team-cn');
+ // 官方套餐清单(2026-09-26 核对);窗口取官方最大输入,默认开思考的取思考模式最大输入。
+ const qwen = (id: string, name: string, image: boolean) =>
+ ({ id, name, contextWindow: 983_616, supportsImageInput: image });
const codingPlanModels = [
- { id: 'qwen3.7-plus', name: 'Qwen 3.7 Plus' },
- { id: 'qwen3-coder-next', name: 'Qwen3 Coder Next' },
- { id: 'qwen3-coder-plus', name: 'Qwen3 Coder Plus' },
+ qwen('qwen3.7-plus', 'Qwen3.7-Plus', true),
+ qwen('qwen3.6-plus', 'Qwen3.6-Plus', true),
+ { id: 'kimi-k2.5', name: 'Kimi K2.5', contextWindow: 229_376, supportsImageInput: true },
+ { id: 'glm-5', name: 'GLM-5', contextWindow: 169_984, supportsImageInput: false },
+ { id: 'MiniMax-M2.5', name: 'MiniMax-M2.5', contextWindow: 196_608, supportsImageInput: false },
+ { id: 'qwen3-coder-next', name: 'Qwen3 Coder Next', contextWindow: 204_800, supportsImageInput: false },
+ { id: 'qwen3-coder-plus', name: 'Qwen3-Coder-Plus', contextWindow: 997_952, supportsImageInput: false },
];
const personalTokenPlanModels = [
- { id: 'qwen3.8-max-preview', name: 'Qwen 3.8 Max Preview', contextWindow: 983_616 },
- { id: 'qwen3.7-max', name: 'Qwen 3.7 Max', contextWindow: 992_000 },
- { id: 'qwen3.7-plus', name: 'Qwen 3.7 Plus', contextWindow: 1_000_000 },
- { id: 'qwen3.6-flash', name: 'Qwen 3.6 Flash', contextWindow: 1_000_000 },
- { id: 'glm-5.2', name: 'GLM-5.2', contextWindow: 1_000_000 },
- { id: 'deepseek-v4-pro', name: 'DeepSeek V4 Pro', contextWindow: 1_048_576 },
+ qwen('qwen3.8-max', 'Qwen3.8-Max', true),
+ qwen('qwen3.8-flash', 'Qwen3.8-Flash', true),
+ qwen('qwen3.7-max', 'Qwen3.7-Max', false),
+ qwen('qwen3.7-plus', 'Qwen3.7-Plus', true),
+ qwen('qwen3.6-flash', 'Qwen3.6-Flash', true),
+ { id: 'deepseek-v4.1-flash', name: 'DeepSeek-V4.1-Flash', contextWindow: 1_000_000, supportsImageInput: true },
+ { id: 'deepseek-v4-pro', name: 'DeepSeek-V4-Pro', contextWindow: 1_000_000, supportsImageInput: false },
+ { id: 'glm-5.3', name: 'GLM-5.3', contextWindow: 1_048_576, supportsImageInput: false },
+ { id: 'glm-5.2', name: 'GLM-5.2', contextWindow: 1_048_576, supportsImageInput: false },
];
const teamTokenPlanModels = [
- { id: 'qwen3.8-max-preview', name: 'Qwen 3.8 Max Preview', contextWindow: 983_616 },
- { id: 'qwen3.7-max', name: 'Qwen 3.7 Max', contextWindow: 992_000 },
- { id: 'qwen3.7-plus', name: 'Qwen 3.7 Plus', contextWindow: 1_000_000 },
- { id: 'qwen3.6-plus', name: 'Qwen 3.6 Plus', contextWindow: 1_000_000 },
- { id: 'qwen3.6-flash', name: 'Qwen 3.6 Flash', contextWindow: 1_000_000 },
- { id: 'deepseek-v4-pro', name: 'DeepSeek V4 Pro', contextWindow: 1_048_576 },
- { id: 'deepseek-v4-flash', name: 'DeepSeek V4 Flash', contextWindow: 1_048_576 },
- { id: 'deepseek-v3.2', name: 'DeepSeek V3.2', contextWindow: 131_072 },
- { id: 'kimi-k2.7-code', name: 'Kimi K2.7 Code', contextWindow: 262_144 },
- { id: 'kimi-k2.6', name: 'Kimi K2.6', contextWindow: 262_144 },
- { id: 'kimi-k2.5', name: 'Kimi K2.5', contextWindow: 262_144 },
- { id: 'glm-5.2', name: 'GLM-5.2', contextWindow: 1_000_000 },
- { id: 'glm-5.1', name: 'GLM-5.1', contextWindow: 202_752 },
- { id: 'glm-5', name: 'GLM-5', contextWindow: 202_752 },
- { id: 'MiniMax-M2.5', name: 'MiniMax M2.5', contextWindow: 196_608 },
+ qwen('qwen3.8-max', 'Qwen3.8-Max', true),
+ qwen('qwen3.8-flash', 'Qwen3.8-Flash', true),
+ qwen('qwen3.7-max', 'Qwen3.7-Max', false),
+ qwen('qwen3.7-plus', 'Qwen3.7-Plus', true),
+ qwen('qwen3.6-plus', 'Qwen3.6-Plus', true),
+ qwen('qwen3.6-flash', 'Qwen3.6-Flash', true),
+ { id: 'deepseek-v4.1-flash', name: 'DeepSeek-V4.1-Flash', contextWindow: 1_000_000, supportsImageInput: true },
+ { id: 'deepseek-v4-pro', name: 'DeepSeek-V4-Pro', contextWindow: 1_000_000, supportsImageInput: false },
+ { id: 'deepseek-v4-flash', name: 'DeepSeek-V4-Flash', contextWindow: 1_000_000, supportsImageInput: false },
+ { id: 'kimi-k2.7-code', name: 'Kimi K2.7 Code', contextWindow: 229_376, supportsImageInput: true },
+ { id: 'kimi-k2.6', name: 'Kimi K2.6', contextWindow: 229_376, supportsImageInput: true },
+ { id: 'kimi-k2.5', name: 'Kimi K2.5', contextWindow: 229_376, supportsImageInput: true },
+ { id: 'glm-5.3', name: 'GLM-5.3', contextWindow: 1_048_576, supportsImageInput: false },
+ { id: 'glm-5.2', name: 'GLM-5.2', contextWindow: 1_048_576, supportsImageInput: false },
+ { id: 'glm-5.1', name: 'GLM-5.1', contextWindow: 169_984, supportsImageInput: false },
+ { id: 'glm-5', name: 'GLM-5', contextWindow: 169_984, supportsImageInput: false },
+ { id: 'MiniMax-M2.5', name: 'MiniMax-M2.5', contextWindow: 196_608, supportsImageInput: false },
];
const tokenPlanModelsUrl =
'https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1/models';
@@ -1137,10 +1150,13 @@ describe('官方渠道预设契约', () => {
modelsUrl: 'https://coding.dashscope.aliyuncs.com/v1/models',
models: codingPlanModels,
});
+ // Codex 走 openai-chat 桥接:桥接未验证图片格式的型号在 Codex 下不声明图片输入。
+ const codexChatImages = (models: readonly { id: string; supportsImageInput?: boolean }[], unverified: string[]) =>
+ models.map((model) => (unverified.includes(model.id) ? { ...model, supportsImageInput: false } : model));
expect(codingPlan?.runtimes.codex).toEqual({
baseUrl: 'https://coding.dashscope.aliyuncs.com/v1',
wireProtocol: 'openai-chat',
- models: codingPlanModels,
+ models: codexChatImages(codingPlanModels, ['kimi-k2.5']),
});
for (const [tokenPlan, models] of [
[personalTokenPlan, personalTokenPlanModels],
@@ -1155,40 +1171,41 @@ describe('官方渠道预设契约', () => {
baseUrl: 'https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1',
wireProtocol: 'openai-chat',
modelsUrl: tokenPlanModelsUrl,
- models,
+ models: codexChatImages(models, ['deepseek-v4.1-flash', 'kimi-k2.7-code', 'kimi-k2.6', 'kimi-k2.5']),
});
}
});
it.each(['zhipu-coding-plan-cn', 'zai-coding-plan-global'])(
- '%s 的 Claude Code GLM-5.2 1M 入口保留完整窗口元数据',
+ '%s 只推荐官方支持的 GLM-5.3 / GLM-5.3-Flash(5.2、5.1 已路由到 5.3)',
(id) => {
- expect(
- preset(id)?.runtimes['claude-code']?.models.find((model) => model.id === 'glm-5.2[1m]'),
- ).toEqual({
- id: 'glm-5.2[1m]',
- name: 'GLM-5.2 (1M)',
- contextWindow: 1_000_000,
- });
+ const recommended = (agent: 'claude-code' | 'codex' | 'pi') =>
+ preset(id)?.runtimes[agent]?.models
+ .filter((model) => model.defaultEnabled !== false)
+ .map((model) => model.id);
+ expect(recommended('claude-code')).toEqual(['glm-5.3[1m]', 'glm-5.3-flash[1m]']);
+ expect(recommended('codex')).toEqual(['glm-5.3', 'glm-5.3-flash']);
+ expect(recommended('pi')).toEqual(['glm-5.3', 'glm-5.3-flash']);
},
);
it.each(['zhipu-coding-plan-cn', 'zai-coding-plan-global'])(
- '%s 的 Claude Code 提供 GLM-5.3 1M 独立入口,与 Pi 列表的 glm-5.3 窗口一致 (#3883)',
+ '%s 的 Claude Code 使用官方 [1m] 入口,与 Pi 的 glm-5.3 窗口一致 (#3883)',
(id) => {
const claudeModels = preset(id)?.runtimes['claude-code']?.models ?? [];
expect(claudeModels.find((model) => model.id === 'glm-5.3[1m]')).toEqual({
id: 'glm-5.3[1m]',
name: 'GLM-5.3 (1M)',
contextWindow: 1_000_000,
+ supportsImageInput: false,
+ });
+ expect(claudeModels.find((model) => model.id === 'glm-5.3-flash[1m]')).toMatchObject({
+ contextWindow: 1_000_000,
+ supportsImageInput: true,
});
- // 窗口来源:同一端点族的 Pi 列表已声明 glm-5.3 为 1M,Claude Code 的 [1m] 形态不得比它小。
expect(
preset(id)?.runtimes.pi?.models.find((model) => model.id === 'glm-5.3')?.contextWindow,
).toBe(1_000_000);
- // 只补独立 1M 条目:既有裸条目保持原样(留空仍按 200K 保守默认),不静默抬窗。
- expect(claudeModels.find((model) => model.id === 'glm-5.2')).toEqual({ id: 'glm-5.2', name: 'GLM-5.2' });
- expect(claudeModels.find((model) => model.id === 'glm-5.3')).toMatchObject({ api: 'anthropic-messages', defaultEnabled: false });
},
);
diff --git a/packages/model-providers/src/__tests__/xdRegistryEntries.test.ts b/packages/model-providers/src/__tests__/xdRegistryEntries.test.ts
new file mode 100644
index 0000000000..a3622fde2a
--- /dev/null
+++ b/packages/model-providers/src/__tests__/xdRegistryEntries.test.ts
@@ -0,0 +1,31 @@
+import { readFileSync } from "node:fs";
+import { describe, expect, it } from "vitest";
+
+import { parseModelRegistry } from "../modelAccessValidator.js";
+
+const registry = JSON.parse(
+ readFileSync(
+ new URL("../../catalog/model-registry.json", import.meta.url),
+ "utf8",
+ ),
+) as { models: { id: string; routes: { providerId: string }[] }[] };
+
+describe("XD 路由独立条目", () => {
+ it("XD 路由不与其他供应商共用条目,XD 的显示与排序可单独维护", () => {
+ // 服务端生成 Gateway /models 时读取 XD 路由所在条目的 defaultEnabled / sortOrder;
+ // 与订阅共用条目会让订阅侧的显示调整连带改动 XD。
+ const mixed = registry.models
+ .filter((entry) => {
+ const providers = new Set(
+ entry.routes.map((route) => route.providerId),
+ );
+ return providers.has("xd") && providers.size > 1;
+ })
+ .map((entry) => entry.id);
+ expect(mixed).toEqual([]);
+ });
+
+ it("拆分后的离线 Registry 仍通过协议校验", () => {
+ expect(parseModelRegistry(registry).ok).toBe(true);
+ });
+});
diff --git a/packages/model-providers/src/builtin.ts b/packages/model-providers/src/builtin.ts
index 6ec3056753..82690a0eb5 100644
--- a/packages/model-providers/src/builtin.ts
+++ b/packages/model-providers/src/builtin.ts
@@ -13,7 +13,7 @@
*
* 身份卡(id / auth / access / routing / titleModel)是随代码走的事实:
* 改它们必然伴随发版(SDK 集成 / 翻译桥 / 网关协议都是代码),所以写死在这里,
- * 不再经 OSS 下发。OSS `cfg/providers.json`(v2)只承载 xai 清单 + presets 模板,
+ * 不再经 OSS 下发。`catalog/providers.json`(v2)只承载 xai 清单 + presets 模板,
* 模型元数据与参考价只走同目录下严格版本化的 `model-registry.json`。
*
* ⚠️ 顺序契约:BUILTIN_PROVIDERS 的数组序(anthropic → openai → xai → xd)决定
@@ -21,6 +21,7 @@
*/
import { appendPiProviderPresets } from './piProviderPresets.js';
+import { expandPresetModels } from './presetModels.js';
import { projectProviderMediaModels } from './providerMediaModels.js';
import catalogJson from '../catalog/providers.json' with { type: 'json' };
import modelRegistryJson from '../catalog/model-registry.json' with { type: 'json' };
@@ -29,7 +30,7 @@ import type { ModelRegistry } from './modelAccessBean.js';
import { piNativeCatalogModels } from './piNativeCatalog.js';
import type { Catalog, CatalogModel, Provider } from './types.js';
-/** 仓内 v2 目录文件(xai 清单 + presets;同一文件发布到 OSS `cfg/providers.json`)。 */
+/** 仓内 v2 目录文件(xai 清单 + presets 源格式;不直接发布到旧 OSS `cfg/providers.json`)。 */
const catalogFile = catalogJson as unknown as Catalog;
const bundledModelRegistry = modelRegistryJson as unknown as ModelRegistry;
@@ -271,5 +272,5 @@ export const BUNDLED_CATALOG: Catalog = {
version: catalogFile.version,
providers: BUILTIN_PROVIDERS,
modelRegistry: bundledModelRegistry,
- presets: appendPiProviderPresets(catalogFile.presets ?? []),
+ presets: appendPiProviderPresets((catalogFile.presets ?? []).map(expandPresetModels)),
};
diff --git a/packages/model-providers/src/catalog.ts b/packages/model-providers/src/catalog.ts
index 90f4fc6952..10f91ec16d 100644
--- a/packages/model-providers/src/catalog.ts
+++ b/packages/model-providers/src/catalog.ts
@@ -2,14 +2,16 @@
* 目录运行时校验(parseCatalog)+ presets 清洗排序。
*
* 2026-07-19 起 bundled 目录由 `builtin.ts` 组装:内置供应商身份卡是 TS 常量,
- * `catalog/providers.json`(v2)承载 xAI 的离线 fallback 元数据 + presets 模板——它仍是
- * ① OSS `cfg/providers.json` 的发布物 ② dev 直读的仓库文件。anthropic/openai/xd
+ * `catalog/providers.json`(v2)承载 xAI 的离线 fallback 元数据 + presets 模板,是随包
+ * 目录与 dev 直读的仓库文件。旧 OSS `cfg/providers.json` 自 2026-07 起冻结、不再由本文件
+ * 发布;本文件的预设是源格式(顶层单一推荐清单),旧客户端读不懂,不能直接发布到 OSS。anthropic/openai/xd
* 的模型清单运行时动态注入(见 apps/desktop maker-host active-catalog),不再进目录文件。
* xAI 登录后同样由账号 `/v1/models` 决定成员;此处静态段只在尚无成功账号快照时救急,
* 并为已发现成员补上下文、价格、能力与路由。
* 所有跨端模型元数据统一进入严格版本化的 `modelRegistry`;目录顶层不接受旁路元数据块。
*/
+import { expandPresetModels } from './presetModels.js';
import { projectProviderMediaModels } from './providerMediaModels.js';
import { mimoPresetName } from './mimoPresentation.js';
import { validModelMetadata } from './modelMetadataLayers.js';
@@ -729,7 +731,11 @@ export function sanitizePresets(input: unknown): ProviderPreset[] {
if (!Array.isArray(input)) return [];
const out: ProviderPreset[] = [];
const seen = new Set<string>();
- for (const v of input) {
+ for (const raw of input) {
+ const v = expandPresetModels(raw);
+ // 展开成功会删掉顶层 `models`;仍留着说明引擎字段畸形或清单不是数组,整条拒绝——
+ // 即使 runtimes 另带了旧格式清单,也不能让它以同 id 覆盖随包版本。
+ if (v && typeof v === 'object' && 'models' in v) continue;
if (!isValidPreset(v) || seen.has(v.id)) continue;
seen.add(v.id);
// 可选呈现字段逐项归一化,**不许分支 continue**:多个字段同时非法时早退会漏清洗
diff --git a/packages/model-providers/src/index.ts b/packages/model-providers/src/index.ts
index 8754ce4ba3..6c37b15a3d 100644
--- a/packages/model-providers/src/index.ts
+++ b/packages/model-providers/src/index.ts
@@ -77,6 +77,7 @@ export {
sanitizePresets,
sortPresetsForRegion,
} from "./catalog.js";
+export { expandPresetModels } from "./presetModels.js";
export {
buildUserProvider,
diff --git a/packages/model-providers/src/modelMetadataLayers.ts b/packages/model-providers/src/modelMetadataLayers.ts
index 651408191e..4eab3ff9bb 100644
--- a/packages/model-providers/src/modelMetadataLayers.ts
+++ b/packages/model-providers/src/modelMetadataLayers.ts
@@ -471,6 +471,8 @@ export function mergeDiscoveredRuntimeModels(
hideNew = false,
) {
const models = existing.map((model) => ({ ...model }));
+ // 新发现的型号排在已有型号之前(保持接口返回的相对顺序),已有型号位置不动。
+ const added: import("./types.js").ProviderRuntimeModelConfig[] = [];
const seen = new Set<string>();
for (const model of discovered) {
if (!model.id || !model.name || seen.has(model.id)) continue;
@@ -488,7 +490,7 @@ export function mergeDiscoveredRuntimeModels(
delete discoveredMetadata.contextWindowMax;
}
if (index < 0)
- models.push({
+ added.push({
id: model.id,
name: model.name,
discoveredMetadata,
@@ -503,7 +505,7 @@ export function mergeDiscoveredRuntimeModels(
...(model.discoveredCost ? { discoveredCost: model.discoveredCost } : {}),
};
}
- return models;
+ return [...added, ...models];
}
/** Explicit runtime user fields, shared by initial construction and local public overlays. */
diff --git a/packages/model-providers/src/presetModels.ts b/packages/model-providers/src/presetModels.ts
new file mode 100644
index 0000000000..38323d9626
--- /dev/null
+++ b/packages/model-providers/src/presetModels.ts
@@ -0,0 +1,108 @@
+/**
+ * 预设推荐模型的单一清单 → 各引擎清单。
+ *
+ * 目录源数据只在预设顶层写一份 `models`(数组顺序即推荐顺序),加载时展开进每个
+ * `runtimes[agent].models`:`engines` 限定可用引擎,`engineOverrides[agent]` 覆盖该引擎
+ * 的专属字段(如 Pi 的推理档位)。展开后删除顶层 `models`,下游与服务端下发的旧格式
+ * 形状一致。顶层没有 `models` 的旧格式原样返回。纯函数,只处理形状,校验仍由
+ * `sanitizePresets` 负责。
+ */
+import type { AgentKind } from "./types.js";
+
+function isPlainObject(value: unknown): value is Record<string, unknown> {
+ return !!value && typeof value === "object" && !Array.isArray(value);
+}
+
+const AGENT_KINDS: readonly AgentKind[] = ["claude-code", "codex", "pi"];
+
+function isAgentKind(value: unknown): value is AgentKind {
+ return (
+ typeof value === "string" &&
+ (AGENT_KINDS as readonly string[]).includes(value)
+ );
+}
+
+function isDeclared(agent: unknown, declaredRuntimes: readonly string[]) {
+ return isAgentKind(agent) && declaredRuntimes.includes(agent);
+}
+
+/**
+ * 引擎限定字段是否畸形。不变量:`engines` 的每一项与 `engineOverrides` 的每个键都必须是
+ * 本预设已声明的 runtime(`engines` 非空)——否则模型会被静默抹掉,或专属覆盖被静默忽略。
+ */
+function hasMalformedEngineFields(
+ model: unknown,
+ declaredRuntimes: readonly string[],
+): boolean {
+ if (!isPlainObject(model)) return false;
+ const { engines, engineOverrides } = model;
+ if (
+ engines !== undefined &&
+ (!Array.isArray(engines) ||
+ engines.length === 0 ||
+ !engines.every((agent) => isDeclared(agent, declaredRuntimes)))
+ ) {
+ return true;
+ }
+ return (
+ engineOverrides !== undefined &&
+ (!isPlainObject(engineOverrides) ||
+ !Object.entries(engineOverrides).every(
+ ([agent, override]) =>
+ isDeclared(agent, declaredRuntimes) && isPlainObject(override),
+ ))
+ );
+}
+
+export function expandPresetModels<T>(preset: T): T {
+ if (!preset || typeof preset !== "object" || Array.isArray(preset))
+ return preset;
+ const source = preset as Record<string, unknown>;
+ if (!Array.isArray(source.models)) return preset;
+ const models = source.models as unknown[];
+ const runtimes =
+ source.runtimes &&
+ typeof source.runtimes === "object" &&
+ !Array.isArray(source.runtimes)
+ ? (source.runtimes as Record<string, unknown>)
+ : {};
+ // 引擎限定字段畸形时不展开,保留顶层 `models`,由 `sanitizePresets` 整条拒绝。
+ const declaredRuntimes = Object.keys(runtimes);
+ if (models.some((model) => hasMalformedEngineFields(model, declaredRuntimes)))
+ return preset;
+ const expanded = Object.fromEntries(
+ Object.entries(runtimes).map(([agent, runtime]) => {
+ if (!runtime || typeof runtime !== "object" || Array.isArray(runtime))
+ return [agent, runtime];
+ const list = models.flatMap((model) => {
+ // 坏条目原样交给校验层拒绝,不在这里静默丢弃。
+ if (!model || typeof model !== "object" || Array.isArray(model))
+ return [model];
+ const { engines, engineOverrides, ...shared } = model as Record<
+ string,
+ unknown
+ >;
+ if (Array.isArray(engines) && !engines.includes(agent)) return [];
+ const override =
+ engineOverrides &&
+ typeof engineOverrides === "object" &&
+ !Array.isArray(engineOverrides)
+ ? (engineOverrides as Record<string, unknown>)[agent]
+ : undefined;
+ return [
+ {
+ ...shared,
+ ...(override &&
+ typeof override === "object" &&
+ !Array.isArray(override)
+ ? override
+ : {}),
+ },
+ ];
+ });
+ return [agent, { ...runtime, models: list }];
+ }),
+ );
+ const { models: _models, ...rest } = source;
+ return { ...rest, runtimes: expanded } as T;
+}
diff --git a/packages/model-providers/src/providerInterfaceRoutes.ts b/packages/model-providers/src/providerInterfaceRoutes.ts
index e6c1e2be25..9b51668077 100644
--- a/packages/model-providers/src/providerInterfaceRoutes.ts
+++ b/packages/model-providers/src/providerInterfaceRoutes.ts
@@ -1,5 +1,6 @@
import interfaceModels from '../catalog/provider-interface-models.json';
import raw from '../catalog/providers.json';
+import { expandPresetModels } from './presetModels.js';
import { compatibilityProtocol } from '@cindy/model-compat/protocol';
import type { AgentKind, ProviderPreset, ProviderRuntimeModelConfig, ProviderWireProtocol } from './types.js';
@@ -13,7 +14,7 @@ const maintained = new Set([
'zhipu-coding-plan-cn', 'zai-coding-plan-global', 'xiaomi-mimo-api-cn', 'xiaomi-mimo-token-plan-cn',
'volcengine-agent-plan', 'volcengine-coding-plan', 'tencentcloud-coding-plan',
]);
-const presets = raw.presets as ProviderPreset[];
+const presets = (raw.presets as ProviderPreset[]).map(expandPresetModels);
type Route = { baseUrl: string; api: 'anthropic-messages' | 'openai-responses' | 'openai-completions'; inputs: string[] };
const overrides: Record<string, Partial<Record<AgentKind, Route>>> = {
baseten: { 'claude-code': { baseUrl: 'https://inference.baseten.co', api: 'anthropic-messages', inputs: ['https://inference.baseten.co/v1'] } },
diff --git a/packages/model-providers/src/types.ts b/packages/model-providers/src/types.ts
index 67135f1c73..d841b53a2e 100644
--- a/packages/model-providers/src/types.ts
+++ b/packages/model-providers/src/types.ts
@@ -620,6 +620,17 @@ export interface ProviderRuntimeModelConfig extends ModelMetadata {
thinkingToggle?: boolean;
}
+/**
+ * 预设推荐模型:三个引擎共用一份清单,数组顺序即推荐顺序(见 `expandPresetModels`)。
+ * 引擎间确有差异时用 `engines` / `engineOverrides` 显式声明,不再为每个引擎各写一份。
+ */
+export interface ProviderPresetModel extends ProviderRuntimeModelConfig {
+ /** 只在这些引擎可用(如协议限制);缺省 = 预设声明的全部引擎。 */
+ engines?: AgentKind[];
+ /** 引擎专属字段(如 Pi 的推理档位、按模型路由),展开时覆盖共用字段。 */
+ engineOverrides?: Partial<Record<AgentKind, Partial<ProviderRuntimeModelConfig>>>;
+}
+
/**
* 供应商预设的单 runtime 预填数据(「从模板创建自定义供应商」用)。
* 形状对齐 `CustomProviderRuntimeConfig`:选中预设 = 把这段数据灌进创建表单,用户只补 API key。
@@ -689,6 +700,11 @@ export interface ProviderPreset {
* 创建后会快照进 CustomProviderConfig,不随预设后续更新。
*/
authMethod?: "apiKey" | "none";
+ /**
+ * 目录源数据里的共用推荐模型清单。加载时由 `expandPresetModels` 展开进各
+ * `runtimes[agent].models` 并删除本字段;下游始终只读展开后的形状,旧格式照常可用。
+ */
+ models?: ProviderPresetModel[];
/** per-runtime 预填数据(至少一个)。 */
runtimes: Partial<Record<AgentKind, ProviderPresetRuntime>>;
}