[PR #3620] [MERGED] handling of citations in openRouter provider #3581 #4337

Closed
opened 2026-02-22 18:35:37 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/3620
Author: @rudimichal
Created: 4/9/2025
Status: Merged
Merged: 4/15/2025
Merged by: @timothycarambat

Base: masterHead: 3581-citations-in-openrouter


📝 Commits (4)

  • ef61664 handling of citations in openRouter provider #3581
  • d21370c Update pplx enrichToken function comment
  • e746d03 remove console log
  • f7050bb Merge branch 'master' into 3581-citations-in-openrouter

📊 Changes

2 files changed (+68 additions, -18 deletions)

View changed files

📝 server/utils/AiProviders/openRouter/index.js (+55 -9)
📝 server/utils/AiProviders/perplexity/index.js (+13 -9)

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #3581

What is in this change?

If OpenRouter returns citations they are used to enrich tokens with urls (just like it's already implemented in Perplexity provider). Additionally, all citations are appended to model response.

Screenshot 2025-04-09 at 11 40 55 AM

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/3620 **Author:** [@rudimichal](https://github.com/rudimichal) **Created:** 4/9/2025 **Status:** ✅ Merged **Merged:** 4/15/2025 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `3581-citations-in-openrouter` --- ### 📝 Commits (4) - [`ef61664`](https://github.com/Mintplex-Labs/anything-llm/commit/ef616648f5771f1c421dc078f30cb7f5d35532b3) handling of citations in openRouter provider #3581 - [`d21370c`](https://github.com/Mintplex-Labs/anything-llm/commit/d21370c071c7f141f49f11297762dcb206fcb549) Update pplx enrichToken function comment - [`e746d03`](https://github.com/Mintplex-Labs/anything-llm/commit/e746d0339ad438c6dd62214f66d691d3248e315f) remove console log - [`f7050bb`](https://github.com/Mintplex-Labs/anything-llm/commit/f7050bbdd626636b84d795e5735127492970bcb6) Merge branch 'master' into 3581-citations-in-openrouter ### 📊 Changes **2 files changed** (+68 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `server/utils/AiProviders/openRouter/index.js` (+55 -9) 📝 `server/utils/AiProviders/perplexity/index.js` (+13 -9) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [x] ✨ feat - [ ] 🐛 fix - [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> resolves #3581 ### What is in this change? If OpenRouter returns citations they are used to enrich tokens with urls (just like it's already implemented in Perplexity provider). Additionally, all citations are appended to model response. <img width="1098" alt="Screenshot 2025-04-09 at 11 40 55 AM" src="https://github.com/user-attachments/assets/ed69ef2a-e458-419f-8bf6-1ca62f3cfd9f" /> ### Developer Validations <!-- All of the applicable items should be checked. --> - [x] I ran `yarn lint` from the root of the repo & committed changes - [ ] Relevant documentation has been updated - [x] I have tested my code functionality - [x] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:35:37 -05:00
yindo closed this issue 2026-02-22 18:35:37 -05:00
yindo changed title from [PR #3620] handling of citations in openRouter provider #3581 to [PR #3620] [MERGED] handling of citations in openRouter provider #3581 2026-06-05 15:18:04 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4337