Skip to content

Feature/AIA-2066 Tavily always on and AIA-1805 - Tavily Sources in search results#103

Closed
paychex-joser wants to merge 9 commits intorelease/v0.8.0.6-payxfrom
feature/AIA-2066-tavily-always-on
Closed

Feature/AIA-2066 Tavily always on and AIA-1805 - Tavily Sources in search results#103
paychex-joser wants to merge 9 commits intorelease/v0.8.0.6-payxfrom
feature/AIA-2066-tavily-always-on

Conversation

@paychex-joser
Copy link
Copy Markdown

I was originally planning on having these changes in two different pull requests, but it looks like the search results changes were still in the branch that I started to work on the Tavily always on search functionality. Rather than trying to figure out how to safely remove that functionality for two different PR's I'm just putting them in this single one.

This change makes it so that if a user expands the search section for A Tavily search, the content from the results is rendered in markdown, allowing the user to click on links to the websites the information was source from.

This change also include the functionality to have Tavily constantly enabled. This is done by having Tavily enabled by default and then hiding it as an option for MCP server selection. So even though it might look as though the option to use Tavily is gone, it's actually on all the time in the background now.

I have tested these changes, but I'd request someone else on the team review and test them as well.

…ng as desired. After a decent amount of troubleshooting, was able to isolate the issue and reproduce the expected functionality.
Comment thread librechat.n1.yml
Comment thread librechat.n2a.yml
Comment thread librechat.prod.yml
Comment thread client/src/components/Chat/Messages/Content/TavilySources.tsx Outdated

// Auto-select MCP servers configured with startup: true for new conversations
useEffect(() => {
if (mcpValues.length > 0) return; // Already has selections
Copy link
Copy Markdown
Collaborator

@paychex-inder paychex-inder Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a user selects an MCP other than Tavily, then this mcpValues.length > 0 logic, would it conflict with the other MCP and may not enable Tavily?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran this question by Copilot and it said that with how the code is configured, it will function as desired, since this check is ran at the creation of a new conversation, meaning that no MCP will have been selected at that point and it will add Tavily at that time.... Here is the full response from Copilot.

✅ New conversation starts:
Auto-select runs → Tavily is selected
mcpValues = ["Internet Search (Tavily)"]
User doesn't see Tavily in the MCP selection menu (hidden)

✅ User adds another visible MCP server:
User selects "OtherServer" from the menu
mcpValues = ["Internet Search (Tavily)", "OtherServer"]
Tavily remains in the background (invisible to user)
Both servers are active

✅ User removes all VISIBLE servers:
User deselects "OtherServer" from the menu
Tavily cannot be deselected (not shown in UI)
mcpValues = ["Internet Search (Tavily)"]
mcpValues.length = 1 → auto-select doesn't run
Tavily continues working in the background

Key Point:
Since Tavily is hidden from the UI and auto-selected initially, mcpValues will never actually be empty again after the first conversation loads. The mcpValues.length > 0 check means:

Once Tavily is auto-selected, it persists
Users can add other servers alongside it
Users cannot remove Tavily (it's invisible to them)
Tavily is effectively "always on" as intended

{localize('com_sources_tab_images')} ({parsedData.images.length})
</div>
<div className="grid grid-cols-2 gap-2 md:grid-cols-3">
{parsedData.images.slice(0, 6).map((image, index) => (
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is Tavily configured to return images? Not sure if this section is necessary otherwise.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it returns images of the website/search results.
image

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the model then using those images? Just wondering if we want to be processing multiple images when we do search if it's not necessary

Comment thread client/src/hooks/MCP/__tests__/useMCPSelect.test.tsx Fixed
Comment thread client/src/hooks/MCP/__tests__/useMCPSelect.test.tsx Fixed
Comment thread client/src/hooks/MCP/__tests__/useMCPSelect.test.tsx Fixed
Comment thread client/src/hooks/MCP/__tests__/useMCPSelect.test.tsx Fixed
Comment thread client/src/hooks/MCP/__tests__/useMCPSelect.test.tsx Fixed
… adding in hover help for the score related to Tavily Search Results.
@paychex-joser paychex-joser changed the base branch from release/v0.8.0.6-payx to develop February 19, 2026 15:00
@paychex-joser paychex-joser changed the base branch from develop to release/v0.8.0.6-payx February 19, 2026 15:06
@paychex-joser paychex-joser changed the base branch from release/v0.8.0.6-payx to develop February 19, 2026 15:16
@paychex-joser paychex-joser changed the base branch from develop to release/v0.8.0.6-payx February 19, 2026 15:25
@paychex-joser
Copy link
Copy Markdown
Author

Closing PR since we merged the changes into develop which was at a later version of LibreChat

@paychex-joser paychex-joser deleted the feature/AIA-2066-tavily-always-on branch March 11, 2026 18:01
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.

4 participants