VernLLM - lightweight resilience layer for OpenAI SDK
Introducing vernLLM: A Resilience Layer for LLM Applications Building production-ready LLM applications is not just about sending prompts and receiving responses. Real-world AI systems need to handle timeouts, provider failures, rate limits, inconsistent outputs, and reliability issues. That is where vernLLM comes in. vernLLM is a lightweight resilience layer for OpenAI-compatible chat completion APIs , providing a single interface with built-in retries, timeouts, circuit breaking, caching, structured output, and usage tracking. Instead of rebuilding the same reliability features for every LLM project, vernLLM gives you the tools needed to make your AI integrations more robust from the start. Features Automatic retries with backoff Transient failures happen. vernLLM automatically retries recoverable errors while failing fast on validation errors and non-retryable responses. Timeouts & cancellation Prevent hanging requests with configurable timeouts and cancellation support. Circuit breaker protection Automatically stop sending requests to failing providers and recover when the service becomes healthy again. Structured output with type safety Pass a Zod schema and receive validated, typed results back. const result = await llm . call ({ systemPrompt : ' Return JSON: { "skills": string[] } ' , userContent : ' Extract skills from: ... ' , schema : SkillsSchema // zod schema }); Provider-native JSON Schema support Constrain model generation itself instead of only validating responses afterward. Built-in caching support Cache LLM responses using your own cache adapter with cachedCall and cachedLLMCall . One interface across providers Use the same API across multiple providers: OpenAI Groq Mistral DeepSeek Cerebras Together AI Fireworks AI Ollama Anthropic Gemini AWS Bedrock Any HTTP-compatible provider through fromFetch Why vernLLM? Many LLM applications end up creating their own wrappers around provider SDKs to handle: retry logic API failures provider switching respons