Uh oh!
There was an error while loading. Please reload this page.
Display reasoning for supported openrouter models - #563
Conversation
|
mrubens
commented
Jan 26, 2025
Awesome! Will try this out. |
mrubens
commented
Jan 26, 2025
This is awesome! Just so I'm clear - this reasoning is currently only to make it visible to the end user and doesn't actually make it into the context, right? Is that because it's too big and would blow away everything else? |
Szpadel
commented
Jan 26, 2025
AFAIK thinking tokens were not designed to be included in context. They could even degrade model performance. I believe those tokens have some special place in model context, as this is metric from one particularly complex request: This is from DeepInfra where they provide 16K of context, so as you can see this should normally overflow if model would output it internally into context space. While testing it I noticed that some request were missing cost in the UI. I'm not sure of this is regression from some of my changes or coincidence. |
sagarspatil
commented
Jan 27, 2025
You are correct. You are not supposed to use R1’s thinking context with other models. Benchmark here: https://aider.chat/2025/01/24/r1-sonnet.html |
mrubens
commented
Jan 27, 2025
Thank you both for explaining! |
Description
Introduced way to display model reasoning for compatible models. For now only openrouter is implemented.
It displays current reasoning, and hides it when content response is available.
Block is limited in height and auto scrolls.
Because reasoning might take long time, it provides better user feedback and allows better insights into model pitfalls.
Type of change
How Has This Been Tested?
Checklist:
Additional context
Related Issues
Reviewers
Important
Adds reasoning display for OpenRouter models, including backend handling and UI components for reasoning data.
include_reasoningparameter toOpenRouterChatCompletionParamsinopenrouter.tsto include reasoning in responses.createMessage()inopenrouter.tsto yield reasoning chunks.Cline.tsby handling reasoning chunks inattemptApiRequest().ReasoningBlockcomponent inReasoningBlock.tsxto display reasoning with auto-scroll and collapse functionality.ChatRow.tsxto includeReasoningBlockfor reasoning messages.ApiStreamReasoningChunktostream.tsfor handling reasoning data.ClineMessageinExtensionMessage.tsto includereasoningfield.This description was created by
for c660706. It will automatically update as commits are pushed.