Merge pull request #5202 from chezsmithy/fix-yaml-reasoning-caching

fix(config-yaml): prompt caching and reasoning
This commit is contained in:
Patrick Erichsen 2025-04-27 20:18:02 -07:00 • committed by GitHub
commit cfef134344
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -47,9 +47,17 @@ export const completionOptionsSchema = z.object({
topK: z.number().optional(),
stop: z.array(z.string()).optional(),
n: z.number().optional(),
reasoning: z.boolean().optional(),
reasoningBudgetTokens: z.number().optional(),
});
export type CompletionOptions = z.infer<typeof completionOptionsSchema>;
export const cacheBehaviorSchema = z.object({
cacheSystemMessage: z.boolean().optional(),
cacheConversation: z.boolean().optional(),
})
export type CacheBehavior = z.infer<typeof cacheBehaviorSchema>;
export const embedOptionsSchema = z.object({
maxChunkSize: z.number().optional(),
maxBatchSize: z.number().optional(),
@ -77,6 +85,7 @@ const baseModelFields = {
roles: modelRolesSchema.array().optional(),
capabilities: modelCapabilitySchema.array().optional(),
defaultCompletionOptions: completionOptionsSchema.optional(),
cacheBehavior: cacheBehaviorSchema.optional(),
requestOptions: requestOptionsSchema.optional(),
embedOptions: embedOptionsSchema.optional(),
chatOptions: chatOptionsSchema.optional(),