[PR #3067] [MERGED] Enable include_reasoning in request #4208

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

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/3067
Author: @timothycarambat
Created: 1/30/2025
Status: Merged
Merged: 1/30/2025
Merged by: @timothycarambat

Base: masterHead: 3065-open-router-reasoning


📝 Commits (1)

  • eb1c3da Enable include_reasoning in request

📊 Changes

1 file changed (+72 additions, -4 deletions)

View changed files

📝 server/utils/AiProviders/openRouter/index.js (+72 -4)

📄 Description

Pull Request Type

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

Relevant Issues

resolves #3065

What is in this change?

  • adds include_reasoning specific parameter to the OpenRouter request

Additional Information

  • Validated the model returns thoughts in a compliant way with DeepSeek-R1 with and without streaming enabled.
  • Validated the inclusion of include_reasoning does not throw errors for non-thinking models like llama 3 8B with and without streaming enabled.
  • Tested reload of page persist the prompt format for thoughts as well as subsequent messaging in a chat history.

The inclusion of this parameter simply helps us retrieve this content _if it is available with no side effects.

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

Thanks @morbificagent for the early start


🔄 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/3067 **Author:** [@timothycarambat](https://github.com/timothycarambat) **Created:** 1/30/2025 **Status:** ✅ Merged **Merged:** 1/30/2025 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `3065-open-router-reasoning` --- ### 📝 Commits (1) - [`eb1c3da`](https://github.com/Mintplex-Labs/anything-llm/commit/eb1c3da2b8d33ac01b525c2be8c940cb0b758ae0) Enable `include_reasoning` in request ### 📊 Changes **1 file changed** (+72 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `server/utils/AiProviders/openRouter/index.js` (+72 -4) </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 #3065 ### What is in this change? - adds `include_reasoning` specific parameter to the OpenRouter request ### Additional Information - Validated the model returns thoughts in a compliant way with `DeepSeek-R1` **with and without** streaming enabled. - Validated the inclusion of `include_reasoning` does not throw errors for non-thinking models like llama 3 8B **with and without** streaming enabled. - Tested reload of page persist the prompt format for thoughts as well as subsequent messaging in a chat history. The inclusion of this parameter simply helps us retrieve this content _if it is available with no side effects. ### Developer Validations <!-- All of the applicable items should be checked. --> - [ ] 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 Thanks @morbificagent for the early start --- <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:22 -05:00
yindo closed this issue 2026-02-22 18:35:22 -05:00
yindo changed title from [PR #3067] Enable `include_reasoning` in request to [PR #3067] [MERGED] Enable `include_reasoning` in request 2026-06-05 15:17:23 -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#4208