mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-29 05:36:13 +01:00
📤 fix: Show Proper Upload Options for Azure and Agent Endpoints (#11081)
* fix: only show upload to provider for azureOpenAi when use responses api is true * fix: model_parameters not available on first load so Upload Image incorrectly shown - now we query if not populated * test: update tests for new azureOpenAI Responses API logic * chore: correct order of headers in OAuth request to ensure proper content type is set * fix: add useResponsesApi prop to AttachFileMenu and DragDropModal components --------- Co-authored-by: Danny Avila <danny@librechat.ai>
This commit is contained in:
parent
4fe223eedd
commit
7183223e59
9 changed files with 131 additions and 11 deletions
|
|
@ -46,6 +46,7 @@ interface AttachFileMenuProps {
|
|||
conversationId: string;
|
||||
endpointType?: EModelEndpoint;
|
||||
endpointFileConfig?: EndpointFileConfig;
|
||||
useResponsesApi?: boolean;
|
||||
}
|
||||
|
||||
const AttachFileMenu = ({
|
||||
|
|
@ -55,6 +56,7 @@ const AttachFileMenu = ({
|
|||
endpointType,
|
||||
conversationId,
|
||||
endpointFileConfig,
|
||||
useResponsesApi,
|
||||
}: AttachFileMenuProps) => {
|
||||
const localize = useLocalize();
|
||||
const isUploadDisabled = disabled ?? false;
|
||||
|
|
@ -117,9 +119,13 @@ const AttachFileMenu = ({
|
|||
currentProvider = Providers.OPENROUTER;
|
||||
}
|
||||
|
||||
const isAzureWithResponsesApi =
|
||||
currentProvider === EModelEndpoint.azureOpenAI && useResponsesApi;
|
||||
|
||||
if (
|
||||
isDocumentSupportedProvider(endpointType) ||
|
||||
isDocumentSupportedProvider(currentProvider)
|
||||
isDocumentSupportedProvider(currentProvider) ||
|
||||
isAzureWithResponsesApi
|
||||
) {
|
||||
items.push({
|
||||
label: localize('com_ui_upload_provider'),
|
||||
|
|
@ -211,6 +217,7 @@ const AttachFileMenu = ({
|
|||
provider,
|
||||
endpointType,
|
||||
capabilities,
|
||||
useResponsesApi,
|
||||
setToolResource,
|
||||
setEphemeralAgent,
|
||||
sharePointEnabled,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue