Skip to content

Commit b01e612

Browse files
fix(config): accept overlays for bundled provider aliases (#88400)
Co-authored-by: Pluviobyte <[email protected]> Co-authored-by: Cursor <[email protected]>
1 parent 05cf497 commit b01e612

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

src/config/zod-schema.core.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,10 +438,12 @@ const BUILT_IN_MODEL_PROVIDER_OVERLAY_IDS = new Set([
438438
"anthropic",
439439
"anthropic-vertex",
440440
"arcee",
441+
"azure-openai-responses",
441442
"byteplus",
442443
"byteplus-plan",
443444
"cerebras",
444445
"chutes",
446+
"claude-cli",
445447
"cloudflare-ai-gateway",
446448
"codex",
447449
"comfy",
@@ -452,6 +454,9 @@ const BUILT_IN_MODEL_PROVIDER_OVERLAY_IDS = new Set([
452454
"fal",
453455
"fireworks",
454456
"github-copilot",
457+
"gmi",
458+
"gmi-cloud",
459+
"gmicloud",
455460
"google",
456461
"google-antigravity",
457462
"google-gemini-cli",
@@ -469,14 +474,23 @@ const BUILT_IN_MODEL_PROVIDER_OVERLAY_IDS = new Set([
469474
"mistral",
470475
"modelstudio",
471476
"moonshot",
477+
"moonshot-ai",
478+
"moonshotai",
472479
"nvidia",
480+
"novita",
481+
"novita-ai",
482+
"novitaai",
473483
"ollama",
484+
"ollama-cloud",
474485
"openai",
475486
"opencode",
476487
"opencode-go",
477488
"openrouter",
478489
"qianfan",
479490
"qwen",
491+
"qwen-cli",
492+
"qwen-oauth",
493+
"qwen-portal",
480494
"qwencloud",
481495
"sglang",
482496
"stepfun",
@@ -493,6 +507,8 @@ const BUILT_IN_MODEL_PROVIDER_OVERLAY_IDS = new Set([
493507
"xai",
494508
"xiaomi",
495509
"xiaomi-token-plan",
510+
"z.ai",
511+
"z-ai",
496512
"zai",
497513
]);
498514

src/config/zod-schema.models.test.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,35 @@ import { describe, expect, it } from "vitest";
33
import { ModelsConfigSchema } from "./zod-schema.core.js";
44

55
describe("ModelsConfigSchema", () => {
6+
it.each([
7+
"claude-cli",
8+
"azure-openai-responses",
9+
"gmi",
10+
"gmi-cloud",
11+
"gmicloud",
12+
"moonshot-ai",
13+
"moonshotai",
14+
"novita",
15+
"novita-ai",
16+
"novitaai",
17+
"ollama-cloud",
18+
"qwen-cli",
19+
"qwen-oauth",
20+
"qwen-portal",
21+
"z.ai",
22+
"z-ai",
23+
])("accepts bundled provider overlay for %s without baseUrl or models", (providerId) => {
24+
const result = ModelsConfigSchema.safeParse({
25+
providers: {
26+
[providerId]: {
27+
timeoutSeconds: 600,
28+
},
29+
},
30+
});
31+
32+
expect(result.success).toBe(true);
33+
});
34+
635
it("accepts google-vertex as a model API from MODEL_APIS", () => {
736
const result = ModelsConfigSchema.safeParse({
837
providers: {

0 commit comments

Comments
 (0)