fix: handle Anthropic overloaded_error gracefully (#832) (thanks @danielz1z)

This commit is contained in:
Peter Steinberger
2026-01-13 08:32:06 +00:00
parent 36725ce153
commit e8779ac329
4 changed files with 20 additions and 2 deletions

View File

@@ -1456,7 +1456,7 @@ describe("trigger handling", () => {
const text = Array.isArray(res) ? res[0]?.text : res?.text;
expect(text).toBe(
"⚠️ Context overflow - conversation too long. Starting fresh might help!",
"⚠️ Context overflow — prompt too large for this model. Try a shorter message or a larger-context model.",
);
expect(runEmbeddedPiAgent).toHaveBeenCalledOnce();
});