diff --git a/web-app/src/containers/ChatInput.tsx b/web-app/src/containers/ChatInput.tsx index 0fa7a4b32e..86f7e6b19a 100644 --- a/web-app/src/containers/ChatInput.tsx +++ b/web-app/src/containers/ChatInput.tsx @@ -107,9 +107,15 @@ const ChatInput = ({ model, className, initialMessage }: ChatInputProps) => { if (selectedProvider === 'llamacpp') { const hasLocalMmproj = await checkMmprojExists(selectedModel.id) setHasMmproj(hasLocalMmproj) - } else { - // For non-llamacpp providers, only check vision capability + } + // For non-llamacpp providers, only check vision capability + else if ( + selectedProvider !== 'llamacpp' && + selectedModel?.capabilities?.includes('vision') + ) { setHasMmproj(true) + } else { + setHasMmproj(false) } } catch (error) { console.error('Error checking mmproj:', error) @@ -119,7 +125,7 @@ const ChatInput = ({ model, className, initialMessage }: ChatInputProps) => { } checkMmprojSupport() - }, [selectedModel?.id, selectedProvider]) + }, [selectedModel?.capabilities, selectedModel?.id, selectedProvider]) // Check if there are active MCP servers const hasActiveMCPServers = connectedServers.length > 0 || tools.length > 0 @@ -535,29 +541,41 @@ const ChatInput = ({ model, className, initialMessage }: ChatInputProps) => { )} {/* File attachment - show only for models with mmproj */} {hasMmproj && ( -
{t('visions')}
+