diff options
| author | Dax Raad <[email protected]> | 2025-05-29 11:38:55 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-05-29 11:38:55 -0400 |
| commit | 48f81fe4d3a286ead827888e030f9bd89c864dee (patch) | |
| tree | 5715dd3b6a923cab8ce4155f5c66ca54661e6dce /js/src/app | |
| parent | a96c2ce65c8e87431dce84f0466abb9769e2f7fd (diff) | |
| download | opencode-48f81fe4d3a286ead827888e030f9bd89c864dee.tar.gz opencode-48f81fe4d3a286ead827888e030f9bd89c864dee.zip | |
sync
Diffstat (limited to 'js/src/app')
| -rw-r--r-- | js/src/app/config.ts | 42 |
1 files changed, 25 insertions, 17 deletions
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<typeof Model>; - 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<typeof Provider>; export const Info = z |
