Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

fix: detect GLM-5 context window exceeded error message (#10171)

cthomasd5e074213e68
diff --git a/letta/llm_api/error_utils.py b/letta/llm_api/error_utils.py
index ad28d036c..22ce2199e 100644
--- a/letta/llm_api/error_utils.py
+++ b/letta/llm_api/error_utils.py
@@ -19,6 +19,7 @@ def is_context_window_overflow_message(msg: str) -> bool:
or "maximum context length" in msg
or "context_length_exceeded" in msg
or "Input tokens exceed the configured limit" in msg
+ or "exceeds the maximum allowed input length" in msg
)