contribution/compass
BerriAI/litellm

LiteLLM

399 signals · 416 observation events

Open repository ↗

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

56.3K stars10.5K forksPythonNOASSERTIONai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmkeyword: LiteLLM
PROJECT NEWS

Release, roadmap, and discussion

All news →
BerriAI/litellm

LiteLLM

AI Infrastructure
Latest stable

v1.96.2

v1.96.2
  • Verify Docker Image Signature
  • The cosign claims were validated
  • The signatures were verified against the specified public key
  • What's Changed
  • chore(release): backport proxy request-handling maintenance and refresh runtime deps for 1.96.1 by @yuneng-berri in https://github.com/BerriAI/litellm/pull/36494
Original release notes ↗

Publicly indicated next

Prereleases and milestones indicate public plans; they are not delivery commitments.

Observation trail

  1. discoveredinitial snapshot
  2. discoveredinitial snapshot
  3. changedupdatedAt, metrics
  4. changedtext, updatedAt, metrics
  5. changedupdatedAt, metrics
  6. changedupdatedAt
  7. discoveredinitial snapshot
  8. changedupdatedAt, metrics
  9. changedupdatedAt, metrics
  10. changedupdatedAt
  11. changedupdatedAt, state
  12. changedupdatedAt, state
  13. changedupdatedAt, state
  14. changedupdatedAt, metrics
  15. changedupdatedAt
  16. discoveredinitial snapshot
  17. changedupdatedAt
  18. changedupdatedAt, metrics
  19. changedtext, updatedAt, metrics
  20. changedupdatedAt
  21. changedupdatedAt
  22. changedtext, updatedAt, metrics
  23. discoveredinitial snapshot
  24. discoveredinitial snapshot
  25. changedupdatedAt
  26. discoveredinitial snapshot
  27. discoveredinitial snapshot
  28. discoveredinitial snapshot
  29. changedtext, updatedAt, metrics
  30. discoveredinitial snapshot
50 shown
pull request

fix(proxy): let a fully blocked model fall back to a healthy group

## TLDR Problem this solves: - Blocked model returns 403 even when a healthy fallback is configured - The fallback group never gets a chance to serve the request How it solves it: - Check the fallback chain before raising at the proxy block gate - Raise 403 only when no fallback reaches an unblocked group ## User Flow Before: a developer whose primary model

importance 4@Awshesh12openOriginal evidence ↗
pull request

feat(guardrails): add aliyun security guardrail integration

## Relevant issues <!-- e.g., "Fixes #000" --> ## Linear ticket <!-- if you are an internal contributor, add "Resolves " followed by the Linear ticket e.g., "Resolves LIT-1234" to link the Linear ticket to the GitHub PR. If you don't have one, leave the section blank rather than guessing --> ## Pre-Submission checklist **Please complete all items before aski

importance 4@splendor023openOriginal evidence ↗
pull request

fix(github_copilot): forward reasoning params for all reasoning-capable models

## TLDR Problem this solves: - Copilot reasoning models silently ignore `reasoning_effort` - Invalid effort values return 200 instead of a validation error How it solves it: - Override `map_openai_params` so the params survive mapping - Gate them on the model's reasoning capability, not its name ## User Flow Before: a developer calling a reasoning-capable Co

importance 4@allenliang2022openOriginal evidence ↗
pull request

fix(responses_bridge): map max reasoning effort instead of dropping it

## TLDR Problem this solves: - `reasoning_effort: "max"` is silently ignored on responses-bridge models - Callers get a normal 200 at default reasoning depth How it solves it: - Add `max` to the accepted effort levels - Replace the per-level if/elif chain with a membership check ## User Flow Before: a developer raising reasoning depth to the highest level on

importance 4@allenliang2022openOriginal evidence ↗
pull request

fix(hosted_vllm): honor custom_llm_provider on atranscription/aspeech/aimage_generation

