diff --git a/app/client/api.ts b/app/client/api.ts index 736f2a670..19f4aa53f 100644 --- a/app/client/api.ts +++ b/app/client/api.ts @@ -180,7 +180,7 @@ export function getHeaders(ignoreHeaders?: boolean) { }; } const isAzure = accessStore.provider === ServiceProvider.Azure; - let authHeader = isAzure ? "api-key" : "Authorization"; + let authHeader = "Authorization"; const apiKey = isGoogle ? accessStore.googleApiKey : isAzure @@ -195,6 +195,7 @@ export function getHeaders(ignoreHeaders?: boolean) { if (validString(apiKey)) { authHeader = isGoogle ? "x-goog-api-key" : authHeader; headers[authHeader] = makeBearer(apiKey); + if (isAzure) headers["api-key"] = makeBearer(apiKey); } else if ( accessStore.enabledAccessControl() && validString(accessStore.accessCode) diff --git a/app/components/settings.tsx b/app/components/settings.tsx index 17bb60759..69c5556d2 100644 --- a/app/components/settings.tsx +++ b/app/components/settings.tsx @@ -1053,7 +1053,7 @@ export function Settings() { accessStore.update( (access) => @@ -1112,7 +1112,7 @@ export function Settings() { accessStore.update( (access) => diff --git a/app/store/access.ts b/app/store/access.ts index 18d91fe28..63aaf3330 100644 --- a/app/store/access.ts +++ b/app/store/access.ts @@ -29,7 +29,7 @@ const DEFAULT_ACCESS_STATE = { // azure azureUrl: "", azureApiKey: "", - azureApiVersion: "2023-08-01-preview", + azureApiVersion: "2024-02-15-preview", // google ai studio googleBaseUrl: "", @@ -114,7 +114,7 @@ export const useAccessStore = createPersistStore( googleApiKey: string; }; state.openaiApiKey = state.token; - state.azureApiVersion = "2023-08-01-preview"; + state.azureApiVersion = "2024-02-15-preview"; state.googleApiKey = state.token; }