From a20c57b0e852560284f063305ca0dd0143c29d63 Mon Sep 17 00:00:00 2001 From: Hk-Gosuto Date: Fri, 2 Aug 2024 03:38:46 +0000 Subject: [PATCH] fix: USE_OPENAI_ENDPOINT_FOR_ALL_MODELS authorization --- app/client/api.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/client/api.ts b/app/client/api.ts index aa054560f..42c0348c4 100644 --- a/app/client/api.ts +++ b/app/client/api.ts @@ -260,6 +260,18 @@ export function getHeaders(ignoreHeaders?: boolean) { : isAlibaba ? accessStore.alibabaApiKey : accessStore.openaiApiKey; + if (accessStore.isUseOpenAIEndpointForAllModels) { + return { + isGoogle: false, + isAzure: false, + isAnthropic: false, + isBaidu: false, + isByteDance: false, + isAlibaba: false, + apiKey: accessStore.openaiApiKey, + isEnabledAccessControl, + }; + } return { isGoogle, isAzure,