## Summary - `atranscription` / `aspeech` / `aimage_generation` now pass `custom_llm_provider` into `get_llm_provider`, matching `aembedding`. Proxy deployments that register an unprefixed model with a separate `custom_llm_provider` (no `hosted_vllm/` prefix) no longer fail with `LLM Provider NOT provided`. - Hosted vLLM transcription URL joining now follows

importance 4@halfcrazyopenOriginal evidence ↗
pull request

feat(passthrough): add optional model hint for spend logs

## Summary - Pass-through endpoints can set an optional `model` on `PassThroughGenericEndpoint`. It is written to spend/logging when the request body has no `model` (document parsers and other non-LLM forwarders). - Request-body `model` still wins when present, so LLM passthroughs keep logging `gpt-4o` instead of the endpoint hint. - Without this, those endp

importance 4@halfcrazyopenOriginal evidence ↗
pull request

perf(guardrails): stop sending the conversation twice in the noma v2 payload

## TLDR Problem this solves: - Guardrail scan payload repeats the same conversation up to three times - Image heavy requests upload roughly 95% redundant bytes - The proxy also pays to serialize that duplicate How it solves it: - Drops `messages` and `input` from the forwarded request data - Drops the same two keys from the forwarded logging details - Trims

importance 4@itaimodiopenOriginal evidence ↗
pull request

fix(logging): isolate workers per event loop

## TLDR Problem this solves: - Async worker loops strand pending logging tasks when event loops change - Stranded tasks emit shutdown errors and lose queued callbacks How it solves it: - Keeps a logging worker registry isolated by running event loop - Starts bounded callback runners only while each loop has queued work - Drains and removes workers during exp

importance 4@jstar0openOriginal evidence ↗
pull request

fix(ui): add nvidia riva to the model provider list

## TLDR Problem this solves: - Nvidia Riva is missing from the Add Model provider list - Admins cannot add a Riva deployment from the UI - Riva logs and model rows render the raw slug How it solves it: - Adds a Riva entry to the provider fields endpoint - Exposes api_base, api_key and nvcf_function_id in the form - Registers the Riva display name, slug and l

importance 4@devin-ai-integration[bot]openOriginal evidence ↗
pull request

fix(bedrock): route knowledge base ingestion to control plane

## TLDR Problem this solves: Knowledge Base direct ingestion targets Agent Runtime PUT passthrough requests are signed as POST How it solves it: Routes direct ingestion to Bedrock Agent Signs requests using the original HTTP method Preserves existing Knowledge Base Retrieve routing Adds regression coverage for both routes ## User Flow Before: a developer can

importance 4@pyg410openOriginal evidence ↗
pull request

feat(azure_ai): shape FW-Kimi / Kimi like Moonshot for Foundry

## TLDR Problem this solves: - Azure Foundry `FW-Kimi-K3` rejects Claude-style sampling / medium `reasoning_effort` - Multi-turn tool calls fail without `reasoning_content` on assistant messages How it solves it: - Mirror Moonshot Kimi shaping on `azure_ai` for FW-Kimi / kimi-* models - Drop K3 fixed sampling params and invalid `reasoning_effort` - Inject /

importance 4@bruno-oliviaclosedOriginal evidence ↗
pull request

feat(guardrails): add new upstream presidio pii entities including german set

## TLDR Problem this solves: - Presidio upstream added 37 recognizers litellm's entity list doesn't expose - German identifiers (Steuer-ID, Personalausweis, KFZ, ...) can't be masked or blocked - Korea, Canada, Sweden, Thailand, Turkey, Nigeria, Philippines, South Africa also missing How it solves it: - Adds the 37 entities to `PiiEntityType` with 9 new cate

importance 4@MvdBopenOriginal evidence ↗
pull request

feat(ui): add user ID request log filter

## TLDR Problem this solves: - Request Logs cannot be narrowed to one authenticated internal user - End User often appears as an opaque JSON blob containing a device ID, so it is not a usable way to find an internal user - Using the global user directory would exclude team admins and expose users outside the caller's Request Logs scope How it solves it: - Ad

