[Enhancement]: Feature: Add citation tooltips and source menu for Perplexity model (based on existing OpenAI implementation) #7879
Replies: 3 comments 2 replies
-
Looks good to me, PR welcome! |
Beta Was this translation helpful? Give feedback.
-
@danny-avila With the latest updates, we are unable to retrieve the “citations” and “search_results” properties from Perplexity's raw API response, which prevents us from obtaining these elements. Another issue is that the tools can no longer be activated with Perplexity, which prevents the creation of the ‘attachments’ property required for displaying the source “tabs.” Do you have any ideas on how to solve the first issue in the first instance? |
Beta Was this translation helpful? Give feedback.
-
+1 for this one. I am using Perplexity Sonar Pro through OpenRouter. https://openrouter.ai/docs/features/web-search#parsing-web-search-results |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What features would you like to see added?
Description:
This enhancement is related to the discussion: #7038
Following the recent feature that introduced citation tooltips and a source menu above the result text for responses generated by the OpenAI model, we propose extending the same functionality to the Perplexity model.
The implementation would aim to:
Example Use Case
User asks:
"What is Glanum?"
Perplexity responds:

✅ Why This Feature?
Increases trust and transparency in AI-generated responses
Mimics Perplexity’s native UX for better familiarity
Helps users verify and explore information more easily
✅ What we're going to use to implement this feature ?
After investigating the current implementation for OpenAI, we found that many of the frontend elements involved are generic and reusable.
Key components we plan to leverage include:
client/src/components/Chat/Messages/Content/Markdown.tsx
client/src/components/Web – for rendering web source previews and managing tooltips and source menus
The Perplexity model's output will be adapted to fit the expected structure where needed, and we'll reuse these components to maintain code consistency and avoid duplication.
✅What we're going to impact
To support this feature, we will make backend modifications in the following areas:
api/server/controllers/agents/request.js
Files under api/server/services/Endpoints/
These changes will focus on adapting and formatting the result returned by the Perplexity LLM to match the frontend's expected structure. This includes ensuring that source references are clearly structured so they can be correctly rendered by the existing citation and tooltip components on the client side.
Beta Was this translation helpful? Give feedback.
All reactions