Skip to content

Commit 8d57529

Browse files
Pluviobytecursoragent
authored andcommitted
fix(config): accept overlays for bundled provider aliases
Co-authored-by: Cursor <[email protected]>
1 parent f89f5d9 commit 8d57529

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
@@ -405,10 +405,12 @@ const BUILT_IN_MODEL_PROVIDER_OVERLAY_IDS = new Set([
405405
"anthropic",
406406
"anthropic-vertex",
407407
"arcee",
408+
"azure-openai-responses",
408409
"byteplus",
409410
"byteplus-plan",
410411
"cerebras",
411412
"chutes",
413+
"claude-cli",
412414
"cloudflare-ai-gateway",
413415
"codex",
414416
"comfy",
@@ -419,6 +421,9 @@ const BUILT_IN_MODEL_PROVIDER_OVERLAY_IDS = new Set([
419421
"fal",
420422
"fireworks",
421423
"github-copilot",
424+
"gmi",
425+
"gmi-cloud",
426+
"gmicloud",
422427
"google",
423428
"google-antigravity",
424429
"google-gemini-cli",
@@ -436,15 +441,24 @@ const BUILT_IN_MODEL_PROVIDER_OVERLAY_IDS = new Set([
436441
"mistral",
437442
"modelstudio",
438443
"moonshot",
444+
"moonshot-ai",
445+
"moonshotai",
439446
"nvidia",
447+
"novita",
448+
"novita-ai",
449+
"novitaai",
440450
"ollama",
451+
"ollama-cloud",
441452
"openai",
442453
"openai-codex",
443454
"opencode",
444455
"opencode-go",
445456
"openrouter",
446457
"qianfan",
447458
"qwen",
459+
"qwen-cli",
460+
"qwen-oauth",
461+
"qwen-portal",
448462
"qwencloud",
449463
"sglang",
450464
"stepfun",
@@ -461,6 +475,8 @@ const BUILT_IN_MODEL_PROVIDER_OVERLAY_IDS = new Set([
461475
"xai",
462476
"xiaomi",
463477
"xiaomi-token-plan",
478+
"z.ai",
479+
"z-ai",
464480
"zai",
465481
]);
466482

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

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

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

0 commit comments

Comments
 (0)