📎 fix: Document Uploads for Custom Endpoints (#10336)

* Fixed upload to provider for custom endpoints + unit tests

* fix: add support back for agents to be able to use Upload to Provider with supported providers

* ci: add test for agents endpoint still recognizing document supported providers

* chore: address ESLint suggestions

* Improved unit tests

* Linting error on unit tests fixed

---------

Co-authored-by: Dustin Healy <dustinhealy1@gmail.com>
This commit is contained in:
Max Sanna 2025-11-04 19:40:24 +01:00 committed by GitHub
parent ce7e6edad8
commit 14e4941367
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 728 additions and 3 deletions

View file

@ -57,7 +57,7 @@ const DragDropModal = ({ onOptionSelect, setShowModal, files, isVisible }: DragD
const currentProvider = provider || endpoint;
// Check if provider supports document upload
if (isDocumentSupportedProvider(currentProvider || endpointType)) {
if (isDocumentSupportedProvider(endpointType) || isDocumentSupportedProvider(currentProvider)) {
const isGoogleProvider = currentProvider === EModelEndpoint.google;
const validFileTypes = isGoogleProvider
? files.every(