SShortSingh.
Back to feed

Python library llm-api-resilience adds unified failover and retry logic across LLM providers

0
·1 views

A developer has released llm-api-resilience, an open-source Python library designed to handle retries, circuit breakers, ordered failover, and checkpoint recovery across multiple large language model providers. The library addresses the problem of duplicated resilience logic that arises when applications integrate OpenAI, Anthropic, and Google simultaneously, each of which exposes different APIs, error types, and message formats. It builds on a companion package called llm-api-adapter, which normalizes provider-specific differences behind a single interface, allowing the resilience layer to operate on a shared contract. Developers can define a single recovery plan with ordered fallback routes, so if one provider fails, the application automatically tries the next without provider-specific handling code. The library is available via pip and its source is published on GitHub.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

CORE Framework Puts Hard Rules Above AI Reasoning in Code Governance

A developer has built an open-source framework called CORE that enforces architectural rules through deterministic engines rather than allowing AI reasoning to override them. The system stores its governing rules as YAML files in a protected directory called .intent/, which no component — human or AI — can modify without going through a formal, audited review process. Even the framework's creator found his own commits flagged and was required to fix violations through the same governed path as any other actor. The core design principle holds that when intelligent systems can grant themselves exceptions, rules become mere suggestions and audit trails lose their authority. CORE positions its LLM-based reasoning engine in a reporting-only role, letting it propose changes but reserving final authority for the rule system itself.

0
ProgrammingDEV Community ·

RoPE Explained: How Rotating Query-Key Vectors Gives Transformers Long-Context Memory

Rotary Position Embedding (RoPE), introduced by Su et al. in 2021, addresses a core limitation of earlier positional encoding methods used in transformer-based language models. Traditional absolute encodings added sine-cosine vectors directly to input embeddings, causing models to fail on sequences longer than their training length. Relative bias approaches patched the attention matrix but broke GPU-level optimizations like FlashAttention and increased memory overhead. RoPE instead rotates Query and Key vectors in 2D sub-planes before attention is computed, ensuring that dot products depend only on the relative distance between tokens, not their absolute positions. This design preserves vector norms, remains compatible with efficient attention kernels, and scales naturally to longer contexts without retraining.

0
ProgrammingDEV Community ·

BrassCoders Exports Static Analysis Findings as YAML File Compatible with Major AI Editors

BrassCoders, a Python static analysis tool, runs 12 scanners and writes severity-sorted findings to a plain YAML file at .brass/ai_instructions.yaml after each scan. The file includes file paths, line numbers, and remediation notes, requiring no proprietary encoding or editor-specific plugins. Claude Code reads the file automatically when opened in the same project directory, while Cursor and Continue users can load it manually via @file references in their chat panels. This allows AI coding assistants to begin addressing issues from a structured context rather than discovering problems through conversation. Teams can also commit the findings file to a shared branch so all members reference consistent scan results without re-running the tool individually.

0
ProgrammingGitHub Blog ·

GitHub Copilot Now Billed at API Rates: Here Is What You Get for the Cost

GitHub has updated its Copilot billing model to charge usage at standard listed API rates. This change prompts a closer look at how Copilot differs from simply accessing AI models directly via raw API. While direct API access provides bare model capabilities, Copilot bundles additional value through coding-specific workflows, policy controls, and an integrated development harness. The distinction matters for developers and organizations weighing cost against the convenience and tooling that Copilot provides.

Python library llm-api-resilience adds unified failover and retry logic across LLM providers · ShortSingh