Skip to content

v0.3.0 — OpenCode V2 port + per-model flex toggles

Latest

Choose a tag to compare

@logicalor logicalor released this 23 Oct 23:23

Ported to the OpenCode V2 plugin API (V1 plugin builds no longer run in OpenCode 2):

  • { id, setup(ctx) } entrypoint behind a root server.ts package entry
  • Flex injection via session hooks (context/compaction/generate), plus an http.request hook that guarantees service_tier: "flex" reaches the request body regardless of provider-option lowering
  • Telemetry capture via the native http.response hook (tee'd SSE parsing of :energy/:cost comments)
  • Per-turn accounting on session.step.ended/failed; subagent discovery from session.created events (works on 2.0.x builds with no session-listing method on the plugin context)

Per-model flex toggling (on by default):

  • flex-toggle tool and /flex slash command: list / enable / disable / reset, by model ID or glob pattern (deepseek-*, */glm-5.3)
  • Preferences persist in ~/.config/opencode/.neuralwatt-flex.json, shared across server processes and re-read when the file changes; enable also clears auto-disables so a flex-errored model can recover without a restart
  • Stats reports split User-disabled (persistent) from Auto-disabled (this process)

Docs: README caught up with V2 install/config, a current-format sample report, and the toggle reference.

Requires OpenCode V2 (verified end-to-end on 2.0.25). Also published to npm as @logical-or/neuralwatt-flex.