v1.5.0
Consolidates the unreleased 1.4.0 scope and undocumented features into a single minor release. 1.4.0 was tagged in package.json but never published to npm; consumers upgrading from 1.3.0 receive all of the following atomically.
Added
- Declarative model catalog (
src/model-catalog.ts) — semantic catalog for provider/model metadata, recommendation use cases, lifecycle status, and runtime scoring - Runtime recommendation API —
LLMProviders#getRecommendedModel(request, useCase?)exposes the same routing logic the factory uses internally - Schema drift envelope validation —
OpenAIProvider,GroqProvider,CerebrasProvider, andAnthropicProvidernow validate response envelopes at the provider boundary, throwingSchemaDriftErroron mismatch instead of corrupting downstream consumers silently LLMProviders.fromEnv()static factory — auto-discovers providers from Cloudflare Workersenvbindings without manual wiring- Model drift test — asserts every provider's
models[]is symmetrically covered by its capabilities map - Catalog tests — coverage for retired-model exclusion, health-aware ranking, request-shape use-case inference
Changed
- Factory routing selects provider/model pairs from the catalog instead of hardcoded ordering
- Health-aware dispatch considers circuit-breaker state including degraded and recovering providers, not just fully open
- Budget-aware dispatch — with a
CreditLedgerattached, selection demotes providers under high utilization or near projected depletion - Provider defaults for OpenAI, Anthropic, Cloudflare, Cerebras, and Groq resolve through the shared catalog
- Cloudflare model recommendation prefers modern active baselines (Gemma 4, GPT-OSS) instead of legacy TinyLlama/Qwen heuristics
- Recommendation exports exclude retired targets (e.g.
gpt-4o) while preserving deprecated constants for compatibility
Deprecated
MODELS.CLAUDE_3_HAIKU— migrate toCLAUDE_HAIKU_4_5orCLAUDE_3_5_HAIKUMODELS.GPT_4O— migrate toGPT_4O_MINIor a current GPT-4 successor
Removed
claude-3-haiku-20240307,gpt-4o, and dead aliasgpt-4-turbo-previewdropped from providermodels[]and capabilities tables. Arbitrary-string passthrough on request inputs is unchanged — consumers pinning olderMODELSenum values via string literals are not affected.
Full changelog: CHANGELOG.md