Skip to content

Releases: BlockRunAI/ClawRouter

v0.12.206

10 Jun 08:28

Choose a tag to compare

v0.12.206 — June 10, 2026

End-to-end audit sweep: 4 proxy reliability fixes (each TDD'd with a new regression test), abort/teardown hardening, registry realignment with the gateway, and doc/count sync. 596 tests passing (8 new).

Proxy reliability (all in src/proxy.ts unless noted)

  • Process-crash fix: escaped rejections from the request handler. The paymentStore.run(async () => …) promise wrapping every request was never .catch()ed, and the media endpoints (/v1/images/generations, image2image, audio, videos) read the request body outside their try blocks — a client aborting mid-upload rejected the body iterator, escaped the handler, and became an unhandledRejection, which kills the whole proxy under Node's default semantics. A safety-net .catch() now logs, replies 500 when possible, and never lets a rejection escape. (Test: proxy.aborted-upload.test.ts.)
  • Partner-API corruption: content-length forwarded after fetch decompression. proxyPaidApiRequest stripped content-encoding but kept content-length, so any gzipped upstream response (pm/exa/surf/phone/…) reached the client with the compressed length and decompressed bytes → truncated JSON. content-length joins the skip list; Node chunks instead. (Test: proxy.partner-gzip.test.ts.)
  • Client abort now cancels upstream work in the media + partner paths. The image/video 202-poll loops kept polling after the client disconnected — and the first completed poll settles the x402 payment, charging the user for a clip nobody will receive. Both loops (and the partner proxy + media submit calls) now thread an AbortController tied to res close, bail before the next poll, and pass signal into payFetch. (Test: proxy.poll-abort.test.ts.)
  • Streaming dedup waiters get heartbeats. A streaming retry that attached to an in-flight identical request waited in silence (no headers, no bytes) for up to minutes — recreating the OpenClaw ~10-15s timeout/retry storm the heartbeat mechanism exists to prevent, and stacking more waiters each round. Waiters now receive SSE headers + : heartbeat comments immediately and replay the original's transcript when it lands. (Test: proxy.dedup-streaming.test.ts.)
  • Balance check time-bounded at 2.5s (BALANCE_CHECK_TIMEOUT_MS). The pre-request balance check runs before SSE headers; a slow RPC (Solana retry ladder ≈ 34s worst case, and zero balances are never cached) starved streaming clients of their first byte. On expiry the request proceeds optimistically; the in-flight RPC still warms the monitor cache. (Test: proxy.balance-check-latency.test.ts, via the existing _balanceMonitorOverride seam.)
  • Teardown/leak batch: partner proxy now res.end()s after a mid-stream body-read timeout instead of hanging the client until socket timeout; readBodyWithTimeout cancels the stream on timeout (was leaking the undici connection until GC); the budget second-pass 429 path releases the global timeout + close listener; the empty-wallet fallback writes the exclude-aware freeFallback pick into the body instead of the hardcoded FREE_MODEL (latent exclude-list bypass); the 429-retry success path uses FREE_MODELS.has() like its siblings (phantom ~$0.001 session-budget entries); the video poll loop tracks an explicit completed flag so a completed-but-empty job no longer reports as "timed out"; payment-preauth.ts reuses the rejected pre-auth 402 (which already carries fresh requirements) instead of buying an identical 402 with an extra unpaid round trip.
  • Hot-path perf: estimateAmount now uses a module-level Map (the budget pre-check scanned BLOCKRUN_MODELS linearly per model → O(n²) per request); loadExcludeList (src/exclude-models.ts) gained an mtime-validated cache.

Registry / pricing (gateway alignment, blockrun = source of truth)

  • anthropic/claude-sonnet-4.5 added ($3/$15, 200K ctx, vision) — public upstream since the 4.6 launch but missing here entirely; same gap class v0.12.167 fixed for opus-4.5. Pins: sonnet-4.5, sonnet-4-5, anthropic/claude-sonnet-4-5. Bare sonnet stays on 4.6; not picker-listed (superseded tier).
  • Seedance i2v telemetry rates un-discounted — blockrun 403e61e (2026-06-01) removed the image-to-video discount; the stale pricePerSecondImageInput rows (0.13369/0.1742) under-logged i2v cost ~41%. i2v now logs at the text rate. Telemetry-only (payments are server-dictated). Known remaining gap, documented in the comment: blockrun's RESOLUTION_TOKEN_FACTOR (1080p = 2.25×) still isn't modeled.
  • azure/sora-2 added to VIDEO_PRICING ($0.10/s flat, 4s default — a 12s clip was falling back to the generic ~$0.42 telemetry row) and openai/gpt-image-2 added to IMAGE_PRICING ($0.06 / $0.12 by size). Both added to README + SKILL docs.
  • Duplicate-id picker entries eliminated (src/models.ts): catalog entries shadowed by an identically-keyed alias (free, openai/o1-mini, google/gemini-3-pro-preview, nvidia/kimi-k2.5) are now excluded from OPENCLAW_MODELSresolveModelAlias checks aliases first, so those catalog entries were unreachable and advertised the old model's metadata while callers got the redirect target. The picker's double free row is gone (39 → 38 = top-models.json), and the surviving free entry finally says GPT-OSS 120B instead of the retired "Nemotron Ultra 253B". (Tests added in models.test.ts.)

Docs / cleanup

  • Free-model count corrected everywhere: 6 (was variously 8, 9, and 10 across README badges/prose and SKILL.md — stale since the 2026-06-07 sweep). README profile table AUTO·MEDIUM cell synced to kimi-k2.6 ($0.95/$4.00) (changed in v0.12.174); ECO·REASONING cell named the actual primary (grok-4-1-fast-reasoning); doctor sample output and CLAUDE.md now say Node 22 (floor raised in #183).
  • Dead code removed: src/router/llm-classifier.ts (designed LLM-fallback classifier, never wired), the vestigial walletKeyAuth/envKeyAuth interactive auth methods in src/auth.ts, decompressContent (codebook), generatePathMapHeader (paths); two internal-only functions un-exported.
  • @noble/hashes declared as a direct dependencysrc/wallet.ts imports it directly but it only resolved via @scure/* hoisting (phantom dep; masked at runtime by tsup bundling). Stale tsconfig exclude of error-classification.test.ts dropped (it typechecks fine).

v0.12.159

21 Apr 17:17
c24d03a

Choose a tag to compare

  • Market data tools — BlockRun gateway now exposes realtime and historical market data; ClawRouter wires them into OpenClaw as 6 first-class agent tools so the model stops scraping finance sites. Paid ($0.001 via x402, same wallet as LLM calls): blockrun_stock_price and blockrun_stock_history across 12 global equity markets (US, HK, JP, KR, UK, DE, FR, NL, IE, LU, CN, CA). Free (no x402 charge): blockrun_stock_list (ticker lookup / company-name search), blockrun_crypto_price (BTC-USD, ETH-USD, SOL-USD, …), blockrun_fx_price (EUR-USD, GBP-USD, JPY-USD, …), blockrun_commodity_price (XAU-USD gold, XAG-USD silver, XPT-USD platinum). Tool schemas advertise market codes, session hints (pre/post/on), and bar resolutions (1/5/15/60/240/D/W/M). Path routing extended: the partner-proxy whitelist in src/proxy.ts now matches /v1/(?:x|partner|pm|exa|modal|stocks|usstock|crypto|fx|commodity)/, routing all new paths through proxyPaidApiRequest (payFetch handles 402 when present, passes through 200 for free categories). Tool definitions added in src/partners/registry.ts; skills/clawrouter/SKILL.md gains a "Built-in Agent Tools" section listing market data + X intelligence + Polymarket alongside the LLM router.

v0.12.158

20 Apr 22:09
9803d5b

Choose a tag to compare

  • SKILL.md data-flow + key-storage transparency — second-pass fix for the OpenClaw scanner on clawhub.ai. v0.12.157 cleared the original scanner flags (opaque credentials, implied multi-provider keys, no install artifact). A deeper rescan surfaced three new nuanced flags: prompts go to blockrun.ai (data-privacy framing), wallet private-key storage location/encryption undocumented, and users may expect strictly-local routing. All three addressed: description reframed as "Hosted-gateway LLM router" with explicit Ollama pointer for local-only needs; new Data Flow section with ASCII diagram, enumerated sent/not-sent lists, link to https://blockrun.ai/privacy; new Credentials & Local Key Storage section documenting config file paths per OS, 0600 POSIX permissions, plaintext parity with other OpenClaw provider keys, encryption guidance (FileVault/LUKS/BitLocker or burner wallet), src/wallet.ts source pointer; new Supply-Chain Integrity section with npm pack verification and tagged-release invariant.

v0.12.157

20 Apr 21:43
aca5095

Choose a tag to compare

  • SKILL.md credential transparency — rewrote skills/clawrouter/SKILL.md to clear the OpenClaw scanner's medium-confidence suspicious verdict on clawhub.ai. Frontmatter now declares repository: https://github.com/BlockRunAI/ClawRouter, license: MIT, and a structured metadata.openclaw.install array (kind: node, package: @blockrun/clawrouter, bins: [clawrouter]) so the registry entry has an auditable install artifact instead of a bare bash block. Body adds a Credentials & Data Handling section fully enumerating what models.providers.blockrun stores (walletKey / solanaKey — auto-generated locally, never transmitted; gateway / routing — non-sensitive), and explicitly states the plugin does not collect or forward third-party provider API keys (OpenAI/Anthropic/Google/DeepSeek/xAI/NVIDIA) — the blockrun.ai gateway owns those relationships and routes on the server side. Addresses the three scanner flags (opaque credential declaration, implied multi-provider credential collection, no install artifact for review) raised against v0.12.156 on https://clawhub.ai/1bcmax/clawrouter.

v0.12.156

20 Apr 20:35
5c63fb2

Choose a tag to compare

v0.12.156 — Apr 20, 2026

  • Kimi K2.6 added — Moonshot's new flagship (moonshot/kimi-k2.6, 256K context, vision + reasoning, $0.95 in / $4.00 out per 1M) registered in BLOCKRUN_MODELS with kimi-k2.6 alias. Added to the curated /model picker list (src/index.ts, scripts/update.sh, scripts/reinstall.sh), the README pricing table, docs/routing-profiles.md, and the AI-agent-facing model catalog in skills/clawrouter/SKILL.md. Premium routing tier (blockrun/premium) now uses K2.6 as the SIMPLE primary and as a fallback in MEDIUM/COMPLEX, with nvidia/kimi-k2.5 retained as the first fallback for reliability. The generic kimi/moonshot aliases still resolve to nvidia/kimi-k2.5 (matches BlockRun server's blockrun/kimi stance); users opt in to K2.6 explicitly via kimi-k2.6 or blockrun/premium.
  • GitHub restored as canonical source — BlockRunAI GitHub org is back. package.json repository.url, README badges, CONTRIBUTING clone URL, openclaw.security.json, all docs (anthropic-*, clawrouter-cuts-*, clawrouter-vs-openrouter, 11-free-ai-models, llm-router-benchmark-*, smart-llm-router-14-dimension-classifier, subscription-failover, troubleshooting), skills/release/SKILL.md, and the sse-error-format regression-test comment now point at github.com/BlockRunAI/ClawRouter. GitLab mirror (gitlab.com/blockrunai/ClawRouter) is kept as a secondary remote for redundancy but is no longer advertised. Metadata + docs only; no runtime/code changes.