Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/config/zod-schema.core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,12 @@ const BUILT_IN_MODEL_PROVIDER_OVERLAY_IDS = new Set([
"anthropic",
"anthropic-vertex",
"arcee",
"azure-openai-responses",
"byteplus",
"byteplus-plan",
"cerebras",
"chutes",
"claude-cli",
"cloudflare-ai-gateway",
"codex",
"comfy",
Expand All @@ -419,6 +421,9 @@ const BUILT_IN_MODEL_PROVIDER_OVERLAY_IDS = new Set([
"fal",
"fireworks",
"github-copilot",
"gmi",
"gmi-cloud",
"gmicloud",
"google",
"google-antigravity",
"google-gemini-cli",
Expand All @@ -436,15 +441,24 @@ const BUILT_IN_MODEL_PROVIDER_OVERLAY_IDS = new Set([
"mistral",
"modelstudio",
"moonshot",
"moonshot-ai",
"moonshotai",
"nvidia",
"novita",
"novita-ai",
"novitaai",
"ollama",
"ollama-cloud",
"openai",
"openai-codex",
"opencode",
"opencode-go",
"openrouter",
"qianfan",
"qwen",
"qwen-cli",
"qwen-oauth",
"qwen-portal",
"qwencloud",
"sglang",
"stepfun",
Expand All @@ -461,6 +475,8 @@ const BUILT_IN_MODEL_PROVIDER_OVERLAY_IDS = new Set([
"xai",
"xiaomi",
"xiaomi-token-plan",
"z.ai",
"z-ai",
"zai",
]);

Expand Down
29 changes: 29 additions & 0 deletions src/config/zod-schema.models.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,35 @@ import { describe, expect, it } from "vitest";
import { ModelsConfigSchema } from "./zod-schema.core.js";

describe("ModelsConfigSchema", () => {
it.each([
"claude-cli",
"azure-openai-responses",
"gmi",
"gmi-cloud",
"gmicloud",
"moonshot-ai",
"moonshotai",
"novita",
"novita-ai",
"novitaai",
"ollama-cloud",
"qwen-cli",
"qwen-oauth",
"qwen-portal",
"z.ai",
"z-ai",
])("accepts bundled provider overlay for %s without baseUrl or models", (providerId) => {
const result = ModelsConfigSchema.safeParse({
providers: {
[providerId]: {
timeoutSeconds: 600,
},
},
});

expect(result.success).toBe(true);
});

it("accepts google-vertex as a model API from MODEL_APIS", () => {
const result = ModelsConfigSchema.safeParse({
providers: {
Expand Down
Loading