Skip to content

Releases

v0.3.0

Choose a tag to compare

@raphvallee raphvallee released this 07 Nov 17:38

Feature release. Models served by a single provider now skip routing, and
routing-failure toasts also reach OpenCode Desktop windows, not only the TUI.
No breaking changes; the one behavior change is that a single-provider model's
request goes out unmodified.

Fixed

  • A zero-survivors refresh no longer wipes the stored blacklist reasons and
    debug rankings: the fallback that keeps the previous ranking re-saved it
    without a metadata payload, and the UPSERT overwrote details_json and
    blacklist_reasons_json with NULL, so debug logging showed "unknown" for
    every blocked provider after a restart. The save now preserves the stored
    payload when a refresh carries none (COALESCE in the UPSERT).

Added

  • A model served by exactly one provider bypasses the routing pipeline completely:
    when OpenRouter lists only one provider, no endpoint test runs (context, completion
    cap, uptime, status, pricing, tool support or the Tool Call Error Rate probe), no
    blacklist and no sort: "price" is injected, and the request goes out completely
    unmodified. The ranking is still recorded (mode bypassed) so the pass-through
    behaves the same after a restart, and debug prints one line saying so. A provider
    named in extraIgnore is never bypassed: that option keeps its existing meaning and
    the usual routing rules apply.
  • debugBlacklistReasons output is now a debugging tool, not just a reason
    list: each blocked provider's causes carry the threshold they enforce
    (uptime (min 90%)), the provider's own value that missed it
    (u-one (40%)), and providers sharing a cause group are ordered
    from the closest miss to the hardest failure. When every provider is
    blacklisted and only the keepAtLeastN floor keeps a route open, the log
    shows which of your filters is the strictest and by how much. Reasons are
    persisted with every ranking (threshold, value, miss magnitude), so
    enabling the debug option works on stored rankings without waiting for a
    re-rank; the probe-reasons probe prints the same format.
  • Routing-failure toasts are no longer TUI-only: a new ./gui-experimental part
    (src/gui.tsx, built as dist/gui-experimental.cjs with the
    @opencode/plugin/gui vite preset) runs in every OpenCode Desktop window,
    desktop app and web tabs alike, and raises the same error toast the TUI part
    raises. The shared detection, sanitization and dedupe logic moved to
    src/failure.ts so the two parts cannot drift.
  • A noGUI option (default false) turns the GUI part off, the way noTUI
    turns the TUI part off; an invalid value is rejected at startup by the server
    part, which also validates unknown option keys.

v0.2.0

Choose a tag to compare

@raphvallee raphvallee released this 03 Nov 04:52

[0.2.0] - 2026-11-02

Security release. A full audit was run and its findings are fixed; see
VULNERABILITY-AUDIT.md for the audit and remediation status. There are no
breaking changes, but configuration is now stricter: anything invalid changes
nothing silently, it fails startup (or is ignored) loudly.

Security

  • The npm publish workflow cannot be command-injected via its manual tag
    input anymore: the value travels in env, is validated against
    ^[a-z0-9][a-z0-9._-]{0,127}$ before publish, and the release tag must match
    package.json. Actions are pinned to commit SHAs, the toolchain is pinned,
    permissions: contents: read and persist-credentials: false are set, and
    the release job runs in a protected release environment with provenance.
  • The spawned opencode stats CLI no longer inherits your whole environment
    (including OPENROUTER_MANAGEMENT_KEY and cloud credentials); it gets an
    allowlisted runtime environment.
  • managementKeyEnv cannot point at well-known cloud secrets
    (AWS_*, OPENAI_API_KEY, GITHUB_TOKEN, ...); the value is never echoed,
    and overriding the default prints a warning naming the variable.
  • dbPath is canonicalized, symlinks are refused, and a database file whose
    fetches table does not look like ours is refused unmodified; a corrupt one
    is quarantined to *.corrupt-<timestamp> and recreated. Foreign files are
    never migrated or modified. The database is owner-only (0600/0700 where
    the platform supports it) and reads are capped at 5,000 rows.
  • Routing from a poisoned or empty refresh is never persisted over a healthy
    snapshot; the previous ranking is kept until a good refresh lands.
    Disk timestamps are clamped, slugs are validated and capped on write and on
    read, and survivors are validated exactly like the blacklist.
  • A routing failure is never silent: without a session it is logged; with a
    session it appears in the transcript and as a toast; the user's
    extraIgnore is now applied even when the filters leave zero survivors
    (never with sort: "price").
  • Upstream payloads are size-capped (5 MB) and shape-validated before use;
    request bodies are streamed with a 25 MB ceiling; provider slugs are
    validated (^[a-z0-9][a-z0-9._-]{0,63}$) everywhere they are built or read.
  • Untrusted strings reaching logs, the TUI or transcripts are stripped of
    control characters (no ANSI/OSC injection) and length-capped.
  • Discounts of 100%+ are rejected as broken pricing; honored discounts are
    capped at 50%; NaN cannot pass any filter; missing uptime is never read as a
    perfect score, and invalid health data fails closed.
  • Authenticated requests to the Activity API use redirect: "error".
  • The stats child is capped at 10 MB of stdout / 64 KB of stderr; bodies and
    stats payloads over their caps are aborted, not buffered.

Added

  • SECURITY.md (reporting policy) and Dependabot for npm and GitHub Actions.
  • 14 security-invariant tests (test/security.test.ts), covering routing
    safety, persistence gating, database hardening and input validation.

Changed

  • Configuration validation is stricter: control characters are rejected
    anywhere in string options, values are truncation-capped (200 chars) and
    redacted in errors for *key*/*token*/*secret* names, extraIgnore
    entries are validated provider slugs, rankingWaitMs is capped at 30 s,
    ttlHours at 720, statsCacheMinutes at 1440 and statsDays at 365.