█

AI/TLDR

मुझे पिलाएं कॉफ़ी
मुझे एक कॉफ़ी पिलाएँ

LiteLLM

एक OpenAI-compatible API के ज़रिए 100+ LLM प्रोवाइडर को कॉल करें

Gateways & Routingओपन सोर्स
ताज़ा
v1.107.0
अपडेट किया गया
21 अक्टू॰ 2026
भाषा
Python
कवरेज
8 stories
$uv add litellm

नया क्या है

v1.107.021 अक्टू॰ 2026

Security incident: the release pipeline was compromised, and litellm 1.107.0 on PyPI plus the v1.107.0, latest, main-latest and main-stable Docker Hub and GHCR images shipped malware that steals credentials and loads remote-code-execution tooling. LiteLLM advises pinning 1.106.2, rebuilding affected environments and rotating every secret the host could reach.

ताज़ा खबरें

सभी 8 ↓
संक्षेप में

LiteLLM क्या है?

LiteLLM एक OpenAI-compatible API के ज़रिए 100+ LLM प्रोवाइडर को कॉल करें. यह Evaluation & Production Ops टूल्स की Gateways & Routing श्रेणी में आता है; ओपन सोर्स है और Python में लिखा गया है। शुरू करने के लिए: python SDK इंस्टॉल करें.

अपडेट किया गया Markdown वर्शन ↗

सारांश

Diagram: a developer calls LiteLLM in the centre, which fans out to A2A agents, MCP tools and LLM APIs from OpenAI, Anthropic and Google
The gateway shape: application code talks to LiteLLM, and LiteLLM talks to A2A agents, MCP tools and the provider APIs behind them.BerriAI/litellm README ↗

LiteLLM एक ओपन सोर्स AI gateway है, जो OpenAI, Anthropic, Gemini, Bedrock और Azure सहित 100+ LLM प्रोवाइडर को कॉल करने के लिए एक ही unified interface देता है, और ये सभी OpenAI request format में काम करते हैं। हर model के लिए अलग SDK, auth पैटर्न और error type संभालने के बजाय, आप अपना code एक बार लिखते हैं और model name बदलकर प्रोवाइडर बदल देते हैं।

इसे दो तरीकों से इस्तेमाल किया जा सकता है। Python SDK के रूप में, आप `completion` function import करके अपने application से सीधे किसी भी model को कॉल करते हैं। AI Gateway (proxy server) के रूप में, इसे एक central service की तरह deploy किया जाता है, जिससे आपकी पूरी टीम जुड़ती है, और virtual keys, spend tracking व load balancing एक ही जगह से संभाले जाते हैं।

LLM gateway के रूप में, LiteLLM आपके apps और model प्रोवाइडर के बीच बैठता है। यह उन टीमों के लिए उपयुक्त है जो models तक पहुँचने का तरीका standardize करना चाहती हैं, client code को OpenAI-compatible रखना चाहती हैं, और हर integration को दोबारा लिखे बिना cost tracking, budgets और fallbacks जोड़ना चाहती हैं।

यह क्या करता है

  • 100+ LLM के लिए एक unified API, ताकि provider-specific SDK की ज़रूरत न पड़े
  • Drop-in OpenAI compatibility — अपना code बदले बिना सिर्फ model string बदलकर प्रोवाइडर स्विच करें
  • Virtual keys, spend tracking, guardrails और load balancing वाला Proxy server (AI Gateway)
  • Keys मैनेज करने और usage मॉनिटर करने के लिए बिल्ट-इन Admin dashboard
  • कई endpoint types सपोर्ट करता है: chat/completions, responses, embeddings, images, audio, batches और rerank
  • SDK या gateway के ज़रिए A2A agents (LangGraph, Vertex AI Agent Engine, Bedrock AgentCore, Pydantic AI) को invoke कर सकता है

शुरू करें

LiteLLM सीधी कॉल के लिए Python SDK के रूप में, या पूरी टीम के लिए proxy server के रूप में काम करता है। शुरू करने के लिए कोई एक चुनें।

Python SDK इंस्टॉल करें

अपने project में LiteLLM जोड़ें।

bashbash
uv add litellm

अपनी पहली कॉल करें

ज़रूरी provider API keys सेट करें, फिर OpenAI-format वाले `completion` function से किसी भी model को कॉल करें। model string बदलकर प्रोवाइडर बदलें।

pythonpython
from litellm import completion
import os

os.environ["OPENAI_API_KEY"] = "your-openai-key"
os.environ["ANTHROPIC_API_KEY"] = "your-anthropic-key"

# OpenAI
response = completion(model="openai/gpt-4o", messages=[{"role": "user", "content": "Hello!"}])

# Anthropic
response = completion(model="anthropic/claude-sonnet-4-20250514", messages=[{"role": "user", "content": "Hello!"}])

या AI Gateway (proxy server) चलाएँ

proxy extra इंस्टॉल करें और उसे किसी model की ओर इंगित करके शुरू करें। यह port 4000 पर OpenAI-compatible endpoint उपलब्ध कराता है।

bashbash
uv tool install 'litellm[proxy]'
litellm --model gpt-4o

OpenAI client से gateway को कॉल करें

किसी भी OpenAI client को लोकल proxy base URL पर पॉइंट करें, ताकि requests LiteLLM के ज़रिए रूट हों।

pythonpython
import openai

