anomalyco / anomalyco/opencode
acp: custom providers fail to load due to SchemaError(Missing key at ["path"]) on event subscription
@jlongster is already working on this.
Since Sep 17, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Summary
In opencode acp on versions 2.0.6 and 2.0.7, the internal event subscriber crashes with an unhandled schema error (SchemaError: Missing key at ["path"]) during startup. As a consequence, custom providers configured in user settings (opencode.jsonc) are never merged into the ACP session catalog, leaving only built-in fallback models (opencode/*) and causing ACP clients (such as Obsidian's Claudian) to fail with model not found.
Environment
- opencode version: 2.0.6, 2.0.7 (works correctly on 2.0.3)
- OS: macOS (Darwin 25.5.0, arm64)
- Shell: /bin/zsh
- Install: npm global (
@opencode/cli)
Reproduction
- Configure custom models/providers under
providerin~/.config/opencode/opencode.jsonc. - Start the ACP server:
opencode acp --log-level all --print-logs - Send standard JSON-RPC
initializefollowed bysession/newwithmcpServers: []. - Inspect the returned
configOptionsformodeland review stderr logs.
Expected Behavior
session/new options should include custom models from opencode.jsonc, and incoming location events (provider.updated, model.updated) should be decoded without schema errors.
Actual Behavior
During boot, right after event.type=command.updated, the CLI process encounters an unhandled rejection:
level=ERROR message="unhandled rejection" cause="SchemaError(Missing key at [\"path\"])" role=cli
Because of this rejection, ACP caches only the initial fallback models (opencode/union-alpha, etc.). Requesting any custom model via session/set_config_option fails with:
{
"code": -32602,
"message": "Invalid params: model not found: <custom-provider>/<model>"
}
Additional Context
- Tested in an isolated sandbox on version 2.0.3: custom providers load cleanly over ACP and
session/set_config_optionsucceeds. - Tested on 2.0.6 and 2.0.7: both fail with the identical
SchemaErrorstack.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.