importance 4@daniel-meismer-zocdocopenOriginal evidence ↗
pull request

fix(bedrock): drop trailing empty Converse chunk

## TLDR Problem this solves: - Bedrock Converse streams emit content after the terminal chunk. - Strict clients reject the extra assistant-role delta. How it solves it: - Metadata-only events no longer carry an assistant role. - Existing empty-chunk filtering removes the stripped metadata carrier. ## User Flow Before: a developer streaming Bedrock chat compl

importance 4@nightcitybladeopenOriginal evidence ↗
pull request

fix(router): support anthropic messages streaming fallback

## TLDR Problem this solves: - `/v1/messages` streams skip configured fallbacks after upstream errors - Failed provider streams can be logged as successful How it solves it: - Detects SSE errors and iterator transport failures - Uses fallbacks before response content reaches the client - Suppresses success logging for failed provider streams ## User Flow Bef

importance 4@Oxygen56openOriginal evidence ↗
pull request

fix(langfuse): introspect Langfuse.__init__ signature for sdk_integration kwarg

## Relevant issues Related to #13137, #11703 ## Linear ticket <!-- n/a --> ## Pre-Submission checklist - [x] I have Added testing in the [`tests/test_litellm/`](https://github.com/BerriAI/litellm/tree/main/tests/test_litellm) directory, **Adding at least 1 test is a hard requirement** - [see details](https://docs.litellm.ai/docs/extras/contributing_code) - [

importance 3@michelligabrieleclosedstaleOriginal evidence ↗
pull request

Fix Prometheus end-user metric cardinality tracking

<!-- CURSOR_AGENT_PR_BODY_BEGIN --> ## Summary Prometheus metrics that include resolved `end_user` labels could grow one child series per distinct end user without a cleanup path. This rebuilds the cardinality cap fix on the current staging branch, keeps the existing custom-metadata label handling intact, and applies Bugbot feedback by sharing the bounded tr

importance 3@ishaan-berriclosedstaleOriginal evidence ↗
pull request

[LIT-2881] Admin UI — /agents three-pane dashboard (Cursor SDK)

## Relevant issues ## Linear ticket Resolves LIT-2881 ## Pre-Submission checklist - [x] I have Added testing - 8 Playwright specs in `ui/litellm-dashboard/e2e_tests/tests/agents/` (one per validation criterion in LIT-2881) - [ ] My PR passes all unit tests on `make test-unit` - [x] My PR's scope is as isolated as possible, it only solves 1 specific problem -

importance 3@ishaan-berriclosedstaleOriginal evidence ↗
pull request

[LIT-2890] B2 — Warm pool + hydrate protocol (P95 230ms)

## Relevant issues ## Linear ticket Resolves LIT-2890. Stacks on top of: - LIT-2877 / PR #27330 (Epic A — `/v2/sessions` endpoint) - LIT-2878 / PR #27335 (Epic B1 — VM provider abstraction + AMI) - LIT-2891 / PR pending (Epic G — agent settings UI + `LiteLLM_AgentVMConfig`) Those PRs land first; my PR's diff against `litellm_internal_staging` shows their cha

importance 3@ishaan-berriclosedstaleOriginal evidence ↗
pull request

[WIP] Litellm Metric Reporting Improvements

## Relevant issues <!-- e.g. "Fixes #000" --> ## Linear ticket <!-- if you are an internal contributor, add the Linear ticket e.g. "Resolves LIT-1234" to magically link the Linear ticket to the GitHub PR --> ## Pre-Submission checklist **Please complete all items before asking a LiteLLM maintainer to review your PR** - [ ] I have Added testing in the [`tests

importance 3@harish-berriopenstaleOriginal evidence ↗
pull request

fix(anthropic): honor bearer auth for messages custom base

## Relevant issues Fixes #33055 ## Linear ticket ## Pre-Submission checklist - [x] I have added meaningful tests - [ ] My PR passes all CI/CD checks (e.g., lint, format, unit tests) - [x] My PR's scope is as isolated as possible; it only solves 1 specific problem - [ ] I have received a Greptile **Confidence Score of at least 4/5** before requesting a mainta

