Pass baseURL to Gemini API if googleGeminiBaseUrl is set (#2776)

This commit is contained in:
Chris Estreich 2025-04-18 19:25:42 -07:00 committed by GitHub
parent b8b90737fa
commit c10600e354
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
"roo-cline": patch
---
Allow custom URLs for Gemini provider

View file

@ -30,6 +30,9 @@ export class GeminiHandler extends BaseProvider implements SingleCompletionHandl
model,
contents: messages.map(convertAnthropicMessageToGemini),
config: {
httpOptions: this.options.googleGeminiBaseUrl
? { baseUrl: this.options.googleGeminiBaseUrl }
: undefined,
thinkingConfig,
maxOutputTokens,
temperature: this.options.modelTemperature ?? 0,