GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — compaction: LiteLLM router context-window rejections not recognized — session dies instead of compacting · Issue #56403 · anomalyco/opencode Closed as duplicate Closed as duplicate Copy link Labels DescriptionSummaryOpenCode's reactive auto-compaction fails to trigger on context-window rejections returned by a LiteLLM proxy router. LiteLLM (with Environment
Reproduction
Expected BehaviorOpenCode recognizes the rejection as a context-window error, auto-compacts, and retries — the same way it does for backend-generated rejections. Actual BehaviorThe error surfaces as a System Error and the session step fails. No compaction is attempted: Additional ContextOpenCode classifies context-window rejections by matching the error text against a hardcoded regex list (extracted from the installed binary): Jn = [/prompt is too long/i, /input too long for requested model/i, /exceeded this model context window limit/i, /exceeds context window/i, /exceeds (?:the )?(?:model'?s )?maximum context length(?: [\d,]+ tokens?|\s*\([\d,]+\))/i, /maximum context length is \d+ tokens/i, /context[_ ]length[_ ]exceeded/i, /* ~24 more provider-specific phrasings */] None of these match LiteLLM's router-generated message ( Contrast with the working case from my logs: a rejection that came from the backend server itself ( Suggested patterns to add: /no models have context window large enough/i /context window exceeded for given call/i /Max Input Tokens=\d+, Got=\d+/i // litellm's generic tail, also robust Workaround at the proxy side exists ( Activity
MetadataMetadataAssigneesLabelsTypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |