Skip to content

πŸ™Œ OpenHands: AI-Driven Development

Extend context truncation cases (#11393)

Ryan H. Tran5182388323b4
diff --git a/openhands/controller/agent_controller.py b/openhands/controller/agent_controller.py
index 1106a28a49..30c4fa064b 100644
--- a/openhands/controller/agent_controller.py
+++ b/openhands/controller/agent_controller.py
@@ -903,7 +903,7 @@ 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
+ or 'please reduce the length of' 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