Problem Statement
In #607, default behavior is applied to prevent invalid ToolUse blocks from entering the messages array.
This behavior is applied by default. Instead it should be more configurable living in an interface like ConversationManager or applied in some default hook pool.
Additionally, after encountering max_tokens we throw MaxTokensReachedException. We should sync with other stop reasons and also throw for things like guardrail_intervened and content_filtered
Proposed Solution
No response
Use Case
Customers should have configurability for their handling of max_tokens.
Alternatives Solutions
No response
Additional Context
No response