Commit Graph
33127 Commits
Author SHA1 Message Date
yuneng-jiangandGitHub 425f4e53f1 Merge pull request #21502 from milan-berri/fix/ui-model-credentials-batch-files
fix: resolve credentials for UI-created models in batch file uploads
2026-02-21 09:05:00 -08:00
Harshit JainandGitHub e463fc22d9 Merge pull request #21763 from Harshit28j/litellm_feat_sticky_sessions
feat: add session_id to have better routing
2026-02-21 21:21:52 +05:30
Harshit JainandGitHub f3ff9bf54f Merge pull request #21009 from BerriAI/litellm_docker-count-no-req
add tests for hotpath & docker container
2026-02-21 20:57:28 +05:30
Harshit Jain 456d8f5524 feat: add session_id to have better routing 2026-02-21 18:45:50 +05:30
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
e487d711d6 chore: regenerate poetry.lock to match pyproject.toml (#21758)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-21 11:26:55 +00:00
Harshit JainandGitHub 1df9bd96c7 Merge pull request #21743 from Harshit28j/litellm_rollback_safety_checks
doc: add rollback safety check
2026-02-21 13:13:43 +05:30
kang hee yongandGitHub 03ecdf9284 feat(openrouter): add openrouter/minimax/minimax-m2.5 pricing (#21664) 2026-02-20 22:24:58 -08:00
yuneng-jiangandGitHub 1fb7320b6d Merge pull request #21745 from BerriAI/litellm_org_member_email_ui
[Feature] UI - Organization Info: Show member email, AntD tabs, reusable MemberTable
2026-02-20 21:49:27 -08:00
yuneng-jiangandClaude Sonnet 4.6 ffc673da09 fix: use include user:True instead of nested select for Prisma Python compat
Prisma Python client does not support nested select within include.
Use include user:True to fetch the full user object; model_validator
extracts user_email from it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 21:41:53 -08:00
yuneng-jiangandClaude Sonnet 4.6 4597d34344 feat: org info page - AntD tabs, MemberTable with user_email
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 21:41:53 -08:00
yuneng-jiangandClaude Sonnet 4.6 a5ee421eef refactor: TeamMemberTab uses shared MemberTable component
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 21:41:53 -08:00
yuneng-jiangandClaude Sonnet 4.6 14e8af94a9 feat: add reusable MemberTable AntD component
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 21:41:53 -08:00
yuneng-jiangandClaude Sonnet 4.6 b61537cd0f feat: expose user_email in organization members response
Add user_email field to LiteLLM_OrganizationMembershipTable with a model_validator
that populates it from the nested user object, and update the /organization/info
Prisma query to select user_email from the related user record.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 21:41:53 -08:00
Harshit JainGitHubgreptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
80c3b236e2 Update docs/my-website/docs/troubleshoot/rollback.md
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-21 10:40:41 +05:30
Harshit JainGitHubgreptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
5916cf15ad Update docs/my-website/docs/troubleshoot/rollback.md
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-21 10:40:31 +05:30
Harshit Jain ece5b8c565 doc: add rollback safety check 2026-02-21 10:33:17 +05:30
yuneng-jiangandGitHub 36efd5384e Merge pull request #21739 from BerriAI/litellm_credential_tag_prefix
[Feature] UI - Usage: Prefix credential tags, update Tag usage banner
2026-02-20 21:00:16 -08:00
yuneng-jiang 9f3e20510d feat(usage): prefix credential tags and update Usage page banners
- Prefix credential name tags with "Credential: " to distinguish them
  from user-defined tags when litellm_credential_name is injected
- Remove stale "new feature" banners from Organization, Customer, and
  A2A usage views
- Add closable info banner to Tag usage view noting that reusable
  credentials are automatically tracked and appear as "Credential: <name>"
2026-02-20 20:55:57 -08:00
yuneng-jiangandGitHub b7efca22a2 Merge pull request #21723 from BerriAI/litellm_fix_cost_token_masking
[Fix] Model Info: input_cost_per_token masked in UI
2026-02-20 20:36:22 -08:00
yuneng-jiangandGitHub 8767b8f886 Merge pull request #21721 from BerriAI/litellm_suppress_dashboard_team_warn
[Fix] Suppress warning for litellm-dashboard team in agent permission handler
2026-02-20 20:36:09 -08:00
Ishaan JaffandGitHub 8e2aeeae0b feat(ui): Guardrail Garden - guardrail marketplace (#21732)
* feat(ui): add Guardrail Garden page with Vertex-style card layout

* feat(ui): add guardrail garden preset configs for form pre-fill

* feat(ui): add Guardrail Garden as first tab on guardrails page

* feat(ui): support preset prop in AddGuardrailForm for garden pre-fill

* fix(ui): fix merge syntax error in ComplianceUI

* refactor(ui): split guardrail_garden.tsx into focused modules
2026-02-20 19:47:04 -08:00
Krish DholakiaandGitHub 0888e17272 fix: ui fixes (#21731) 2026-02-20 19:29:55 -08:00
Ishaan JaffandGitHub 08520a9ed7 feat: add insults content filter + topic blocking compliance UI (#21729)
* add denied_insults.yaml content filter category

* add block_insults.csv eval set (299 cases)

* add block_insults.jsonl eval set (299 cases)

* add insults eval results (100% F1)

* add TestInsultsContentFilter eval class

* add generate_compliance_prompts.py script

* add insultsCompliancePrompts.ts (299 prompts from CSV)

* add financialCompliancePrompts.ts (207 prompts from CSV)

* add Topic Blocking framework to compliance playground UI
2026-02-20 19:10:31 -08:00
Krish DholakiaandGitHub e8d0afd7cb Guardrail - competitor name blocker (#21719)
* feat: add competitor name blocker guardrail

* fix: fix batch test endpoint for compliance playground

* fix(airline.py): add list of all known airlines to airline competitor name detector

prevent competitor discussion on company chatbot

* feat: ui tweaks for prod
2026-02-20 18:52:40 -08:00
Ishaan JaffandGitHub c61dea5af9 UI: Redesign guardrail creation form with vertical stepper (#21727)
* ui: redesign guardrail creation form with inline vertical stepper

Replace horizontal Ant Design Steps with an inline vertical stepper.
Completed steps collapse to a single line, active step expands.
Switch to Tremor buttons, rename steps for clarity.

* ui: rename Content Categories to Blocked topics and fix overflow

Update heading and description text, add flexWrap to prevent
text from going off-screen, fix YAML preview overflow with
pre-wrap and word-break.

* feat: support explicit display_name in content filter category YAML

Check for a display_name field before auto-generating from
category_name. Lets categories have human-friendly names
without changing their API identifier.

* fix: update denied_financial_advice display name

Add display_name field so it shows as
"Denied Financial / Investment Advice" in the UI.
2026-02-20 18:42:11 -08:00
yuneng-jiang 9eb61a9a56 fix: use UI_TEAM_ID constant instead of hardcoded string
Replace hardcoded "litellm-dashboard" string with the existing UI_TEAM_ID
constant from litellm.proxy._types to avoid duplication.
2026-02-20 18:14:57 -08:00
yuneng-jiangGitHubgreptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
65961988cb Update litellm/proxy/agent_endpoints/auth/agent_permission_handler.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-20 18:13:50 -08:00
yuneng-jiang ac7446bb76 fix: don't mask cost_per_token fields in SensitiveDataMasker
Fields like input_cost_per_token contain "token" as a key segment,
which incorrectly matched the sensitive patterns list and caused values
like 3.6e-06 to be displayed as "3.60*******e-06" in the model info UI.

Add a non_sensitive_overrides set (defaulting to {"cost"}) so that any
key containing "cost" as a segment is never masked, regardless of other
matching patterns.
2026-02-20 18:13:27 -08:00
Ishaan JaffandGitHub e0129710c8 fix(proxy): self-heal Prisma connection for auth and runtime (#21706)
* fix(proxy): add prisma reconnect primitive and db watchdog

* fix(proxy): start and stop prisma watchdog in lifecycle

* fix(auth): retry key lookup once after prisma reconnect

* test(proxy): add prisma self-heal watchdog coverage

* test(auth): cover reconnect-once behavior for key lookup

* refactor(auth): extract db reconnect helper and remove inline import

* fix(proxy): apply reconnect cooldown after attempt and add auth timeout path

* fix(auth): bound reconnect latency on key lookup path

* test(auth): assert reconnect timeout argument in key lookup

* test(proxy): verify reconnect cooldown timestamp set after attempt

* fix(proxy): harden prisma reconnect cycle semantics

* test(proxy): cover watchdog reconnect + timeout budget

* fix(proxy): bound watchdog probe and reconnect paths

* test(proxy): cover watchdog timeout and probe behavior

* fix(proxy): narrow prisma db connection error classification

* fix(proxy): add auth reconnect lock timeout budget

* fix(auth): pass lock timeout for db reconnect retries

* test(proxy): cover narrow prisma connection error detection

* test(proxy): add reconnect lock-timeout behavior coverage

* test(auth): assert reconnect lock timeout argument

* fix(proxy): avoid lock leak race in reconnect lock timeout path

* test(proxy): cover reconnect lock-timeout race cleanup
2026-02-20 18:11:36 -08:00
5246e64b98 Add topic blocker guardrail with keyword and embedding implementations (#21713)
* Add keyword-based topic blocker implementation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add embedding-based topic blocker using MiniLM

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add topic blocker package init with exports

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add synthetic engine eval set (34 cases)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add investment questions eval set (207 cases)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add engine eval synthetic policy config

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add engine keyword blocker eval results

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add investment keyword blocker eval results

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add investment embedding blocker eval results

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add investment embedding MiniLM eval results

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add investment embedding MPNet eval results (historical)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add investment TF-IDF eval results (historical)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add unified eval runner with confusion matrix reporting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add benchmarks comparison table in markdown

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Clean up topic blocker: remove unused blockers, add phrase_patterns to content filter

- Remove embedding_blocker.py, api_embedding_blocker.py, nli_blocker.py,
  tfidf_blocker.py, onnx_blocker.py (heavy deps not in Docker, inferior accuracy)
- Remove airline_off_topic_restriction policy template and its test
- Fix __init__.py to only export DeniedTopic and TopicBlocker (no eager import crash)
- Add phrase_patterns support to ContentFilterGuardrail for regex-based paraphrase detection
- Rewrite denied_financial_advice.yaml with conditional matching (identifier + block word),
  always-block keywords, phrase patterns, and exception phrases
- Clean up test_eval.py: only keyword blocker + content filter tests remain (no network calls)
- All 207 eval cases pass at 100% F1, 0 FP, 0 FN, <0.1ms latency

Addresses all Greptile review comments:
- Eager import crash (embedding deps) → fixed
- Undeclared dependencies → fixed (files deleted)
- lru_cache memory leak → fixed (file deleted)
- Real network calls in tests → fixed (embedding tests removed)
- Unused Dict import → already fixed

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add LLM-as-judge eval and update BENCHMARKS.md

- Add TestInvestmentLlmJudgeGpt4oMini and TestInvestmentLlmJudgeClaude
  test classes that use litellm.completion() to classify messages
- System prompt instructs LLM to act as airline chatbot content moderator
- Tests skip gracefully when API keys aren't set
- Update BENCHMARKS.md with production results table, historical comparison,
  and instructions for running LLM judge evals

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Move evals and benchmarks to guardrail_benchmarks folder

Move eval runner, eval data (JSONL), and results from
tests/test_litellm/.../topic_blocker/ into the guardrail implementation
folder at litellm/.../litellm_content_filter/guardrail_benchmarks/.

This keeps benchmarks co-located with the guardrail code they test.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Remove standalone topic_blocker package, consolidate into content_filter

The standalone keyword_blocker.py was redundant with content_filter.py +
denied_financial_advice.yaml. Removed the entire topic_blocker/ package,
engine eval files, and old keyword blocker results. Simplified test_eval.py
to only test ContentFilter + LLM judge baselines.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Fix compliance playground batch scoring bug, add display_name support

The compliance playground was sending all texts in a single batch API call,
but the content filter raises HTTPException on the first blocked text. This
caused a single blocked/allowed result to be applied to all rows, producing
incorrect scores (e.g. 41% instead of 100%). Fix by sending each text
individually to get per-text results with progressive UI updates.

Also add display_name field support for category YAML files so
denied_financial_advice shows as "Denied Financial / Investment Advice"
in the UI dropdown.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add block_investment CSV eval set and update benchmark result JSON

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* address greptile review feedback (greploop iteration 1)

Fix stale test path in denied_financial_advice.yaml comment.
Other comments were on files already deleted in prior commits.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 18:02:04 -08:00
yuneng-jiang 883a8e0589 fix: suppress noisy warning for litellm-dashboard team in agent permission handler
litellm-dashboard is the default UI team and will never have agents registered.
Skip the warning log when get_team_object raises a 404 for this team to avoid
log noise.
2026-02-20 17:57:07 -08:00
ryan-crabbeandGitHub 5fb0521eff Merge pull request #21720 from BerriAI/litellm_claude-code-duplicate-detection
feat: route gh actions through litellm
2026-02-20 17:55:57 -08:00
yuneng-jiangandGitHub 5084fe9538 Merge pull request #21715 from BerriAI/litellm_credential_tag_usage
[Feature] Inject Credential Name as Tag for Usage Page Filtering
2026-02-20 17:51:28 -08:00
Ryan Crabbe 1d0f91010b feat: switch duplicate detection workflows from opencode to Claude Code
Route through LiteLLM proxy using LITELLM_VIRTUAL_KEY and LITELLM_BASE_URL
secrets. Also adds --repo flag to all gh commands to fix missing repo context.
2026-02-20 17:51:12 -08:00
ryan-crabbeandGitHub dbff558d96 Merge pull request #21717 from BerriAI/litellm_fix_redis_connection_pool_leaks
fix: redis connection pool reliability
2026-02-20 17:42:48 -08:00
Ryan Crabbe 05d18e60b2 fix: add logging to sync client close failure in disconnect() 2026-02-20 17:36:36 -08:00
Ryan Crabbe bfeed0e590 fix: also close sync clients on eviction from LLMClientCache 2026-02-20 17:36:28 -08:00
yuneng-jiangandGitHub 8ea28dde88 Merge pull request #21718 from BerriAI/yj_release_feb20
[Infra]  litellm_release_day_02_19_2026 fixes
2026-02-20 17:35:44 -08:00
Sameer Kankuteandyuneng-jiang 01148511fb Fix: litellm/tests/llm_responses_api_testing/test_anthropic_responses_api.py 2026-02-20 17:30:53 -08:00
Sameer Kankuteandyuneng-jiang 631400cb17 Fix anthropic responses 2026-02-20 17:30:42 -08:00
Sameer Kankuteandyuneng-jiang 4d6b7699cc Fix sonnet 3.7 tests 2026-02-20 17:29:16 -08:00
Sameer Kankuteandyuneng-jiang 2bc4c4359d Add supports_web_search for sonnet 4 2026-02-20 17:29:05 -08:00
Sameer Kankuteandyuneng-jiang adb91d442a Fix: test_pass_through_endpoint_bing 2026-02-20 17:28:17 -08:00
Sameer Kankuteandyuneng-jiang 61eaf96046 Fix passthrough tests 2026-02-20 17:28:06 -08:00
Sameer Kankuteandyuneng-jiang 36fd14357c FIx: replace deprecated claude-3-7-sonnet-20250219 with claude-4-sonnet-20250514 2026-02-20 17:27:59 -08:00
yuneng-jiangandClaude Opus 4.6 65dc7556a8 [Fix] Fix web search model info regression, deprecated prompt caching model, undocumented env keys
- Revert test_anthropic_web_search_in_model_info to use claude-3-5-haiku-latest
  (model info test doesn't make API calls, so the -latest alias is fine here)
- Replace claude-3-7-sonnet-20250219 with claude-sonnet-4-5-20250929 in
  test_anthropic_prompt_caching.py (10 instances)
- Include pending doc updates for COMPETITOR_LLM_TEMPERATURE and
  MAX_COMPETITOR_NAMES env vars in config_settings.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-20 17:26:58 -08:00
yuneng-jiangandClaude Opus 4.6 e6b9bef949 [Fix] Fix flaky tests: spend logs metadata keys, proxy CLI isolation, Redis TTL uniqueness
- Add new SpendLogsMetadata keys to ignored_keys in spend logs tests
  (regression from ccecc10c82 which intentionally includes all keys)
- Mock PrismaManager.setup_database and should_update_prisma_schema in
  proxy CLI tests to prevent real DB migrations from running in CI
- Use CliRunner(mix_stderr=False) to fix Click stream lifecycle issues
- Use unique UUID suffix for Redis TTL test keys to avoid stale state

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-20 17:26:44 -08:00
yuneng-jiangandClaude Opus 4.6 5354cb26e1 [Fix] Replace deprecated claude-3-7-sonnet in test_anthropic_completion, add store to OPENAI_CHAT_COMPLETION_PARAMS
Replace claude-3-7-sonnet-20250219 with claude-sonnet-4-5-20250929 in
test_anthropic_completion.py (9 instances). Add missing "store" param
to OPENAI_CHAT_COMPLETION_PARAMS to fix test_store_in_openai_chat_completion_params.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-20 17:26:19 -08:00
yuneng-jiangandClaude Opus 4.6 c27b65d09e [Fix] Replace deprecated claude-3-7-sonnet-20250219 with claude-sonnet-4-5-20250929 in test_completion
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-20 17:26:02 -08:00
yuneng-jiangandClaude Opus 4.6 e5619c39a0 [Fix] Update UI tests for GuardrailViewer rewrite and AllModelsTab QueryClient
GuardrailViewer was rewritten from ant-design Collapse to a custom card
layout. Tests now match the new component: updated header text, ms-based
duration, expand-to-reveal provider details, and removed ant-collapse
references.

AllModelsTab tests failed because ModelSettingsModal now uses useMutation
via useStoreModelInDB. Switched from bare render() to renderWithProviders()
which wraps in QueryClientProvider.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-20 17:25:36 -08:00