Repository navigation
Research: show the OpenCode context limit in the Local Proxy guide - #1628
Merged
Merged
Conversation
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>
Contributor
|
Maple development preview: https://f6907bc4.maple-ca8.pages.dev Commit: Uses development API, billing, flags and PCR configuration. Cloudflare Access applies. |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
opencode.json.opencode.jsonblock 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.
outputis 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
limitshape 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
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.