Skip to content

Commit cfef134

Browse files
Merge pull request #5202 from chezsmithy/fix-yaml-reasoning-caching
fix(config-yaml): prompt caching and reasoning
2 parents 5f4a9e5 + 2f85661 commit cfef134

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/config-yaml/src/schemas/models.ts

+9
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,17 @@ export const completionOptionsSchema = z.object({
4747
topK: z.number().optional(),
4848
stop: z.array(z.string()).optional(),
4949
n: z.number().optional(),
50+
reasoning: z.boolean().optional(),
51+
reasoningBudgetTokens: z.number().optional(),
5052
});
5153
export type CompletionOptions = z.infer<typeof completionOptionsSchema>;
5254

55+
export const cacheBehaviorSchema = z.object({
56+
cacheSystemMessage: z.boolean().optional(),
57+
cacheConversation: z.boolean().optional(),
58+
})
59+
export type CacheBehavior = z.infer<typeof cacheBehaviorSchema>;
60+
5361
export const embedOptionsSchema = z.object({
5462
maxChunkSize: z.number().optional(),
5563
maxBatchSize: z.number().optional(),
@@ -77,6 +85,7 @@ const baseModelFields = {
7785
roles: modelRolesSchema.array().optional(),
7886
capabilities: modelCapabilitySchema.array().optional(),
7987
defaultCompletionOptions: completionOptionsSchema.optional(),
88+
cacheBehavior: cacheBehaviorSchema.optional(),
8089
requestOptions: requestOptionsSchema.optional(),
8190
embedOptions: embedOptionsSchema.optional(),
8291
chatOptions: chatOptionsSchema.optional(),

0 commit comments

Comments
 (0)