Skip to content

Research: show the OpenCode context limit in the Local Proxy guide - #1628

Merged
AnthonyRonning merged 1 commit into
masterfrom
feat/research-opencode-context-limit
Nov 17, 2026
Merged

AnthonyRonning merged 1 commit into
masterfrom
feat/research-opencode-context-limit

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

OpenCode cannot read a custom provider's context window. With this guide's current steps, OpenCode 1.19.5 has no window for the model and never compacts on its own, so a long session grows until the model rejects it. Other OpenCode versions assume a default window instead, which is wrong for most Maple models.

Change

In Settings → API & credits → Local Proxy → Connect your tools → OpenCode:

  • A fourth step tells the user to add the context limit to opencode.json.
  • An opencode.json block carries the selected model's window from the catalog, with the same copy button as the cURL and Python examples.

Both are left out when the catalog has no window for the selected model. output is 32,000, OpenCode's own cap for a model whose limit it does not know, held to a quarter of the window for small models.

Related: PR 1627 makes the backend's context rejection recognizable so clients compact and retry, and maple-marketing PR 259 adds the same guidance to the docs.

Checks

  • Frontend gate passes: format, lint, typecheck and 1197 tests, including a new unit test for the block.
  • The limit shape matches OpenCode 1.19.5's provider config source and OpenCode's custom-provider docs.

Not verified: I did not view the tab in the running desktop app or run the block in OpenCode. A render test was not practical here because the guide's model picker needs a DOM that this test setup does not provide.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

OpenCode cannot read a custom provider's context window, so with the
guide's current steps a long session can grow until the model rejects it.
The OpenCode tab gains a fourth step and an opencode.json block carrying
the selected model's window from the catalog. Both are left out when the
catalog has no window for the model.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Maple development preview: https://f6907bc4.maple-ca8.pages.dev

Commit: cb5e442ee83dda830f8e6d6275dc09a88e811db6

Uses development API, billing, flags and PCR configuration. Cloudflare Access applies.

@AnthonyRonning
AnthonyRonning merged commit a4c1bb5 into master Nov 17, 2026
22 checks passed
@AnthonyRonning
AnthonyRonning deleted the feat/research-opencode-context-limit branch November 17, 2026 20:52

This branch was successfully deployed

1 active deployment
pages-pr-1628 — cb5e442e Deployed Nov 17, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant