anomalyco / anomalyco/opencode

Bad context window size for MAI-Code-1-Flash

Open
#40,000 1 comment 0 reactions 1 assignee View on GitHub

@MrMushrooooom is already working on this.

Since Aug 1, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

When you switch to use MAI-Code-1-Flash model it do not recognize its context window size correctly and keep compacting before 120K tokens.
As I understand its context window size is 256K.

Plugins

No response

OpenCode version

1.18.9

Steps to reproduce

Switch model to MAI-Code-1-Flash (Copilot)
Use it
You will se unexpected compaction before touching 120k context used

Screenshot and/or share link

No response

Operating System

MacOS

Terminal

iTerm2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.