mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-30 21:49:53 +00:00
zen: rate limit (#11735)
This commit is contained in:
parent
43354eeabd
commit
4850ecc419
2 changed files with 20 additions and 4 deletions
|
|
@ -18,8 +18,13 @@ export namespace ZenData {
|
|||
}),
|
||||
),
|
||||
})
|
||||
const RateLimitSchema = z.object({
|
||||
period: z.enum(["day", "rolling"]),
|
||||
value: z.number().int(),
|
||||
})
|
||||
export type Format = z.infer<typeof FormatSchema>
|
||||
export type Trial = z.infer<typeof TrialSchema>
|
||||
export type RateLimit = z.infer<typeof RateLimitSchema>
|
||||
|
||||
const ModelCostSchema = z.object({
|
||||
input: z.number(),
|
||||
|
|
@ -37,7 +42,7 @@ export namespace ZenData {
|
|||
byokProvider: z.enum(["openai", "anthropic", "google"]).optional(),
|
||||
stickyProvider: z.enum(["strict", "prefer"]).optional(),
|
||||
trial: TrialSchema.optional(),
|
||||
rateLimit: z.number().optional(),
|
||||
rateLimit: RateLimitSchema.optional(),
|
||||
fallbackProvider: z.string().optional(),
|
||||
providers: z.array(
|
||||
z.object({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue