You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Reasoning content not preserved across turns for generic OpenRouter provider, causes repeated/looping thinking (e.g. poolside/laguna-s-2.1) #1107
When using a reasoning-capable model through the generic OpenRouter provider (not Ollama, not DeepSeek-native), the reasoning/thinking content from previous assistant turns is not sent back to the model on subsequent requests. As a result, the model repeatedly re-derives the same reasoning from scratch on every turn instead of building on prior thinking. In long agentic tasks this causes visible repeated/looping chains of thought (the same reasoning text, near-verbatim, appears again and again across turns), wasting several minutes per turn and sometimes stalling the task entirely.
I can see the thinking blocks are actually captured and displayed in the UI, but based on the repeated content it looks like they are not being included in the request payload sent back to the model on the next turn.
This looks related to #201 (DeepSeek reasoning_content not passed back) and to the upstream Roo Code issue RooCodeInc/Roo-Code#9125 ("OpenRouter provider supports reasoning_details"), but is specifically about the generic OpenRouter provider path rather than a single hardcoded model integration.
To Reproduce
Create an OpenRouter provider profile with a reasoning model that supports interleaved/preserved thinking, e.g. poolside/laguna-s-2.1.
Enable reasoning/thinking if there's a toggle for it.
Run a multi-step agentic task (several tool calls / turns).
Observe the "thinking" content in each new assistant turn — it re-derives the same reasoning already produced in a previous turn, sometimes near-verbatim, instead of continuing from it.
Activity