Skip to content

Request Entity Too Large error when using GitHub Copilot model around ~70k tokens #14064

@cesarfr2002

Description

@cesarfr2002

Description

When using a GitHub Copilot model (Claude Sonnet 4.6) in OpenCode, I consistently get a "Request Entity Too Large" error once the conversation/context reaches approximately 70k tokens.

It seems like the request payload exceeds a limit, possibly due to accumulated conversation history or how the request body is being constructed.

Plugins

none

OpenCode version

1.2.6

Steps to reproduce

  1. Select a GitHub Copilot model (Claude Sonnet 4.6).
  2. Start a normal conversation and keep interacting.
  3. Allow the context to grow (large conversation history).
  4. Once the total context reaches approximately ~70k tokens, send another message.
  5. The request fails with "Request Entity Too Large".

Screenshot and/or share link

Image

Operating System

Cachyos 6.19.0-2

Terminal

kitty

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