importance 3@yimaoclosedOriginal evidence ↗
pull request

fix(proxy): propagate Invoke cache-token counts to usage

## TLDR Problem this solves: - Bedrock Invoke streaming drops `cacheRead`/`cacheWrite` token counts from usage → cache-heavy Claude traffic billed as fresh input (4–7× over-report) - The usage-only recovery fallback also drops cache-write tokens on large/agentic streams How it solves it: - Map the two cache fields in the Invoke decoder, and read `cache_creat

importance 3@yryzhan-vitechopenOriginal evidence ↗
pull request

fix(anthropic/adapter): copy input_schema so tool translation stops mutating caller's dict

## TLDR Problem this solves: - Anthropic→OpenAI tool translation mutates the caller's `input_schema` in place - Reused tool lists get polluted with non-schema keys on the second translation How it solves it: - Shallow-copy `input_schema` before assigning it to `parameters` - The vendor-kwargs loop now writes to the copy, never the source ## Relevant issues F

importance 3@yryzhan-vitechopenOriginal evidence ↗
pull request

test: remove four mirror test files that exercise none of their module

## TLDR Problem this solves: - Four mirror test files never execute their own module - They pass against arbitrarily broken implementations of it - Their coverage numbers are false confidence How it solves it: - Removes the four files, 1,581 lines - Each removal backed by per-file mutation evidence below - Misplaced sibling findings kept for retargeting, not

importance 3@yuneng-berriclosedOriginal evidence ↗
pull request

fix(proxy): convert budget window reset_at to UTC before comparing

## Summary Fixes #34896 `ResetBudgetJob._reset_expired_window()` stripped tzinfo from `reset_at` **without first converting to UTC**. When `litellm_settings.timezone` is a non-UTC zone (e.g. `Asia/Tokyo`), `reset_at` carries that offset (`+09:00`), so the local wall-clock value was compared against naive UTC `now` and the window reset fired late by the timez

importance 3@Solaris-starOriginal evidence ↗
pull request

fix(proxy): preserve Router model_group in SpendLogs when guardrails add litellm_metadata

## Summary Fixes #34905 When a unified `pre_call` guardrail creates `litellm_metadata` alongside the Router's `metadata` dict, `add_missing_spend_metadata_to_litellm_metadata` only copied keys containing `user_api_key`. Router-set keys like `model_group`, `model_id`, and `deployment` were dropped, leaving `SpendLogsPayload.model_group` empty and breaking spe

importance 3@Solaris-starOriginal evidence ↗
pull request

fix(ui): align spend and budget columns

## TLDR Problem this solves: Spend data takes too much effort to read. * Significant digits are not vertically aligned, preventing easy scanning * Most views do not need four decimal places of precision, which adds noise without helping users make decisions. > <img width="270" height="641" alt="Spend values before alignment" src="https://github.com/user-atta

importance 3@daniel-meismer-zocdocclosedOriginal evidence ↗
pull request

fix(ui): resolve Generic Guardrail API config fields not rendering

## Problem When adding a Generic Guardrail API guardrail via the Admin UI (Guardrails > Add New Guardrail > Add Provider Guardrail), selecting "Generic Guardrail API" as the provider renders "No configuration fields available for this provider." The expected API Base, API Key, and optional parameter fields never appear. Closes #34927 ## Root Cause In guardra

importance 3@PiedPiper911openOriginal evidence ↗
pull request

fix(batches): isolate CheckBatchCost failures per job

## TLDR Problem this solves: - One poisoned managed batch aborts the entire `CheckBatchCost` poll cycle - Sibling batches in the same cycle never reconcile or bill - A metrics-backend failure while recording the error can also abort the cycle How it solves it: - Wrap each per-job poll body in its own error boundary - Make Prometheus error recording best-effo

importance 3@Souravrajvi0openOriginal evidence ↗
pull request

test(agents): assert the tuple get_agent_list now returns

