🔧 fix: legacy file upload UX checks in processFileURL and processAgentFileUpload

This commit is contained in:
Atef Bellaaj 2026-04-12 22:12:20 +02:00 committed by Danny Avila
parent debb6e80e8
commit 7384947017

View file

@ -319,8 +319,7 @@ const processFileURL = async ({
};
const resolveDefaultUploadLLMDeliveryPath = ({ file, endpointConfig, fileConfig }) => {
const isLegacyFileUploadUX =
endpointConfig?.legacyFileUploadUX === true || fileConfig?.legacyFileUploadUX === true;
const isLegacyFileUploadUX = endpointConfig?.legacyFileUploadUX === true;
if (isLegacyFileUploadUX) {
return 'provider';
}
@ -589,7 +588,7 @@ const processAgentFileUpload = async ({ req, res, metadata }) => {
const endpointConfig = getEndpointFileConfig({ fileConfig, endpoint });
if (agent_id && !tool_resource && !messageAttachment) {
if (endpointConfig?.legacyFileUploadUX === true || fileConfig?.legacyFileUploadUX === true) {
if (endpointConfig?.legacyFileUploadUX === true) {
throw new Error('No tool resource provided for agent file upload');
}
}