allow provider / model config

This commit is contained in:
Ramnique Singh 2025-11-14 09:13:28 +05:30
parent 62caa0c8b6
commit 6251c8f007
9 changed files with 140 additions and 12 deletions

View file

@ -27,7 +27,8 @@ export const AgentTool = z.discriminatedUnion("type", [
export const Agent = z.object({
name: z.string(),
model: z.string(),
provider: z.string().optional(),
model: z.string().optional(),
description: z.string(),
instructions: z.string(),
tools: z.record(z.string(), AgentTool).optional(),

View file

@ -0,0 +1,15 @@
import z from "zod";
export const Provider = z.object({
flavor: z.enum(["openai", "anthropic", "google"]),
apiKey: z.string().optional(),
baseURL: z.string().optional(),
});
export const ModelConfig = z.object({
providers: z.record(z.string(), Provider),
defaults: z.object({
provider: z.string(),
model: z.string(),
}),
});