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 e9dd795f9a
commit d6dbe357fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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()
}