Repository navigation
fix(core): offer Console web search only when the workspace enables it - #59592
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
The change looks correct. The Console web search provider is now offered only when the Console's config selects opencode. That matches how the legacy Console path (opencode-legacy.ts) gates on its descriptor and how this worked before #57703. A missing or false websearch is handled. A member's own websearch.provider still wins, because the selection still merges as config.
I ran the updated test on the base and it fails there, which reproduces the problem. With this PR the whole provider-opencode.test.ts file passes (50/50), and tsc -b for packages/core passes. The test change is small and clear.
Public API: unchanged.
No concerns.
This was referenced Oct 27, 2026
alsuren
pushed a commit
to alsuren/opencode
that referenced
this pull request
Oct 28, 2026
1 task done
1 task
88 tasks done
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.
Since 2.2.0, members signed in to an OpenCode Console workspace that hasn't turned on hosted web search, or whose policy blocks it, still see OpenCode Web Search in the search picker and in random selection. Searching through it fails with "not found" or "forbidden", and the failure isn't retried with another provider. Production shows it: in three hours, 2.2.0 clients got 292 not-found and 45 forbidden responses from Console web search against 35 successful searches, while 2.1.4 clients got none.
The Console's config already selects its search provider only when the workspace enabled it and the member's policy allows it. The plugin now offers the provider only in that case, as it did before 2.2.0. A member's own
websearch.providerstill wins over the Console's selection.packages/core/src/plugin/provider/opencode.ts: register the Console search provider only when the Console config'swebsearch.providerisopencode.packages/core/test/plugin/provider-opencode.test.ts: the provider is absent until the Console selects it, then present and used; user config still wins. Fails if the gate is removed.