Skip to content

Commit 8b370d4

Browse files
authored
Merge pull request #3370 from krishna2206/fix/gemini-ai-error
fix(selectAIProvider): add authorization header for Gemini provider
2 parents 1ed941b + 01c0b46 commit 8b370d4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/server/src/utils/ai/select-ai-provider.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ export function selectAIProvider(config: { apiUrl: string; apiKey: string }) {
7171
return createOpenAICompatible({
7272
name: "gemini",
7373
baseURL: config.apiUrl,
74-
queryParams: { key: config.apiKey },
75-
headers: {},
74+
headers: {
75+
Authorization: `Bearer ${config.apiKey}`,
76+
},
7677
});
7778
case "custom":
7879
return createOpenAICompatible({

0 commit comments

Comments
 (0)