refactor model config flow

This commit is contained in:
Ramnique Singh 2025-11-20 17:53:58 +05:30
parent 4f2eb79ef9
commit 4bba560db6
2 changed files with 56 additions and 38 deletions

View file

@ -1,14 +1,16 @@
import z from "zod";
export const Flavor = z.enum([
"anthropic",
"google",
"ollama",
"openai",
"openai-compatible",
"openrouter",
]);
export const Provider = z.object({
flavor: z.enum([
"anthropic",
"google",
"ollama",
"openai",
"openai-compatible",
"openrouter",
]),
flavor: Flavor,
apiKey: z.string().optional(),
baseURL: z.string().optional(),
headers: z.record(z.string(), z.string()).optional(),