feat(acp): promote next implementation#29929
Merged
Merged
Conversation
tranngoclai
pushed a commit
to tranngoclai/opencode
that referenced
this pull request
May 30, 2026
6 tasks
zeroliu
added a commit
to logancyang/obsidian-copilot
that referenced
this pull request
Jun 4, 2026
…lder (#2557) * fix(agent-mode): support opencode 1.15.13 config-options model API; force-upgrade older opencode opencode 1.15.13 (anomalyco/opencode#29929 "promote next ACP implementation") dropped the dedicated ACP `models` state and moved the model catalog into a `category:"model"` config option. The plugin only read `models`, so against 1.15.13 the picker showed BYOK models as "Not offered by agent" and the current model as a raw provider UUID that failed to run. Derive the catalog from the `category:"model"` config option when `models` is absent and route switching through `session/set_config_option` (via a new ModelState.apply spec). Pin the managed binary to 1.15.13 and prompt users on older opencode to upgrade — managed reinstall or `opencode upgrade` for custom binaries — from both the chat view and the configure dialog. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(agent-mode): handle opencode config-option effort * feat(agent-mode): prefetch opencode per-model effort options for the picker opencode ≥ 1.15.13 advertises its catalog via a `category:"model"` config option whose entries carry no per-model effort; effort is a sibling `category:"thought_level"` option opencode only surfaces for the *active* model. So `translateBackendState` could only attach effortOptions to the current model, leaving every other picker row with no effort stepper until it was selected. Eagerly, right after a session's catalog loads, probe each enabled model once to learn its effort and cache it for the picker. The probe loop reuses the existing warm probe session (a model switch is ~ms; creating a session is ~1s) and runs before the warm entry is published, restoring the original model in a finally — so the session the manager adopts is never left on a probed model (race-free). opencode-only via a new optional descriptor hook `prefetchEffortCatalog`; other backends are untouched. - descriptor.ts: add optional `prefetchEffortCatalog` to BackendDescriptor - opencode/descriptor.ts: implement it (skip missing-key models, swallow per-model errors, restore original; frozen EMPTY_EFFORT_CATALOG) - AgentModelPreloader: effortCatalog cache + getEffortCatalog + run prefetch in runProbe before publishing warm; clear on clearCached/shutdown - AgentSessionManager: getEffortCatalog passthrough - agentModelPickerHelpers: buildEffortOptionsByModelKey falls back to the prefetch cache for non-active rows (live effort wins for the active model) - useAgentModelPicker: include the effort-catalog in the picker re-render signal Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(agent-mode): re-probe effort catalog on restart with an active session Enabling a new model restarts the backend, but when the active chat tab was on that backend, restartBackendNow recreated the session without re-probing. clearCached had already wiped the per-model effort catalog, and a live session's attachModelCacheSync mirrors catalog state but not the effort catalog — so effort steppers vanished for every model until a plugin reload. Couple restart with probing: for an installed backend, always run the preloader probe (which re-runs the effort prefetch). When a tab on the backend is active, await the probe and let the replacement session adopt the warm proc — still a single spawn, with the per-model switch flicker kept on the throwaway probe session. The only restart-without-probe case left is an uninstalled backend, which runProbe already self-guards. Also reformats one unrelated builtinSkills test line via `npm run format`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
AIALRA-0
pushed a commit
to AIALRA-0/opencode-turn-engine
that referenced
this pull request
Jun 10, 2026
AIALRA-0
pushed a commit
to AIALRA-0/opencode-turn-engine
that referenced
this pull request
Jun 10, 2026
avion23
pushed a commit
to avion23/opencode
that referenced
this pull request
Jun 10, 2026
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.
Summary
opencode acpserverValidation
bun typecheckfrompackages/opencodebun test test/acp test/cli/acp --timeout 60000frompackages/opencodebun turbo typecheckvia pre-push hookCloses #15675
Closes #16371
Closes #17285
Closes #24815
Closes #24846
Closes #25836
Closes #29785
Closes #29924
Closes #4240
Closes #6002
Closes #24481