fix: Extend cases where truncation triggers (#10607)

Co-authored-by: Calvin Smith <calvin@all-hands.dev>
This commit is contained in:
Calvin Smith 2025-08-25 13:59:41 -05:00 committed by GitHub
parent d9ac2faff6
commit 408af4e012
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -895,8 +895,10 @@ class AgentController:
'contextwindowexceedederror' in error_str
or 'prompt is too long' in error_str
or 'input length and `max_tokens` exceed context limit' in error_str
or 'please reduce the length of either one'
in error_str # For OpenRouter context window errors
or 'please reduce the length of either one' in error_str
or 'the request exceeds the available context size' in error_str
or 'context length exceeded' in error_str
# For OpenRouter context window errors
or (
'sambanovaexception' in error_str
and 'maximum context length' in error_str