Skip to content

Context overflow from vLLM is not handled -> no auto compaction #17762

Closed

Description

@ghost91-

Description

There are already many patterns for detecting context overflow, for different providers. However, there are no dedicated patterns for vLLM yet. This means that when using a vLLM instance as a provider, auto compaction is not trigger when running into an error due to context overflow.

Plugins

No response

OpenCode version

1.2.26

Steps to reproduce

  1. Serve some model with vLLM
  2. configure that vLLM instance as a provider (OpenAI compatible)
  3. send a message to vLLM that is too large for the model's context window
  4. Observe that there is an error, but no auto compaction

Screenshot and/or share link

No response

Operating System

Arch Linux (irrelevant)

Terminal

Alacritty (irrelevant)

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 16, 2026
  2. github-actions commented on Mar 16, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  3. added a commit that references this issue on Mar 16, 2026
    c248b82
  4. ghost91- commented on Mar 16, 2026

    @ghost91-
    ContributorAuthor

    Regarding #17746: It's slightly different. vLLM does not return context_length_exceeded yet. See vllm-project/vllm#37011. I intentionally reported this separately and created separate PRs, to keep the changes small and isolated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions