Skip to content

sglang token exedeeded count is not being recognized for auto compact #25231

@koush

Description

@koush

Description

Bad Request: Requested token count exceeds the model's maximum context length of 202752 tokens. You requested a total of 202941 tokens: 170941 tokens from the input messages and 32000 tokens for the completion.
Please reduce the number of tokens in the input messages or the completion to fit within the limit.

That's what sglang is returning

Plugins

No response

OpenCode version

1.14.30

Steps to reproduce

  1. exceed context length in open code on an sglang (openai compatible). open code does not recover.

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Metadata

Metadata

Assignees

Labels

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

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions