Skip to content

feat: remove reasoning text from context#1944

Closed
timhok wants to merge 1 commit intoHKUDS:mainfrom
timhok:patch-2
Closed

feat: remove reasoning text from context#1944
timhok wants to merge 1 commit intoHKUDS:mainfrom
timhok:patch-2

Conversation

@timhok
Copy link
Copy Markdown

@timhok timhok commented Mar 12, 2026

Reasoning tokens, produced by thinking models, can be discarded by engines, but still may contribute to overall token and context window usage.
Its generally recommended to discard them.

Proposed change automatically removes "reasoning_content" and "thinking_blocks" parts from context on each turn.
Might save great amount of tokens usage and costs for user.

I found out about their presence in nanobot context while debugging llm requests on unrelated issue.

Remove "reasoning_content" and "thinking_blocks" usually produced by thinking models
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant