Skip to content

GitHub Copilot - GPT-4.1 (prompt) context length appears to be 64kΒ #691

@cysp

Description

@cysp

πŸ‘‹ I am seeing errors when using opencode against my GitHub Copilot Business subscription with the GPT-4.1 model (for miserly reasons), indicating that the context window had been filled before opencode had decided to autocompact.
The error message seen in opencode seems pretty unambiguous, clearly stating that the allowed prompt length is 64000 tokens.

prompt token count of 64314 exceeds the limit of 64000

To try to corroborate this, I have also used GitHub's Copilot CLI tool, which clearly states that the context size for the GPT-4.1 model is 64k:

Image

I have been unable to find any authoritative source listing the context sizes though.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions