diff options
| author | Dax Raad <[email protected]> | 2025-05-29 11:58:40 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-05-29 11:58:40 -0400 |
| commit | 80597cd3fdf149cef87db55f03a3cc0bfd723a7a (patch) | |
| tree | b9332733cca2084a86334eb88fdc5115ab37b922 /js/src/provider | |
| parent | 48f81fe4d3a286ead827888e030f9bd89c864dee (diff) | |
| download | opencode-80597cd3fdf149cef87db55f03a3cc0bfd723a7a.tar.gz opencode-80597cd3fdf149cef87db55f03a3cc0bfd723a7a.zip | |
type error fix
Diffstat (limited to 'js/src/provider')
| -rw-r--r-- | js/src/provider/provider.ts | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/js/src/provider/provider.ts b/js/src/provider/provider.ts new file mode 100644 index 000000000..44482b6db --- /dev/null +++ b/js/src/provider/provider.ts @@ -0,0 +1,32 @@ +import z from "zod"; + +export namespace Provider { + 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: "Provider.Model", + }); + export type Model = z.output<typeof Model>; + + export const Info = z + .object({ + options: z.record(z.string(), z.any()).optional(), + models: z.record(z.string(), Model), + }) + .openapi({ + ref: "Provider.Info", + }); + export type Info = z.output<typeof Info>; +} |