## TLDR Problem this solves: - `proxy-server / Run tests` is red on every staging PR - #36020 made `get_agent_list` return a tuple, one assert still expects a list How it solves it: - Compare against `()` instead of `[]`, keeping the same emptiness assertion ## User Flow Not user-facing: a test-only assertion fix to unblock CI on the staging branch ## Releva

importance 3@devin-ai-integration[bot]closedOriginal evidence ↗
pull request

fix(a2a): stop sending stream in the JSON-RPC body for message/stream

## Relevant issues ## Linear ticket ## Pre-Submission checklist **Please complete all items before asking a LiteLLM maintainer to review your PR** - [x] I have added meaningful tests - [x] My PR passes all CI/CD checks (e.g., lint, format, unit tests) - [x] My PR's scope is as isolated as possible; it only solves 1 specific problem - [x] I have received a Gr

importance 3@kr0kopenOriginal evidence ↗
pull request

fix(anthropic): preserve tool reference results

## TLDR Problem this solves: - ToolSearch results vanish during Responses translation - Providers reject the unmatched function call How it solves it: - Converts tool references into loaded-tool text - Adds the official type and regression coverage ## User Flow Before: a Claude Code user cannot continue after deferred tools are discovered 1. They send POST h

importance 3@ump45noseopenOriginal evidence ↗
pull request

fix(utils): register_model with an empty payload silently turns unknown-model cost errors into $0.0

## Title `register_model()` with an empty payload silently converts "model isn't mapped" errors into $0.0 costs — `Router.__init__` triggers it for every deployment configured without pricing. ## Relevant issues None filed — found while working in this code path. Repro below. ## The bug `register_model()` always ran: ```python litellm.model_cost.setdefault(m

importance 3@lets-order-some-friesopenOriginal evidence ↗
pull request

feat(guardrails): add aliyun security guardrail integration

## TLDR <!-- Fill in the bullets below and keep each one short and concrete: one line per bullet, roughly 10 words max This section must be extremely human parsable, comprehensible, and readable: its target audience is humans, not AI agents --> Problem this solves: - <blah> - ... How it solves it: - <blah> - ... ## User Flow <!-- Two ordered lists, Before an

importance 3@splendor023closedOriginal evidence ↗
pull request

test(ui): scope the role-gate assertions to each page's own endpoint

## TLDR Problem this solves: - Three page tests are red on `litellm_internal_staging` - They assert a denied role fires no request at all - Their names and next line say: no request for this page's data - Resolving org-admin status legitimately fetches `/organization/list` - That unrelated request fails the blanket assertion How it solves it: - Drops the bla

importance 3@tin-berriclosedOriginal evidence ↗
pull request

refactor(ui): migrate cost-optimization to shadcn

## TLDR Problem this solves: - Cost Optimization still used legacy dashboard UI primitives How it solves it: - Moves the route shell to installed shadcn primitives - Preserves permissions, tab behavior, and data flows ## User Flow Before: a proxy admin can use Cost Optimization, but its route shell follows the legacy dashboard visual system 1. They open `htt

importance 3@yuneng-berriclosedOriginal evidence ↗
pull request

refactor(ui): migrate cost-tracking to shadcn

## TLDR Problem this solves: - Cost Tracking helpers still used legacy UI primitives How it solves it: - Moves calculator helpers to installed shadcn primitives - Adds complete keyboard behavior to the export menu ## User Flow Before: a proxy admin can calculate discounts and export estimates, but these helpers use the legacy dashboard visual system 1. They

importance 3@yuneng-berriclosedOriginal evidence ↗
pull request

test(e2e-ui): verify UI mutations against the API instead of trusting the toast

## TLDR Problem this solves: - Admin UI e2e tests stop at "a success toast appeared" - A save that persists nothing looks identical to one that worked - No UI test ever added a model and then called it - MCP servers had no edit or delete coverage at all How it solves it: - Every mutating flow now asserts the outgoing request body - Then reads the resource ba

