fix: mypy no-any-return in agent context overflow handler

This commit is contained in:
Patrick Buckley
2026-03-10 14:11:09 -07:00
parent 41d1b27d34
commit d6ba1d5e25
+1 -1
View File
@@ -2559,7 +2559,7 @@ class ChatSession:
# Find the last assistant content we have
for msg in reversed(agent_messages):
if msg.get("role") == "assistant" and msg.get("content"):
return msg["content"]
return str(msg["content"])
return f"({label} stopped: context limit exceeded)"
raise