From 70c769535cb5781a6b5d7ac87a2020aff35a33ea Mon Sep 17 00:00:00 2001 From: daniel-lxs Date: Fri, 12 Sep 2025 17:27:05 -0500 Subject: [PATCH] fix: use proper Content[] type instead of any[] for type safety Address PR review feedback by using the correct Content type from the Gemini SDK for the contents array in generateImage method --- src/api/providers/gemini.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api/providers/gemini.ts b/src/api/providers/gemini.ts index a867d212a3..d92a7f4fd6 100644 --- a/src/api/providers/gemini.ts +++ b/src/api/providers/gemini.ts @@ -5,6 +5,7 @@ import { type GenerateContentParameters, type GenerateContentConfig, type GroundingMetadata, + type Content, } from "@google/genai" import type { JWTInput } from "google-auth-library" @@ -368,7 +369,7 @@ export class GeminiHandler extends BaseProvider implements SingleCompletionHandl } // Prepare the content for generation - const contents: any[] = [] + const contents: Content[] = [] if (inputImage) { // For image editing mode, include both text and image