LakBud/vernLLM

The LLM call framework. Resilience, observability, and control for AIs.

2

stars

594

commits

TypeScript

primary language

Sep 11, 2026

updated

vernllm.dev
ai
circuit-breaker
llm
llm-cache
llm-framework
model-switching
rate-limiting

README

VernLLM banner

Documentation · Package · npm

npm version npm downloads build checks status lint status typecheck status unit test status integration test status codeql status license pnpm monorepo

The LLM call framework. Resilience, observability, and control for every call.

One interface across OpenAI-compatible, Anthropic, Gemini, and Bedrock, with retries, circuit breaking, fallback, rate limiting, caching, and middleware built in, all running in your own process rather than a new network hop.

import Anthropic from '@anthropic-ai/sdk';
import OpenAI from 'openai';
import { fromAnthropic, fromOpenAI, VernLLM } from 'vern-llm';

const openai = fromOpenAI(new OpenAI({ apiKey: process.env.OPENAI_API_KEY }));
const anthropic = fromAnthropic(new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY }));

const llm = new VernLLM({
  client: openai,
  model: 'gpt-4o',
  fallback: { client: anthropic, model: 'claude-sonnet-5', circuitBreaker: true },
  rateLimit: { requestsPerMinute: 500, tokensPerMinute: 100_000, maxConcurrent: 20 },
  retryBudget: { windowMs: 60_000, minCalls: 20, retryRatio: 0.2 },
  maxRetries: 3,
  timeoutMs: 10_000,
  defaultMaxTokens: 1000,
  defaultReasoningEffort: 'medium',
});

const result = await llm.call({ userContent: "What's the weather in New York?" });

Works with OpenAI, Groq, Mistral, DeepSeek, Cerebras, Together AI, Fireworks AI, Ollama, Anthropic, Gemini, AWS Bedrock, or any provider reachable over HTTP via a fromFetch adapter.

Repository layout

This is a pnpm monorepo with two workspaces:

PathDescription
packages/vern-llmThe vern-llm npm package: source, tests, and its own README with the full API reference.
apps/docsThe Fumadocs-powered documentation site.

License

MIT © LakBud

Contributors

LakBud

526 commits

renovate[bot]

21 commits

LakBud/vernLLM

The LLM call framework. Resilience, observability, and control for AIs.

2

stars

594

commits

TypeScript

primary language

Sep 11, 2026

updated

vernllm.dev
ai
circuit-breaker
llm
llm-cache
llm-framework
model-switching
rate-limiting

README

VernLLM banner

Documentation · Package · npm

npm version npm downloads build checks status lint status typecheck status unit test status integration test status codeql status license pnpm monorepo

The LLM call framework. Resilience, observability, and control for every call.

One interface across OpenAI-compatible, Anthropic, Gemini, and Bedrock, with retries, circuit breaking, fallback, rate limiting, caching, and middleware built in, all running in your own process rather than a new network hop.

import Anthropic from '@anthropic-ai/sdk';
import OpenAI from 'openai';
import { fromAnthropic, fromOpenAI, VernLLM } from 'vern-llm';

const openai = fromOpenAI(new OpenAI({ apiKey: process.env.OPENAI_API_KEY }));
const anthropic = fromAnthropic(new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY }));

const llm = new VernLLM({
  client: openai,
  model: 'gpt-4o',
  fallback: { client: anthropic, model: 'claude-sonnet-5', circuitBreaker: true },
  rateLimit: { requestsPerMinute: 500, tokensPerMinute: 100_000, maxConcurrent: 20 },
  retryBudget: { windowMs: 60_000, minCalls: 20, retryRatio: 0.2 },
  maxRetries: 3,
  timeoutMs: 10_000,
  defaultMaxTokens: 1000,
  defaultReasoningEffort: 'medium',
});

const result = await llm.call({ userContent: "What's the weather in New York?" });

Works with OpenAI, Groq, Mistral, DeepSeek, Cerebras, Together AI, Fireworks AI, Ollama, Anthropic, Gemini, AWS Bedrock, or any provider reachable over HTTP via a fromFetch adapter.

Repository layout

This is a pnpm monorepo with two workspaces:

PathDescription
packages/vern-llmThe vern-llm npm package: source, tests, and its own README with the full API reference.
apps/docsThe Fumadocs-powered documentation site.

License

MIT © LakBud

Contributors

LakBud

526 commits

renovate[bot]

21 commits

Languages

TypeScript

75.6%

MDX

24.0%