Skip to content

Commit 9f22c9f

Browse files
committed
Pass baseURL to Gemini API if googleGeminiBaseUrl is set
1 parent b8b9073 commit 9f22c9f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/api/providers/gemini.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,18 @@ export class GeminiHandler extends BaseProvider implements SingleCompletionHandl
3030
model,
3131
contents: messages.map(convertAnthropicMessageToGemini),
3232
config: {
33+
httpOptions: this.options.googleGeminiBaseUrl
34+
? { baseUrl: this.options.googleGeminiBaseUrl }
35+
: undefined,
3336
thinkingConfig,
3437
maxOutputTokens,
3538
temperature: this.options.modelTemperature ?? 0,
3639
systemInstruction: systemPrompt,
3740
},
3841
}
3942

43+
console.log("params", params)
44+
4045
const result = await this.client.models.generateContentStream(params)
4146

4247
let lastUsageMetadata: GenerateContentResponseUsageMetadata | undefined

0 commit comments

Comments
 (0)