Skip to content

feat: Add Perplexity citation support#11276

Closed
dbirks wants to merge 1 commit intodanny-avila:mainfrom
dbirks:feat/add-perplexity-citations
Closed

feat: Add Perplexity citation support#11276
dbirks wants to merge 1 commit intodanny-avila:mainfrom
dbirks:feat/add-perplexity-citations

Conversation

@dbirks
Copy link
Copy Markdown

@dbirks dbirks commented Jan 9, 2026

Pull Request Template

Summary

Taking a shot at adding citations for the Perplexity responses. Tried to take some design inspiration from the https://perplexity.ai site.

Screenshot From 2026-01-09 00-45-33

Please feel free to push to either of my branches to fix stuff up if that makes anything easier. Thanks!

Change Type

Please delete any irrelevant options.

  • New feature (non-breaking change which adds functionality)

Testing

# Setup librechat-agents
gh pr checkout https://github.com/danny-avila/agents/pull/43
npm i
npm run build
npm link

# Setup LibreChat
gh pr checkout https://github.com/danny-avila/LibreChat/pull/XXX
npm i
npm link @librechat/agents
npm run frontend

# Run
docker start chat-mongodb
npm run backend

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
  • 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

- Add PerplexityCitation and PerplexitySourceHovercard components
- Show domain names (e.g., "britannica.com +2") instead of titles
- Display stacked favicons and source count in hovercards
- Add citation extraction service for Perplexity API responses
- Pass endpoint/model props through all rendering paths:
  - ContentParts, Part, Text, Markdown chain
  - SearchContent for agents
  - ContentRender for perplexity endpoint
- Detect Perplexity via endpoint or model name (sonar/perplexity)
- Add i18n support for sources count
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.

2 participants