[GH-ISSUE #4167] [BUG]: Reasoning (thinking) models response parsing #2651

Closed
opened 2026-02-22 18:30:36 -05:00 by yindo · 2 comments
Owner

Originally created by @Fl0p on GitHub (Jul 17, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4167

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

Trying to use several reasoning models with AnythingLLM desktop App .
No one succeeded

Grok4 (with openRouter) almost each time stuck on <Thinking...>
Image

Gemmini2.5Pro (with openRouter) almost each time stuck in the middle of reasoning
Image

OpenAI o1Pro (with openRouter) just stuck each time
Image

OpenAI o1Pro (Direct) not supported API
Image

Are there known steps to reproduce?

  • Just try to use any reasoning(thinking) models.
  • observe the result
Originally created by @Fl0p on GitHub (Jul 17, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4167 ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? Trying to use several reasoning models with AnythingLLM desktop App . No one succeeded Grok4 (with openRouter) almost each time stuck on <Thinking...> <img width="989" height="804" alt="Image" src="https://github.com/user-attachments/assets/b50efd2c-5c01-41d6-84f7-4b673bf195fd" /> Gemmini2.5Pro (with openRouter) almost each time stuck in the middle of reasoning <img width="1079" height="853" alt="Image" src="https://github.com/user-attachments/assets/145db2f1-b58f-4030-8fe4-6563b37dd1a9" /> OpenAI o1Pro (with openRouter) just stuck each time <img width="626" height="277" alt="Image" src="https://github.com/user-attachments/assets/7720c970-e713-459c-b41f-48e28e112344" /> OpenAI o1Pro (Direct) not supported API <img width="768" height="285" alt="Image" src="https://github.com/user-attachments/assets/02f16dbf-56cf-4f4f-aaa2-abafa72bcb83" /> ### Are there known steps to reproduce? - Just try to use any reasoning(thinking) models. - observe the result
yindo added the possible bug label 2026-02-22 18:30:36 -05:00
yindo closed this issue 2026-02-22 18:30:37 -05:00
Author
Owner

@Fl0p commented on GitHub (Jul 17, 2025):

BTW perplexity works fine

Image
@Fl0p commented on GitHub (Jul 17, 2025): BTW perplexity works fine <img width="1141" height="1014" alt="Image" src="https://github.com/user-attachments/assets/db23fa58-631d-453a-a252-004379c1d9e7" />
Author
Owner

@timothycarambat commented on GitHub (Jul 17, 2025):

This is because we have a forced timeout limit for OpenRouter because they host some models that never return a close response. In the LLM Preferences for OpenRouter, expand the advanced options part and change it to something high like 5000.

What is happeneing is we are closing the response early since it goes more than 500ms between tokens so we assume the stream closed since OR wont tell us if it did or not. So in this case, you never get the ending <think> tag.

This stream/timeout thing does not apply to every provider/model, but its not clear why some do and some dont return a close message. If we dont force it closed you cannot send another prompt since the stream is assumed to still be open. That is why that even exists

@timothycarambat commented on GitHub (Jul 17, 2025): This is because we have a forced timeout limit for OpenRouter because they host _some_ models that never return a close response. In the LLM Preferences for OpenRouter, expand the advanced options part and change it to something high like 5000. What is happeneing is we are closing the response early since it goes more than 500ms between tokens so we assume the stream closed since OR wont tell us if it did or not. So in this case, you never get the ending `<think>` tag. This stream/timeout thing does not apply to every provider/model, but its not clear why some do and some dont return a close message. If we dont force it closed you cannot send another prompt since the stream is assumed to still be open. That is why that even exists
yindo changed title from [BUG]: Reasoning (thinking) models response parsing to [GH-ISSUE #4167] [BUG]: Reasoning (thinking) models response parsing 2026-06-05 14:47:46 -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#2651