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 — fix(ai): detect litellm context window exceeded error by fabian33-ops · Pull Request #54608 · anomalyco/opencode Conversation
|
|
The following comment was made by an LLM, it may be inaccurate: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The fix works. I ran opencode run against a local OpenAI-compatible server that returns LiteLLM's ContextWindowExceededError with HTTP 400. On the base branch the session stops with the error and makes no compaction attempt. With this PR the error is classified as a context overflow and opencode sends the compaction request. packages/ai tests and the type check pass.
The new pattern is specific enough not to catch unrelated errors, and rate-limit messages are still excluded. The public API is unchanged.
No concerns.
Related: #46564
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[Bug] litellm ContextWindowExceededError not detected as context overflow
There was an error while loading. Please reload this page.