fix: add base url for gemini (#4109)

This commit is contained in:
Chen Tao 2025-03-29 21:35:04 +08:00 committed by GitHub
parent e84cfafe64
commit a1e22768a0

View File

@ -54,7 +54,7 @@ export default class GeminiProvider extends BaseProvider {
super(provider)
this.sdk = new GoogleGenerativeAI(this.apiKey)
/// this sdk is experimental
this.imageSdk = new GoogleGenAI({ apiKey: this.apiKey })
this.imageSdk = new GoogleGenAI({ apiKey: this.apiKey, httpOptions: { baseUrl: this.getBaseURL() } })
this.requestOptions = {
baseUrl: this.getBaseURL()
}