Skip to content

Fix: count all tool tokens in budget calculation including deferred tools (#4992)#4996

Draft
DonJayamanne wants to merge 1 commit intomainfrom
don/diplomatic-lobster
Draft

Fix: count all tool tokens in budget calculation including deferred tools (#4992)#4996
DonJayamanne wants to merge 1 commit intomainfrom
don/diplomatic-lobster

Conversation

@DonJayamanne
Copy link
Copy Markdown
Collaborator

Deferred tools (defer_loading: true) still count against the API context window. The 3/30 change (#4834) excluded them from toolTokens, causing the message budget to be ~31K tokens too generous and leading to context_length_exceeded errors followed by summarization failures ("No messages provided").

@DonJayamanne DonJayamanne self-assigned this Apr 6, 2026
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