Skip to content

session/set_config_option unimplemented in opencode@0.2.x; opencode@0.3.x is blocked by an agentos-core package-format mismatch #1924

Description

@nateslabach

Summary

Using @agentos-software/opencode with a non-default model provider (e.g. OpenRouter) is currently impossible in any published version:

  • On opencode@0.2.7 (latest stable), the ACP method that actually changes the selected model, session/set_config_option, has no working implementation - it returns "Method not found" even though the config option is declared as writable.
    • The next version line, opencode@0.3.1/0.3.2 (published on npm, not yet tagged latest), appears to fix this, but its package registration format is incompatible with every currently-published @rivet-dev/agentos-core (checked both latest @ 0.2.15 and rc @ 0.2.16-rc.2) - AgentOs.create() throws immediately:

agentOS package ref uses removed field "packageDir" (value: ".../node_modules/@agentos-software/opencode/dist/package/"); packages are referenced by a single packagePath — update the package (rebuild @agentos-software/* dependencies) or pass { packagePath }

Repro (0.2.7 - model selection broken)

import { AgentOs } from "@rivet-dev/agentos-core";
import opencode from "@agentos-software/opencode"; // 0.2.7

const vm = await AgentOs.create({ software: [opencode], database: { type: "sqlite_file", path: "/tmp/repro.sqlite" } });
await vm.openSession({ sessionId: "s1", agent: "opencode", env: { OPENROUTER_API_KEY: "..." } });
await vm.setSessionConfigOption({ sessionId: "s1", optionId: "model", value: "openrouter/anthropic/claude-haiku-4.5" });
// throws: Method not found

Root cause traced in the bundled source (@agentos-software/opencode/dist/opencode-acp/acp.js): the ACP routing for session/set_config_option exists, but the underlying setSessionConfigOption implementation it delegates to isn't wired up to actually change the model in this build.

Repro (0.3.2 - blocked before it even gets there)

npm install @agentos-software/opencode@0.3.2
Then any AgentOs.create({ software: [opencode], ... }) throws the packageDir/packagePath error above, before a session can even open. Same result against @rivet-dev/agentos-core@0.2.16-rc.2.

Impact

Any self-hosted setup using OpenCode as a harness with a custom model provider is stuck — can't select a model on 0.2.x, can't even boot on 0.3.x. This also blocks anything relying on OpenCode specifically for its MCP tool-calling support, since no prompt can complete at all regardless of MCP.

Ask

Either:

  1. Fix session/set_config_option's underlying implementation in the 0.2.x line, or
  2. Publish an @rivet-dev/agentos-core version that supports 0.3.x's packagePath format (as latest or rc), so the fix in 0.3.x is actually usable.

Happy to provide a minimal repro repo if useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions