cd /news/developer-tools/vernllm-lightweight-resilience-layer… · home topics developer-tools article
[ARTICLE · art-66100] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

VernLLM - lightweight resilience layer for OpenAI SDK

A developer released vernLLM, a lightweight resilience layer for OpenAI-compatible chat completion APIs that provides built-in retries, timeouts, circuit breaking, caching, structured output, and usage tracking. The library aims to help developers handle production reliability issues like provider failures and rate limits without rebuilding infrastructure for each project.

read2 min views3 publishedJul 20, 2026

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.

Transient failures happen. vernLLM automatically retries recoverable errors while failing fast on validation errors and non-retryable responses.

Prevent hanging requests with configurable timeouts and cancellation support.

Automatically stop sending requests to failing providers and recover when the service becomes healthy again.

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
});

Constrain model generation itself instead of only validating responses afterward.

Cache LLM responses using your own cache adapter with cachedCall

and cachedLLMCall

.

Use the same API across multiple providers:

fromFetch

Many LLM applications end up creating their own wrappers around provider SDKs to handle:

vernLLM packages these patterns into a reusable, lightweight library so developers can focus on building AI features instead of maintaining infrastructure.

Install:

pnpm add vern-llm openai

Create your client:

import OpenAI from 'openai';
import { VernLLM } from 'vern-llm';

export const llm = new VernLLM({
  client: new OpenAI({ apiKey: process.env.OPENAI_API_KEY }),
  model: 'gpt-4o',

  maxRetries: 3,
  timeoutMs: 10_000,
  circuitBreaker: true,

  onUsage: ({ totalTokens }) => {
    console.log(`Used ${totalTokens} tokens`);
  },
});

// now do something with it!
export const summary = await llm.cachedLLMCall({
  cacheKey: `resume:${resumeId}`,
  ttl: 3600,
  call: {
    systemPrompt: 'Analyze this resume and return structured hiring insights.',
    userContent: resumeText,
    schema: HiringSummarySchema, // Zod schema
  }
});

vernLLM is designed with production usage in mind:

Whether you are building AI agents, document processing pipelines, chat applications, or LLM-powered tools, vernLLM provides the reliability layer needed to ship with confidence.

Documentation: https://vernllm.vercel.app/

GitHub: https://github.com/LakBud/vernLLM

Contributions, feedback, and ideas are welcome!

── more in #developer-tools 4 stories · sorted by recency
── more on @vernllm 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/vernllm-lightweight-…] indexed:0 read:2min 2026-07-20 ·