Skip to content

Commit 4859111

Browse files
committed
fix: Fix an issue where gemini provider cannot work without response format specified
1 parent a2eb0a2 commit 4859111

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/providers/GeminiProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class GeminiProvider implements Provider {
3636
const baseUrl = config.baseUrl ?? 'https://generativelanguage.googleapis.com/v1beta';
3737
if (config.mode === 'direct') {
3838
this.endpoint =
39-
config.responseFormat === 'stream'
39+
this.responseFormat === 'stream'
4040
? `${baseUrl}/models/${config.model}:streamGenerateContent?alt=sse&key=${config.apiKey || ''}`
4141
: `${baseUrl}/models/${config.model}:generateContent?key=${config.apiKey || ''}`;
4242
} else if (config.mode === 'proxy') {

0 commit comments

Comments
 (0)