fix: USE_OPENAI_ENDPOINT_FOR_ALL_MODELS authorization

This commit is contained in:
Hk-Gosuto 2024-08-02 03:38:46 +00:00
parent 52d5e963dd
commit a20c57b0e8

View File

@ -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,