CODING PROJECT

llm-retry-kit

A dependency-free TypeScript resilience layer for production LLM calls with retries, provider fallbacks, circuit breakers, budgets, and observability hooks.

llm-retry-kit

About the project

Repository overview

llm-retry-kit wraps the reliability policy around an actual LLM SDK call, keeping transient provider failures from becoming fragile application code.

Capabilities

Provider-aware retries, jittered exponential backoff, Retry-After handling, named fallback chains, streaming retries before the first chunk, circuit breakers, adaptive hedging, rolling cost windows, cancellation, timeouts, and strict TypeScript types.

Distribution

The project is published as an ESM package with no runtime dependencies and is designed to fit into existing OpenAI or Anthropic integrations.