Skip to content

Conversation

Akanksha256742
Copy link

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.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ✅ ] This change requires a documentation update
  • Translation update

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.

  • [✅ ] My code adheres to this project's style guidelines
  • [✅] I have performed a self-review of my own code
  • [✅] I have commented in any complex areas of my code
  • [✅] I have made pertinent documentation changes
  • [✅] My changes do not introduce new warnings
  • [✅] I have written tests demonstrating that my changes are effective or that my feature works
  • [✅] Local unit tests pass with my changes
  • [✅] Any changes dependent on mine have been merged and published in downstream modules.
  • [✅] A pull request for updating the documentation has been submitted.

…omponents

- Introduced a new 'native' mode for web search in the configuration file.
- Updated API route to handle the new web search mode.
- Modified ToolsDropdown and WebSearch components to support toggling web search based on the new mode.
- Enhanced state management for conversation updates when in native mode.
@Akanksha256742
Copy link
Author

@danny-avila Can you review this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant