/claim #286
Summary
Fixes #286
Implements a multi-provider LLM routing system inspired by LiteLLM for the EdgeChains JS SDK.
Features
- Load Balancing — round-robin, least-tokens, latency-based, cost-based strategies with RPM/TPM rate limiting
- Streaming — AsyncGenerator-based with automatic fallback on stream errors
- Token Usage Tracking — per-model counters with
getUsage() and resetUsageCounters()
- Logging — Sentry breadcrumbs + error capture, PostHog event tracking, custom callbacks
Testing
24 tests (unit + e2e with mock servers), all passing. TypeScript compiles clean.