llm-integration
Integrating LLM providers into a TypeScript/NestJS backend - provider-agnostic abstraction, streaming to clients, structured output with schema validation and repair, timeouts, cancellation, retries with backoff and jitter, rate limit handling, fallbacks across models and providers, token and cost budgets, usage accounting, API key handling, idempotency, and error mapping. Load when adding or changing a model call, wiring a new provider, handling streaming responses, or debugging flaky, slow or expensive LLM requests.
Pinned to revision c74eff4a9f08, so it is the text this page describes rather than whatever the author pushed since.
Files
Every link opens the file at its source, pinned to the revision this page describes.