ol.llx.ai.impl.utils.overflow
platforms: clj, cljs
context-overflow?
clj
platforms: clj
(context-overflow? assistant-message)
(context-overflow? assistant-message context-window)
Returns true when assistant-message appears to be a context-window overflow.
Supports two detection modes:
1. error-message pattern matching for explicit overflow responses.
2. silent overflow heuristic when context-window is provided and
(:usage :input + :cache-read) exceeds it.
cljs
platforms: cljs
(context-overflow? assistant-message)
(context-overflow? assistant-message context-window)
Returns true when assistant-message appears to be a context-window overflow.
Supports two detection modes:
1. error-message pattern matching for explicit overflow responses.
2. silent overflow heuristic when context-window is provided and
(:usage :input + :cache-read) exceeds it.