client = openai.OpenAI(api_key="anything", base_url="http://0.0.0.0:4000")
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello!"}]
)

कमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।

कब इस्तेमाल करें

  • client code को बदले बिना OpenAI, Anthropic और Gemini के बीच स्विच करने वाला ऐप बनाएँ
  • एक central gateway चलाएँ, ताकि पूरी टीम virtual keys और per-team spend tracking वाला एक ही endpoint साझा करे
  • किसी एक model के डाउन होने पर भी requests चलती रहें, इसके लिए प्रोवाइडर के बीच fallbacks और load balancing जोड़ें
  • कई endpoint types (chat, embeddings, images, audio, rerank) के लिए calls को एक OpenAI-format API के पीछे standardize करें

वर्शन इतिहास

Every verified update to LiteLLM that AI/TLDR tracked, newest first — each links to our coverage and the official changeset.

  1. 21 अक्टू॰ 2026v1.107.0

    Security incident: the release pipeline was compromised, and litellm 1.107.0 on PyPI plus the v1.107.0, latest, main-latest and main-stable Docker Hub and GHCR images shipped malware that steals credentials and loads remote-code-execution tooling. LiteLLM advises pinning 1.106.2, rebuilding affected environments and rotating every secret the host could reach.

  2. 22 सित॰ 2026v1.102.0

    post_call guardrail pipelines now execute on streaming responses, rewriting text and tool calls mid-stream, with legacy post-call hooks running as steps in that pipeline. Streaming latency routing ranks by raw time-to-first-token and adds percentile-based selection, an OCR core arrives with Mistral, Azure, Vertex and Reducto adapters, and an in-container pgbouncer pools connections across workers.

  3. 15 सित॰ 2026v1.101.0

    A 1,902-commit release built around routing: heuristic v2 complexity routing, a classifier circuit breaker, auto-escalation for stalled router tasks, and opt-in modality-based routing for image requests. The native MCP Gateway gains semantic tool search, cost tracking learns time-based off-peak pricing, and OpenAI calls can use OIDC token exchange.

  4. 6 सित॰ 2026v1.100.0

    LiteLLM v1.100.0 adds native Vertex AI Interactions API support, Grounding with Bing Search as a search provider, and day-0 routing for gemini-3.5-transcribe. Budgets can now be shared across a model access group, backed by a new per-window spend table, and prompt_token_calculator was deleted from utils.

  5. 23 अग॰ 2026v1.98.0

    LiteLLM v1.98.0 adds provisioned-throughput billing (flat cost for reserved capacity instead of per-token), shadow evals for the auto-router, and a per-key prompt caching switch.

LiteLLM in the news

  1. 21 अक्टू॰ 2026प्रमुखLiteLLM 1.107.0 compromised — PyPI and Docker builds stole credentials
  2. 22 सित॰ 2026प्रमुखLiteLLM v1.102.0 — guardrails finally run on streaming responses
  3. 15 सित॰ 2026प्रमुखLiteLLM v1.101.0 — smarter complexity routing and a semantic MCP search
  4. 6 सित॰ 2026प्रमुखLiteLLM v1.100.0 — Vertex AI Interactions API and shared team budgets
  5. 23 अग॰ 2026प्रमुखLiteLLM v1.98.0 — reserved capacity gets flat-cost billing, not per-token
  6. 29 अप्रैल 2026प्रमुखLiteLLM CVE-2026-42208 — Critical SQL Injection in AI Gateway Exploited Within 36 Hours of Disclosure
  7. 25 अप्रैल 2026उल्लेखनीयGoModel — Lightweight AI Gateway in Go, LiteLLM Alternative
  8. 15 अप्रैल 2026प्रमुखAnthropic MCP Design Flaw Enables RCE Across 150M+ Downloads

से AI/TLDR रिलीज़ फ़ीड — हर आइटम प्रकाशित होने पर स्रोत से सत्यापित होता है।

How LiteLLM compares

LiteLLM alongside other open-source gateways & routing tools AI/TLDR tracks, ranked by GitHub stars.

टूलस्टारयह क्या करता है
OmniRoute★ 91.8kसैकड़ों प्रोवाइडर को एक OpenAI-compatible endpoint के पीछे लाने वाला लोकल-फ़र्स्ट AI gateway
Free Claude Code★ 75.9kClaude Code और नौ अन्य एजेंट CLI को मुफ़्त, पेड या लोकल मॉडल प्रोवाइडर से जोड़ें
LiteLLM★ 64.4kएक OpenAI-compatible API के ज़रिए 100+ LLM प्रोवाइडर को कॉल करें
magpie★ 44.8kएक लोकल गेटवे और मेन्यू बार ऐप, जो हर coding agent के लिए कोई भी मॉडल चुनने देता है
Kong Gateway★ 44.4kAPI गेटवे जो आपके LLM और MCP ट्रैफ़िक को भी संभालता है
9Router★ 33.1kकोडिंग CLI के लिए लोकल राउटर, जिसमें quota ट्रैकिंग, tiered fallback और token compression शामिल है
Experiential★ 20.6kहोस्टेड, BYOK, लोकल और कस्टम मॉडल्स के लिए एक OpenAI-compatible control plane
OpenCodex★ 18.9kCodex और Claude Code को किसी भी LLM प्रोवाइडर से जोड़ने वाला लोकल प्रॉक्सी