Model & provider clients
The wired SDK clients for model providers and blob storage — the building blocks capture, replay, and attribution will consume.
What it is
src/lib/anthropic.ts— the Anthropic SDK client pluscountTokensfrom@anthropic-ai/tokenizer.src/lib/openrouter.ts— OpenRouter via the OpenAI-compatible SDK, with referer/title headers.src/lib/blob.ts— Vercel Blobput/del/head/listre-exports.
One module per provider. New providers each get their own
src/lib/<provider>.ts — there is never a second client for the same
provider.
What's next — BYOK-aware resolution
Per the pure-BYOK pricing model, calls must use the customer's key, never a platform key. Today the clients read platform env vars; this must become per-tenant key resolution before any customer-facing use. The BYOK rework is also a forensic property — BYOK signing keys are what make per-tenant tamper-evidence possible.
Why it matters
These are the substrate for the capabilities users will actually run — replay, attribution, model-version diffing — and for evidence-bundle storage. Pillar work imports these clients rather than instantiating its own.
Last updated