✨ feat: Add native web search mode configuration and update related c… #9708
+65
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements a new "native" web search mode for LibreChat that allows web search to be controlled directly through conversation parameters without requiring API keys. When webSearch.mode: 'native' is configured, clicking the "Web Search" badge toggles the web_search parameter in the right-side panel, enabling web search functionality without the need for external API configurations or user-provided keys.
Key Features:
Native Web Search Mode: Toggle web search via conversation parameters instead of API-based services
Simplified UI: Removes settings icon when in native mode for cleaner interface
Parameter Integration: Web search state persists in conversation object and right-side parameter panel
Backward Compatibility: Existing API-based web search functionality remains unchanged
Badge Visibility Control: Smart badge display logic based on mode and authentication status
Change Type
✅ New feature (non-breaking change which adds functionality)
✅ Enhancement (improves existing functionality)
Please delete any irrelevant options.
Testing
The feature has been tested for:
✅ ESLint compliance (all modified files pass linting)
✅ Native mode toggle functionality
✅ Parameter persistence in conversation object
✅ Badge visibility logic across different authentication states
✅ Settings icon hiding in native mode
✅ Backward compatibility with existing API-based web search
✅ Docker container compatibility
Test Configuration:
Environment: Docker containerized deployment
Authentication: Tested with and without API keys
Modes: Both native and traditional API-based modes tested
UI Components: Badge visibility, parameter panel integration, settings dialog behavior
Checklist
Please delete any irrelevant options.