Skip to content

armgit / cindy

Public Imported from GitHub
0

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

fix(models): declare Model Studio preset interfaces

Chrisf2aa4c2e821b
diff --git a/packages/model-providers/catalog/model-registry.json b/packages/model-providers/catalog/model-registry.json
index 7520c546d6..7007f838a7 100644
--- a/packages/model-providers/catalog/model-registry.json
+++ b/packages/model-providers/catalog/model-registry.json
@@ -1,6 +1,6 @@
{
"schemaVersion": 6,
- "updatedAt": "2026-10-24T02:52:43.075Z",
+ "updatedAt": "2026-10-24T03:51:23.033Z",
"models": [
{
"id": "openai/gpt-6.1-sol",
@@ -9509,6 +9509,56 @@
"openai-completions"
]
},
+ {
+ "id": "aliyun-model-studio-cn-anthropic-messages",
+ "providerId": "aliyun-model-studio-cn",
+ "api": "anthropic-messages",
+ "baseUrl": "https://dashscope.aliyuncs.com/apps/anthropic",
+ "inputBaseUrls": [
+ "https://dashscope.aliyuncs.com/apps/anthropic"
+ ],
+ "defaultFor": [
+ "claude-code",
+ "pi"
+ ]
+ },
+ {
+ "id": "aliyun-model-studio-cn-openai-completions",
+ "providerId": "aliyun-model-studio-cn",
+ "api": "openai-completions",
+ "baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
+ "inputBaseUrls": [
+ "https://dashscope.aliyuncs.com/compatible-mode/v1"
+ ],
+ "defaultFor": [
+ "codex"
+ ]
+ },
+ {
+ "id": "aliyun-model-studio-global-anthropic-messages",
+ "providerId": "aliyun-model-studio-global",
+ "api": "anthropic-messages",
+ "baseUrl": "https://dashscope-intl.aliyuncs.com/apps/anthropic",
+ "inputBaseUrls": [
+ "https://dashscope-intl.aliyuncs.com/apps/anthropic"
+ ],
+ "defaultFor": [
+ "claude-code",
+ "pi"
+ ]
+ },
+ {
+ "id": "aliyun-model-studio-global-openai-completions",
+ "providerId": "aliyun-model-studio-global",
+ "api": "openai-completions",
+ "baseUrl": "https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
+ "inputBaseUrls": [
+ "https://dashscope-intl.aliyuncs.com/compatible-mode/v1"
+ ],
+ "defaultFor": [
+ "codex"
+ ]
+ },
{
"id": "aliyun-bailian-coding-anthropic-messages",
"providerId": "aliyun-bailian-coding",
diff --git a/packages/model-providers/src/__tests__/providerInterfaceRoutes.test.ts b/packages/model-providers/src/__tests__/providerInterfaceRoutes.test.ts
index a3e4971d72..cdc1732a85 100644
--- a/packages/model-providers/src/__tests__/providerInterfaceRoutes.test.ts
+++ b/packages/model-providers/src/__tests__/providerInterfaceRoutes.test.ts
@@ -4,6 +4,29 @@ import { alignModelApiRoute, providerInterfaceModelRoute } from '../providerInte
import { BUNDLED_CATALOG } from '../catalog.js';
describe('documented supplier interfaces', () => {
+ // r4365890304 (unit): import saved Model Studio connections through the
+ // production resolver. Previous coverage checked protocol shape, not whether
+ // these products actually exposed a selected catalog interface.
+ it.each([
+ ['aliyun-model-studio-cn', 'https://dashscope.aliyuncs.com'],
+ ['aliyun-model-studio-global', 'https://dashscope-intl.aliyuncs.com'],
+ ])('selects the declared %s saved interfaces without changing user settings', (presetId, host) => {
+ const provider = buildUserProvider({ id: 'studio', name: 'Studio', runtimes:
+ Object.fromEntries(['claude-code', 'codex', 'pi'].map(agent => [agent, {
+ baseUrl: `${host}/${agent === 'codex' ? 'compatible-mode/v1' : 'apps/anthropic'}`,
+ wireProtocol: agent === 'codex' ? 'openai-chat' : 'anthropic-messages', catalogPresetId: presetId,
+ models: [{ id: 'qwen3.7-flash', contextWindow: 64000, defaultEnabled: false }],
+ }])) });
+ for (const agent of provider.agents) {
+ const api = agent === 'codex' ? 'openai-completions' : 'anthropic-messages';
+ expect(provider.models[agent]![0]).toMatchObject({
+ api, contextWindow: 64000, defaultEnabled: false,
+ selectedInterface: { profileId: `${presetId}-${api}`, route: {
+ baseUrl: `${host}/${agent === 'codex' ? 'compatible-mode/v1' : 'apps/anthropic'}`,
+ } },
+ });
+ }
+ });
it.each([
['zhipu-glm-cn', 'https://open.bigmodel.cn/api/coding/paas/v4'],
['zhipu-glm-global', 'https://api.z.ai/api/coding/paas/v4'],