Repository navigation
v3.15.0 — Solana streaming, and the 3.14.4 billing fixes
Ships two rounds of work: the account-billing fixes cut as 3.14.4 (whose publish correctly refused on a broken tree and never reached npm), plus Solana streaming. Upgrading from 3.14.3 gets both.
Added
SolanaLLMClient.stream() — streaming chat paid on Solana. Its absence was not a missing convenience: SolanaLLMClient had chat, chatCompletion, search, exa and the rest, but no way to consume a response as it arrived, so every agent harness built on this SDK was Base-only whatever the docs said.
Same signature as BlockrunClient.stream(): stream<T>(path, body?), yielding each data: frame already parsed as JSON and stopping at [DONE]. The x402 handshake completes before the first frame is handed out, including the same verification-phase fresh-blockhash re-sign the non-streaming paths do. A settlement-phase rejection is still never re-signed, because it may already have moved USDC. A 200 on the first request streams as-is and settles nothing — that is the free tier, and also API-key mode.
src/sse.ts — the SSE frame reader, now shared by both clients rather than copied.
Fixed (from 3.14.4)
- A billed account POST could be replayed three times.
ApiKeyAuthretries only GET/HEAD, but the Anthropic SDK has its own retry layer above it, and in account mode the compat fetch runs withraiseErrors=false, so a 429 or 5xx came back as an ordinary response and the SDK re-sent it.maxRetries: 0in account mode. - Cancellation was ignored on two paths — a bare
setTimeoutbackoff, and a compat fetch that discarded the caller's signal. Both propagate abort now. - The published types did not resolve under
npm install --omit=optional, becausedist/index.d.tsimports@anthropic-ai/sdkwhile that package was optional. It is a regular dependency now. new OpenAI({ walletKey: '', privateKey: '0xREAL' })used the wrong credential — a blank string is not nullish, so it shadowed the real key.- Video timeout copy no longer promises "No payment was taken", which held for wallet settlement but not an account debit.
Changed
The Solana 402 signing block is written once instead of three times. handlePaymentAndRetry, handlePaymentAndRetryRaw and handleGetPaymentAndRetryRaw each carried their own copy of "parse the requirements, check the network, sign the transfer" — the code that signs a transfer of the caller's USDC, so three copies meant every fix had to land three times or silently cover two thirds of the paths.
npm run test:package now runs in CI and in the release gate: it packs the tarball, installs it with --omit=optional, and compiles the public types under --strict. Verify package was only npm pack --dry-run, which proves the tarball builds and never installs it — which is how 3.14.3 shipped with unresolvable declarations.