Repository navigation
Releases
v0.6.2
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
What's Changed
- aff6cea: Retry ladder resolution with live Models.dev metadata when OpenCode's cached
models.jsoncannot 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
What's Changed
-
a92c5d5: Fixes subagent ladder resolution by reading OpenCode's local
models.jsoncache (with event-driven invalidation and an 8s live-fetch timeout), excluding-fast/-flex/-ultrafastservice-tier siblings, preventing newer expensive models from superseding cheaper same-family models, and appendingparent#lowas 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.textAPI:- Adds
src/evaluate.tswith ladder-aware prompt building,Effect.SchemaJSON decoding, timeout handling, and verdict mapping. - Adds
evaluatoroption ('lowest' | 'none' | ModelRefor model spec string, defaulting to'lowest') and updates defaulttimeoutMs(3000) andconfidenceMin(0.6). - Removes
src/jev.ts,src/decide.ts, OpenRouter API key resolution, and the installer's OpenRouter auth notice.
- Adds
-
e8605f3: Adds parent-assisted subagent routing via OpenCode V2's keyed
session.instructionsAPI andtool.execute.beforeguardrails:- Adds
modeoption ('hybrid' | 'parent' | 'classifier', defaulting to'hybrid'). - Syncs capability-labeled downgrade ladders into root session instructions on
session.hook('prompt')with memoized updates andsession.deletedcache eviction. - Validates parent-chosen models on native
subagentand T3delegate_taskcalls, loggingparent_kept,parent_downgraded,pinned_model,parent_omitted, or stripping invalid models (invalid_parent_model) to fail open.
- Adds
-
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 EffectRefwith child-session event correlation (session.created,session.step.ended,session.tool.failed,session.execution.interrupted), 120s retry detection, and a non-blocking boundedQueuedrained on scope close. - Adds
telemetry(defaulttrue) and optionaltelemetryPathrouter options, failing open if telemetry is disabled or database initialization fails.
- Records routing decisions and post-execution outcome signals (
-
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_vectorsand repository queries (insertVector,findSettledVectors) storing L2-normalizedFloat32Arrayembeddings asBLOBs 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'sFetchHttpClientandStream, a verified model manifest pinned to immutable 40-character Hugging Face commit SHAs (minishlab/potion-base-2Mandminishlab/potion-base-8M), HTTPS-only host-allowlisted manual redirect handling, streaming byte-size caps, BunCryptoHasherSHA-256 verification on both downloads and cache reads, path-traversal containment, non-fatal0o600/0o700atomic cache writes, and bounds-checked Safetensors parsing. - Adds an offline zero-download
ngramfallback embedder (Bun.hash.murmur32v3), non-blocking single-flightDeferredinitialization (createEmbedderHandle), a separate bounded vector worker inmakeTelemetryTracker, and conservative confirmed-failure step-up escalation (shouldEscalate,stepUpTarget) gated behindoptions.vectors(default{ enabled: false, backend: 'model2vec', model: 'minishlab/potion-base-2M' }). - Integrates history-based escalation into
execute.beforefor both parent-chosen and fallback-evaluator downgrades across nativesubagentand T3delegate_task, logginghistory_escalatedand recordingdecisionSource: 'escalated'.
- Adds SQLite migration
-
d1583a4: Removes support for OpenCode V1
v0.5.0
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
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
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
What's Changed
- feat: adds cross-model, same lab routing by @JacobNWolf in #3
- chore: release 0.2.0 by @JacobNWolf in #4
- ci: use npm stage publish by @JacobNWolf in #5
Full Changelog: https://github.com/JacobNWolf/opencode-subagent-router/commits/v0.2.0