Context Length Exceeded: Reduce the Request Without Losing the Answer
Measure every context component, remove duplicates and irrelevant history, compact tool results, reserve output space, and verify answer quality.
Measure every context component, remove duplicates and irrelevant history, compact tool results, reserve output space, and verify answer quality.
Diagnose connect, read, deadline, proxy, gateway, and upstream timeouts, then verify recovery with controlled short and long requests.
Diagnose API 429 responses, distinguish temporary limits from quota conditions, implement bounded backoff with jitter, and avoid duplicate side effects.
How to distinguish a terminal event from an SSE disconnect, preserve partial output, inspect timeouts, and retry without duplicate side effects.
A diagnostic order for endpoint, protocol, API key, current Model ID, aliases, client overrides, status, and request ID.