From 48f81fe4d3a286ead827888e030f9bd89c864dee Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Thu, 29 May 2025 11:38:55 -0400 Subject: sync --- js/src/app/config.ts | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) (limited to 'js/src/app') diff --git a/js/src/app/config.ts b/js/src/app/config.ts index 348eb77c3..e68b24bb9 100644 --- a/js/src/app/config.ts +++ b/js/src/app/config.ts @@ -11,25 +11,33 @@ export namespace Config { return result; }); - export const Model = z.object({ - name: z.string().optional(), - cost: z.object({ - input: z.number(), - inputCached: z.number(), - output: z.number(), - outputCached: z.number(), - }), - contextWindow: z.number(), - maxTokens: z.number().optional(), - attachment: z.boolean(), - reasoning: z.boolean().optional(), - }); + export const Model = z + .object({ + name: z.string().optional(), + cost: z.object({ + input: z.number(), + inputCached: z.number(), + output: z.number(), + outputCached: z.number(), + }), + contextWindow: z.number(), + maxTokens: z.number().optional(), + attachment: z.boolean(), + reasoning: z.boolean().optional(), + }) + .openapi({ + ref: "model", + }); export type Model = z.output; - export const Provider = z.object({ - options: z.record(z.string(), z.any()).optional(), - models: z.record(z.string(), Model), - }); + export const Provider = z + .object({ + options: z.record(z.string(), z.any()).optional(), + models: z.record(z.string(), Model), + }) + .openapi({ + ref: "provider", + }); export type Provider = z.output; export const Info = z -- cgit v1.2.3