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
EstimateMessageTokens (internal/conversation/tokenizer.go) adds both msg.Reasoning and msg.ReasoningContent, but the agent stores the same string in both fields: buildAssistantMessage in internal/agent/loop/agent_streaming.go and BuildAgentMessagesFromEntries in internal/conversation/domain/agent_messages.go set both to one value. Every reasoning token is counted twice in the compaction trigger, the rollover gate and the status bar's context estimate. Split out of #1586.
Steps to Reproduce
Build an assistant sdk.Message with Reasoning and ReasoningContent both pointing at the same 4000-char string.
Call TokenizerService.EstimateMessageTokens on it.
Expected Behavior
About 1000 tokens for the reasoning.
Actual Behavior
About 2000. On the run in #1586, 240k chars of reasoning through the first compaction added ~60k phantom tokens to the estimate.
Activity
inference-gateway-releaser commentedon Oct 20, 2026
🎉 This issue has been resolved in version 0.234.0 🎉
The release is available on:
Your semantic-release bot 📦🚀