Commit graph

33460 commits

Author SHA1 Message Date
Yuneng Jiang
dcd554e205
chore: fixes
Some checks failed
Unit Tests: Caching (Redis) / caching-redis (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (auth-checks, tests/proxy_unit_tests/test_auth_checks.py tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (key-generation, tests/proxy_unit_tests/test_key_generate_prisma.py, 30, 0) (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-db (remaining, tests/proxy_unit_tests --ignore=tests/proxy_unit_tests/test_key_generate_prisma.py --ignore=tests/proxy_unit_tests/test_auth_checks.py --ignore=tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Has been cancelled
Unit Tests: Security / security (push) Has been cancelled
2026-04-05 01:35:00 -07:00
Sameer Kankute
ca1fee89b9 Fix jobs for release 2026-02-24 12:17:27 +05:30
Sameer Kankute
2e819656ce Fix jobs for release 2026-02-24 12:15:26 +05:30
yuneng-jiang
f55fe7afdc
Merge pull request #21980 from BerriAI/litellm_ui_testing_coverage_00
[Refactor] UI - Onboarding: Extract testable view components
2026-02-23 22:03:19 -08:00
yuneng-jiang
36f7722b0f fix: add QueryClientProvider, remove stale file, use should naming in tests
- Wrap onboarding page with QueryClientProvider to prevent runtime crash
  (mirrors the same pattern used in LoginPage)
- Stage deletion of stale litellm/ui/litellm-dashboard/src/app/onboarding/page.tsx
  committed at the wrong path
- Rename all 16 test names to start with "should" per AGENTS.md convention
2026-02-23 21:53:42 -08:00
yuneng-jiang
a3491490f9 refactor onboarding 2026-02-23 21:30:08 -08:00
yuneng-jiang
02a53989cf fix: narrow onSubmit values and use semantic loading assertion 2026-02-23 21:20:22 -08:00
yuneng-jiang
0873494270 feat: extract OnboardingFormBody component with tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 21:08:19 -08:00
yuneng-jiang
a347cf0a33 feat: extract OnboardingErrorView component with tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 21:06:17 -08:00
yuneng-jiang
a3d4a8752f feat: extract OnboardingLoadingView component with tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 21:04:48 -08:00
Ishaan Jaff
c79d94fd16
feat(realtime): guardrail hook for voice transcription (#21976)
* feat(realtime): add guardrail hook for voice transcription in Realtime API

Adds a new `realtime_input_transcription` guardrail event hook that fires
after Whisper transcription completes, before the LLM generates a response.

When a guardrail blocks, a synthetic warning is sent to the client and
`response.create` is never forwarded — the LLM never responds.

Also rewrites `create_response: true` → `false` in client `session.update`
so the proxy controls when responses are triggered.

* feat(realtime): speak guardrail block message as audio via TTS

Instead of sending synthetic text events when a guardrail blocks,
send response.create with forced instructions so OpenAI's TTS speaks
the warning message — user hears the block instead of just seeing text.

* fix(realtime): speak exact content filter error message via TTS

Extract the human-readable error string from HTTPException.detail
so the spoken warning says e.g. "Content blocked: keyword 'system update'
detected" instead of the raw str(e) repr.

* fix(realtime): reliably enforce create_response=false for guardrails

- Proxy now injects session.update with create_response=false immediately
  on session.created (when guardrails are active), instead of rewriting
  the client's session.update — works regardless of what the client sends
- Add response.cancel before the warning response.create to kill any
  in-flight LLM response that snuck through before the guardrail fired

* refactor(realtime): call apply_guardrail directly, remove dedicated hook method

The async_realtime_input_transcription_hook in CustomGuardrail and
ContentFilterGuardrail was just a thin wrapper that called apply_guardrail —
the same interface used by /chat and /messages. Remove the wrapper and call
apply_guardrail directly from run_realtime_guardrails, keeping the pattern
consistent across all endpoints.

* docs: add Realtime API guardrails tutorial and flow diagram

* fix: address Greptile review comments

- Forward user_api_key_dict through realtime_api/main.py (_arealtime) so
  it actually reaches RealTimeStreaming instead of always being None
- Run guardrail interception in provider_config path too (e.g. Gemini),
  not only the OpenAI direct path
- Narrow exception catch to HTTPException/ValueError only; re-raise
  unexpected errors so programming bugs surface in logs rather than
  silently appearing as guardrail blocks
- Update tests: mock apply_guardrail directly (hook method was removed),
  replace session.update client-rewrite test with session.created
  injection test matching the new server-side approach

* fix: address latest Greptile review comments

- Remove fastapi import from SDK-layer file; check for status_code/detail
  attrs instead to identify guardrail-block exceptions vs programming errors
- Add store_message() before continue in transcription interception so
  transcription events are logged in the non-provider_config path
- Inject create_response=false on session.created in provider_config path
  (Gemini etc.) to match the OpenAI path — prevents LLM auto-responding
  before guardrail runs on VAD-detected turns
2026-02-23 21:04:40 -08:00
Ishaan Jaff
22fb39ab1e
feat(content-filter): add employment discrimination topic blockers for 5 protected classes (#21962)
Adds YAML topic category files for military_status, disability, age_discrimination,
religion, and gender_sexual_orientation to block employment discrimination prompts
like "Do not hire veterans because they may have mental health issues."

Previously these were not blocked because:
- The prebuilt regex patterns used strict \b word boundaries that didn't match
  plurals (veterans, disabilities, Muslims)
- gender_sexual_orientation pattern was LGBTQ+-focused and missed women/female
- age_discrimination pattern missed "over 50" phrasing
- No conditional (identifier + discriminatory intent) detection existed for these
  protected classes

Each new YAML file uses the bias_racial.yaml pattern: identifier_words (protected
class terms) + additional_block_words (discriminatory employment actions), plus
always_block_keywords for explicit discriminatory phrases. Exceptions prevent false
positives for legitimate diversity programs, accommodation discussions, etc.

Also fixes regex plurals in patterns.json: veterans?, disabilit(y|ies), muslims?,
adds wom[ae]n?/females? to gender pattern, and over\s+\d+ to age pattern.

Evals: 100% precision/recall/F1/accuracy on all 5 new categories (89 total cases,
0 FP, 0 FN). Existing insults and investment evals unaffected.
2026-02-23 21:03:26 -08:00
Nicolò Pignatelli
b8dddab311
feat: add groq/openai/gpt-oss-safeguard-20b model pricing (#21951)
* feat: add groq/openai/gpt-oss-safeguard-20b model pricing

Add pricing and context window data for OpenAI's GPT-OSS-Safeguard-20B
model on Groq, a reasoning model trained for safety classification tasks.

- Input: $0.075/1M tokens
- Cached input: $0.037/1M tokens
- Output: $0.30/1M tokens
- Context window: 131,072 tokens
- Max output: 65,536 tokens

Reference: https://console.groq.com/docs/model/openai/gpt-oss-safeguard-20b

* docs: add gpt-oss-safeguard-20b to Groq provider docs
2026-02-23 21:03:18 -08:00
Sameer Kankute
cd488df70a
Merge pull request #21978 from BerriAI/litellm_cicd_24_02
Fix replicate to foreign server without PDPA
2026-02-24 10:25:26 +05:30
Sameer Kankute
044639fdda Fix replicate to foreign server without PDPA 2026-02-24 10:24:46 +05:30
Ron Zhong
4dcec49070
refactor(policies): update guardrail identifiers for Singapore compliance (#21974) 2026-02-23 20:53:26 -08:00
Harshit Jain
a15c4db499
Merge pull request #21949 from BerriAI/fix/presidio-streaming-false-positives
fix: presidio streaming, false positives
2026-02-24 10:09:47 +05:30
yuneng-jiang
10a3304e6a refactor: simplify onboarding page to use OnboardingForm component 2026-02-23 20:18:39 -08:00
Sameer Kankute
1696c094bc
Merge pull request #21975 from BerriAI/litellm_cicd_24_02
Fix content filter tests
2026-02-24 09:40:27 +05:30
Sameer Kankute
842d1cddf9 Fix content filter tests 2026-02-24 09:39:49 +05:30
Sameer Kankute
e486f8a408
Merge pull request #21972 from BerriAI/litellm_cicd_24_02
Litellm CICD fixes 02 24
2026-02-24 09:28:40 +05:30
Sameer Kankute
370dfdc514 bump: version 1.81.14 → 1.81.15 2026-02-24 09:26:18 +05:30
Sameer Kankute
3b2ff5b06a Fix cicd code quality 2026-02-24 09:22:40 +05:30
Sameer Kankute
8288e351ef Fix: test_sentence[dt_8] 2026-02-24 09:14:10 +05:30
Harshit28j
e5c907dc93 fix test case and req changes 2026-02-24 09:13:27 +05:30
Sameer Kankute
0beada96c1 Fix code qa 2026-02-24 09:09:23 +05:30
Sameer Kankute
d599c77311 Update poetry 2026-02-24 09:04:55 +05:30
Sameer Kankute
7df02e968a add package files 2026-02-24 09:01:57 +05:30
Sameer Kankute
8714b9ee8f bump: version 0.4.46 → 0.4.47 2026-02-24 08:53:50 +05:30
yuneng-jiang
32045217a6 refactor: simplify onboarding page to use OnboardingForm component
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 18:18:42 -08:00
yuneng-jiang
1f8d23ec5b fix: set cookie path and add error feedback on claim failure 2026-02-23 18:16:38 -08:00
yuneng-jiang
2bc6dc5cad fix: sync email field value into AntD Form after credentials load 2026-02-23 18:12:17 -08:00
yuneng-jiang
884904c6d1 feat: add OnboardingForm component with variant prop
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 18:08:31 -08:00
yuneng-jiang
ba0ed492c4 fix: improve type safety and defensive guard in useOnboarding hook
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 18:05:23 -08:00
yuneng-jiang
f4303f5e22 feat: add useOnboarding hook with query and mutation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 18:01:10 -08:00
yuneng-jiang
8f46a6917b
Merge pull request #21968 from BerriAI/litellm_ui_testing_coverage_00
[Infra] UI - Unit Testing Coverage: MCP Semantic Filter
2026-02-23 17:34:23 -08:00
yuneng-jiang
715e134a66 adding testing coverage + fixing flaky tests 2026-02-23 17:23:10 -08:00
yuneng-jiang
a8456a2a30
Merge pull request #21963 from BerriAI/litellm_queue_presets
[Fix] Spend Update Queue Aggregation Never Triggers with Default Presets
2026-02-23 17:21:33 -08:00
Lei Nie
eed2e4ee5f
fix(videos): pass api_key from litellm_params to video remix handlers (#21965)
video_remix_handler and async_video_remix_handler were not falling back
to litellm_params.api_key when the api_key parameter was None, causing
Authorization: Bearer None to be sent to the provider. This matches the
pattern already used by async_video_generation_handler.
2026-02-23 17:15:24 -08:00
yuneng-jiang
a749598693
Merge pull request #21859 from BerriAI/litellm_blog_dropdown
[Feature] UI - Blog Dropdown in Navbar
2026-02-23 16:22:22 -08:00
yuneng-jiang
a9c44d8530 adjust default aggregation threshold 2026-02-23 16:20:15 -08:00
yuneng-jiang
9f3fc492c2 adding tests 2026-02-23 16:02:36 -08:00
yuneng-jiang
09cc3b8bbc ui changes 2026-02-23 15:54:07 -08:00
ryan-crabbe
3faf5e5912
Merge pull request #21961 from BerriAI/litellm_revert_duplicate_workflows
Revert duplicate issue checker to text-based matching
2026-02-23 15:30:02 -08:00
Ryan Crabbe
079ff24d78 Revert duplicate issue checker to text-based matching, remove duplicate PR workflow
Remove the Claude Code-powered duplicate PR detection workflow and revert
the duplicate issue checker back to wow-actions/potential-duplicates with
text similarity matching.
2026-02-23 15:28:13 -08:00
yuneng-jiang
54b7e1af99 adjust blog post path 2026-02-23 15:12:05 -08:00
yuneng-jiang
08f4a27e32 Merge remote-tracking branch 'origin' into litellm_blog_dropdown 2026-02-23 15:02:07 -08:00
yuneng-jiang
94425dff1e fixing path 2026-02-23 15:01:49 -08:00
Lei Nie
4ff2cfd8d6
feat(videos): add variant parameter to video content download (#21955)
openai videos models support the features to download variants.
See more details here: https://developers.openai.com/api/docs/guides/video-generation#use-image-references.
Plumb variant (e.g. "thumbnail", "spritesheet") through the full
video content download chain: avideo_content → video_content →
video_content_handler → transform_video_content_request. OpenAI
appends ?variant=<value> to the GET URL; other providers accept
the parameter in their signature but ignore it.
2026-02-23 14:45:19 -08:00
yuneng-jiang
1ecfbad46e adjust blog posts to fetch from github first 2026-02-23 14:45:05 -08:00