• v1.6.4 5ab674f134

    nntrivi2001 released this 2026-09-16 04:29:34 +00:00 | 207 commits to main since this release

    Test an AI Router before you save it

    POST /api/ai-routers/test sends one Anthropic-style message, capped at a single output token, to <baseUrl>/v1/messages with a 15s timeout — the same wire shape a claude lane's env keys use, so a router that answers the test is a router the lane can actually talk to.

    A reachable router is HTTP 200 whatever it replies: the result {ok, status, message} carries the router's own words rather than a verdict of ours, and status is null when nothing answered at all. A 401 from the endpoint is a successful test that reports an auth failure, not a failed request.

    Network errors report error.cause, because node's fetch collapses every transport failure — DNS, refused connection, TLS — into the same useless "fetch failed" string.

    Security: a stored key only ever goes to the endpoint it was stored against

    Sending a blank apiKey falls back to the saved profile's key only while baseUrl is unchanged; change the URL and the request is refused with EBADKEY. Without that rule the route would be a way to make the server POST a saved API key to any URL a browser names.

    Re-point a live lane's AI Router from its card

    The lane card's AI Router select switches a running lane through POST /api/lanes/:id/router/apply — never a lane PATCH, because the database column and the lane's on-disk config have to move together or the row claims a router the lane has never heard of.

    • A failed apply reverts the select, so the control never shows a router the lane isn't on.
    • The select is hidden when native is the only profile — nothing to switch between.

    docs/API.md and docs/LANES.md were updated to match.

    Model pricing: Claude Opus 5 priced, Sonnet 5 corrected, retired models dropped

    This release also carries a pricing fix that landed on main between 1.6.3 and 1.6.4.

    • Claude Opus 5 had no pricing row at all, so every token it burned was costed at $0 — the pattern list stopped at the 4.x Opus family and nothing matched claude-opus-5. It is now priced at 5/25 per MTok, fast mode 10/50, the same shape as Opus 4.8.
    • Sonnet 5's launch discount expired 2026-08-31 and the discounted rate became the published standard, so the row's 3/15 standard rate started overcharging the day after. 2/10 is now the standard rate and no model ships an introductory rate today.
    • Fable / Mythos 5.1 fell through to the claude-fable-5% row, which caches at $1/MTok against 5.1's $0.25. They get their own rows — and that overlap is only resolvable if the lookup prefers the more specific pattern, so matchPricing now orders by pattern length descending instead of taking whichever row happened to be inserted first.
    • Claude 3.x, Opus 4/4.1 and Sonnet 4 are retired from the defaults. Because the startup top-up only ever adds missing rows, they are also pruned once from existing databases, guarded by PRAGMA user_version so a model you deliberately re-add in Settings survives later restarts.

    Only rates are deleted — recorded token usage is never touched, and Reset Defaults still restores the full current set. docs/DATABASE.md was updated to match.

    Downloads