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.

feat: add new error str for context window exceeded (#10135)

cthomas12cbd6dbbe17
diff --git a/letta/llm_api/anthropic_client.py b/letta/llm_api/anthropic_client.py
index dcefc6097..46e6ea7c9 100644
--- a/letta/llm_api/anthropic_client.py
+++ b/letta/llm_api/anthropic_client.py
@@ -1035,6 +1035,7 @@ class AnthropicClient(LLMClientBase):
"prompt is too long" in error_str
or "exceed context limit" in error_str
or "exceeds context" in error_str
+ or "context window exceeds limit" in error_str
or "too many total text bytes" in error_str
or "total text bytes" in error_str
):