Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
🔀 fix: Assistants API File Attachments
Danny Avila5d267aa8e266
diff --git a/client/src/components/Chat/Input/Files/AttachFileChat.tsx b/client/src/components/Chat/Input/Files/AttachFileChat.tsxindex d49230ff89..6bdecca22a 100644--- a/client/src/components/Chat/Input/Files/AttachFileChat.tsx+++ b/client/src/components/Chat/Input/Files/AttachFileChat.tsx@@ -4,18 +4,21 @@ import {supportsFiles,mergeFileConfig,isAgentsEndpoint,+ isAssistantsEndpoint,fileConfig as defaultFileConfig,} from 'librechat-data-provider';import type { EndpointFileConfig } from 'librechat-data-provider';import { useGetFileConfig } from '~/data-provider';import AttachFileMenu from './AttachFileMenu';import { useChatContext } from '~/Providers';+import AttachFile from './AttachFile';function AttachFileChat({ disableInputs }: { disableInputs: boolean }) {const { conversation } = useChatContext();const conversationId = conversation?.conversationId ?? Constants.NEW_CONVO;const { endpoint, endpointType } = conversation ?? { endpoint: null };const isAgents = useMemo(() => isAgentsEndpoint(endpoint), [endpoint]);+ const isAssistants = useMemo(() => isAssistantsEndpoint(endpoint), [endpoint]);const { data: fileConfig = defaultFileConfig } = useGetFileConfig({select: (data) => mergeFileConfig(data),@@ -25,7 +28,9 @@ function AttachFileChat({ disableInputs }: { disableInputs: boolean }) {const endpointSupportsFiles: boolean = supportsFiles[endpointType ?? endpoint ?? ''] ?? false;const isUploadDisabled = (disableInputs || endpointFileConfig?.disabled) ?? false;- if (isAgents || (endpointSupportsFiles && !isUploadDisabled)) {+ if (isAssistants && endpointSupportsFiles && !isUploadDisabled) {+ return <AttachFile disabled={disableInputs} />;+ } else if (isAgents || (endpointSupportsFiles && !isUploadDisabled)) {return (<AttachFileMenudisabled={disableInputs}@@ -34,7 +39,6 @@ function AttachFileChat({ disableInputs }: { disableInputs: boolean }) {/>);}-return null;}