importance 3@yuneng-berriclosedOriginal evidence ↗
pull request

refactor(ui): migrate users dashboard to shadcn

## TLDR Problem this solves: - The Internal Users route shell still used legacy dashboard UI primitives How it solves it: - Moves the form-free route shell to installed shadcn primitives - Preserves proxy-admin tabs, table actions, loading, selection, and tab-panel state ## User Flow Before: a proxy admin can manage internal users, but the route shell follow

importance 3@yuneng-berriclosedOriginal evidence ↗
pull request

fix: guardrail logs miss rows at the date range edges outside UTC

## TLDR Problem this solves: - Guardrail logs silently drop rows near the range edges - Only bites viewers off UTC, by their offset - On IST that hides 5.5 hours of every range How it solves it: - Send the picker's local day as UTC instants - Endpoint already takes a timestamp, so nothing changes server side - Tests pin non-UTC zones, where the bug is visibl

importance 3@ujitkumar1Original evidence ↗
pull request

fix(proxy): route blocked models through healthy fallbacks

## TLDR Problem this solves: - Fully blocked primary deployments reject requests before configured fallbacks run. - Healthy fallback deployments therefore cannot recover availability. How it solves it: - Preserve the blocked-model error when no fallback deployment is available. - Let the Router fallback chain run when a fallback remains unblocked. - Add mock

importance 3@Duxl-AiopenOriginal evidence ↗
pull request

fix(streaming): dict-usage arm drops prompt_tokens_details/completion_tokens_details its sibling arms preserve

## Title The dict arm of streaming usage conversion drops `prompt_tokens_details` / `completion_tokens_details` — its two sibling arms preserve them. ## Relevant issues None filed for this specific defect. **This is deliberately NOT a fix for #36168** — that issue is about SDK `CompletionUsage` objects on choices-bearing chunks and already has three open PRs

importance 3@lets-order-some-friesopenOriginal evidence ↗
pull request

fix(dashscope): bill tiered pricing by the request-size tier, not graduated slicing

## TLDR Problem this solves: - DashScope tiered pricing was billed with graduated, income-tax-style slicing - Alibaba Model Studio instead picks one tier by total input tokens and bills the whole request at it - large Qwen requests were under-charged, and logged spend disagreed with the budget reservation code How it solves it: - select one tier from the req

importance 3@Anuj7411openOriginal evidence ↗
pull request

test: remove tests that never execute

## TLDR Problem this solves: - 39 test functions are collected every CI run and always skip - 30 more are byte-identical duplicates under a second name - 9 are shadowed by a later definition, so they never run - Coverage numbers count all of them as tests How it solves it: - Delete the 18 always-skipped files and the 1 demo script - Delete one of each duplic

importance 3@yuneng-berriclosedOriginal evidence ↗
pull request

test: rename tests that a later definition shadowed

## TLDR Problem this solves: - Eight tests are silently unreachable, shadowed by a same-named `def` - Python keeps only the last binding, so pytest never collects them - Each dead copy asserts something its survivor does not - The files still look like they cover those scenarios How it solves it: - Rename each dead copy to say what it actually covers - Only

importance 3@yuneng-berriclosedOriginal evidence ↗
pull request

refactor(ui): migrate guardrail and duration controls to shadcn

## TLDR Problem this solves: - Shared guardrail and duration controls still depend on antd - Those dependencies block the shared-component migration track How it solves it: - Replaces both controls with installed shadcn primitives - Preserves behavior with pre-migration characterization tests ## User Flow Before: an admin sees legacy controls while managing

importance 3@yuneng-berriclosedOriginal evidence ↗
pull request

refactor(ui): migrate search and user controls to shadcn

## TLDR Problem this solves: - Shared search and user controls still depend on antd - Those dependencies block the shared-component migration track How it solves it: - Replaces both controls with installed shadcn primitives - Preserves behavior with pre-migration characterization tests ## User Flow Before: an admin sees legacy controls while managing models

importance 3@yuneng-berriclosedOriginal evidence ↗