Skip to content

Releases

v0.6.2

Choose a tag to compare

@JacobNWolf JacobNWolf released this 29 Nov 19:24

5e2fa9c: Add opencode-plugin to package.json to improve discoverability on OpenCode plugin marketplaces.

Full Changelog: v0.6.1...v0.6.2

v0.6.1

Choose a tag to compare

@JacobNWolf JacobNWolf released this 29 Nov 04:52

What's Changed

  • aff6cea: Retry ladder resolution with live Models.dev metadata when OpenCode's cached models.json cannot resolve the parent model, so newly released parents (such as Fable 5.2) route to cheaper same-generation models instead of only their own low-effort variant.

v0.6.0

Choose a tag to compare

@JacobNWolf JacobNWolf released this 29 Nov 02:11

What's Changed

  • a92c5d5: Fixes subagent ladder resolution by reading OpenCode's local models.json cache (with event-driven invalidation and an 8s live-fetch timeout), excluding -fast/-flex/-ultrafast service-tier siblings, preventing newer expensive models from superseding cheaper same-family models, and appending parent#low as the top downgrade rung with semantic rung tiers.

  • 4bafa2b: Replaces Jev and OpenRouter with a native same-provider fallback evaluator via OpenCode V2's experimental.generate.text API:

    • Adds src/evaluate.ts with ladder-aware prompt building, Effect.Schema JSON decoding, timeout handling, and verdict mapping.
    • Adds evaluator option ('lowest' | 'none' | ModelRef or model spec string, defaulting to 'lowest') and updates default timeoutMs (3000) and confidenceMin (0.6).
    • Removes src/jev.ts, src/decide.ts, OpenRouter API key resolution, and the installer's OpenRouter auth notice.
  • e8605f3: Adds parent-assisted subagent routing via OpenCode V2's keyed session.instructions API and tool.execute.before guardrails:

    • Adds mode option ('hybrid' | 'parent' | 'classifier', defaulting to 'hybrid').
    • Syncs capability-labeled downgrade ladders into root session instructions on session.hook('prompt') with memoized updates and session.deleted cache eviction.
    • Validates parent-chosen models on native subagent and T3 delegate_task calls, logging parent_kept, parent_downgraded, pinned_model, parent_omitted, or stripping invalid models (invalid_parent_model) to fail open.
  • 9b6b719: Adds local SQLite telemetry (@effect/sql-sqlite-bun) and an Effect-based outcome tracker for subagent routing runs:

    • Records routing decisions and post-execution outcome signals (ok, thrash, error, interrupted, retried) in $XDG_DATA_HOME/opencode/subagent-router.db (default ~/.local/share/opencode/subagent-router.db) via inline migrations and a scoped SQLite client.
    • Tracks active runs (pending -> running -> settled) in an Effect Ref with child-session event correlation (session.created, session.step.ended, session.tool.failed, session.execution.interrupted), 120s retry detection, and a non-blocking bounded Queue drained on scope close.
    • Adds telemetry (default true) and optional telemetryPath router options, failing open if telemetry is disabled or database initialization fails.
  • 238ca2e: Adds an opt-in vector-assisted escalation guard powered by pure-TypeScript Model2Vec embeddings and SQLite BLOB storage:

    • Adds SQLite migration 0002_create_prompt_vectors and repository queries (insertVector, findSettledVectors) storing L2-normalized Float32Array embeddings as BLOBs indexed by canonical model identity (resolveModelIdentity, matching across OpenRouter, OpenAI, Anthropic, and Claude Agent with a resolution-guarded provider-qualified fallback) and zero native dependencies.
    • Implements a hardened pure-TS Model2Vec engine (src/telemetry/model2vec.ts) using @huggingface/tokenizers, Effect's FetchHttpClient and Stream, a verified model manifest pinned to immutable 40-character Hugging Face commit SHAs (minishlab/potion-base-2M and minishlab/potion-base-8M), HTTPS-only host-allowlisted manual redirect handling, streaming byte-size caps, Bun CryptoHasher SHA-256 verification on both downloads and cache reads, path-traversal containment, non-fatal 0o600/0o700 atomic cache writes, and bounds-checked Safetensors parsing.
    • Adds an offline zero-download ngram fallback embedder (Bun.hash.murmur32v3), non-blocking single-flight Deferred initialization (createEmbedderHandle), a separate bounded vector worker in makeTelemetryTracker, and conservative confirmed-failure step-up escalation (shouldEscalate, stepUpTarget) gated behind options.vectors (default { enabled: false, backend: 'model2vec', model: 'minishlab/potion-base-2M' }).
    • Integrates history-based escalation into execute.before for both parent-chosen and fallback-evaluator downgrades across native subagent and T3 delegate_task, logging history_escalated and recording decisionSource: 'escalated'.
  • d1583a4: Removes support for OpenCode V1

v0.5.0

Choose a tag to compare

@JacobNWolf JacobNWolf released this 14 Nov 17:25

What's Changed

  • fix(router): enable cheaper cross-model research routing by @JacobNWolf in #13

Full Changelog: v0.4.1...v0.5.0

v0.4.1

Choose a tag to compare

@JacobNWolf JacobNWolf released this 14 Nov 05:20

What's Changed

  • feat: route subagent tasks across a cost-ordered model ladder by @JacobNWolf in #9
  • feat: add npx installer for OpenCode V1 and V2 by @JacobNWolf in #10
  • feat(router): support T3 Code delegation routing by @JacobNWolf in #11
  • fix(router): classify read-only research tasks as cheap work by @JacobNWolf in #12

Full Changelog: v0.3.0...v0.4.1

v0.3.0

Choose a tag to compare

@JacobNWolf JacobNWolf released this 07 Nov 19:58

What's Changed

  • fix: avoid effect/unstable/http imports rejected by OpenCode plugin loader by @JacobNWolf in #6
  • feat: support the OpenCode V2 plugin API by @JacobNWolf in #7
  • feat: route Claude Agent subagents to cheaper models by @JacobNWolf in #8

Full Changelog: v0.2.0...v0.3.0

v0.2.0

Choose a tag to compare

@JacobNWolf JacobNWolf released this 28 Sep 00:34
e31bb42

What's Changed

Full Changelog: https://github.com/JacobNWolf/opencode-subagent-router/commits/v0.2.0