From e974da8a5885d2eef69cd6561c03b2ca5be71633 Mon Sep 17 00:00:00 2001 From: reanon <> Date: Sun, 27 Jul 2025 07:36:48 +0200 Subject: [PATCH] gemini penalties --- src/shared/api-schemas/google-ai.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/shared/api-schemas/google-ai.ts b/src/shared/api-schemas/google-ai.ts index dc6d4ea..5712391 100644 --- a/src/shared/api-schemas/google-ai.ts +++ b/src/shared/api-schemas/google-ai.ts @@ -78,6 +78,9 @@ export const GoogleAIV1GenerateContentSchema = z topP: z.number().min(0).max(1).optional(), topK: z.number().min(0).max(500).optional(), stopSequences: z.array(z.string().max(500)).max(5).optional(), + seed: z.number().int().optional(), + frequencyPenalty: z.number().optional().default(0), + presencePenalty: z.number().optional().default(0), thinkingConfig: z.object({ includeThoughts: z.boolean().optional(), thinkingBudget: z.union([ @@ -174,6 +177,9 @@ export const transformOpenAIToGoogleAI: APIFormatTransformer< topP: rest.top_p, topK: 40, temperature: rest.temperature, + seed: rest.seed, + frequencyPenalty: rest.frequency_penalty, + presencePenalty: rest.presence_penalty, responseModalities: responseModalities, ...(thinkingConfig ? { thinkingConfig } : {}) },