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
This commit is contained in:
daniel-lxs 2025-09-12 17:27:05 -05:00 committed by Hannes Rudolph
parent 68a7c8390b
commit 70c769535c

View file

@ -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