Commit graph

33478 commits

Author SHA1 Message Date
Atharva Jaiswal
cdeca638b8 fix: team assignment fails for keys with special model names (#21919)
* auth_with_role_name add region_name arg for cross-account sts

* update tests to include case with aws_region_name for _auth_with_aws_role

* Only pass region_name to STS client when aws_region_name is set

* Add optional aws_sts_endpoint to _auth_with_aws_role

* Parametrize ambient-credentials test for no opts, region_name, and aws_sts_endpoint

* consistently passing region and endpoint args into explicit credentials irsa

* fix env var leakage

* fix: bedrock openai-compatible imported-model should also have model arn encoded

* fix: team assignment fails for keys with special model names (#21880)

---------

Co-authored-by: An Tang <ta@stripe.com>
Co-authored-by: Sameer Kankute <sameer@berri.ai>
2026-03-03 18:13:37 +05:30
Atharva Jaiswal
9565b755a0 fix: apply custom video pricing from deployment model_info (#21923)
* auth_with_role_name add region_name arg for cross-account sts

* update tests to include case with aws_region_name for _auth_with_aws_role

* Only pass region_name to STS client when aws_region_name is set

* Add optional aws_sts_endpoint to _auth_with_aws_role

* Parametrize ambient-credentials test for no opts, region_name, and aws_sts_endpoint

* consistently passing region and endpoint args into explicit credentials irsa

* fix env var leakage

* fix: bedrock openai-compatible imported-model should also have model arn encoded

* fix: custom pricing not applied for /v1/videos endpoint (#21907)

* fix: resolve mypy type errors for video pricing model_info parameter

Use Optional[ModelInfo] instead of Optional[dict] and restructure
cost_info narrowing so mypy can properly track non-None state.

---------

Co-authored-by: An Tang <ta@stripe.com>
Co-authored-by: Sameer Kankute <sameer@berri.ai>
2026-03-03 18:13:36 +05:30
Kesku
0ab380a28d lint 2026-03-03 18:13:36 +05:30
Kesku
35a83fe8f7 format 2026-03-03 18:13:36 +05:30
Kesku
003cdc43df feat(perplexity): update Responses API integration to match Agent API
- Rename "Agentic Research API" to "Agent API"
Expand
- supported Responses API parameters
- Fix function
tool handling to pass custom function tools through unchanged instead of heuristically mapping them.
 -Update model registry with current Perplexity
models and presets
- Add Function Calling and Structured Outputs documentation sections.
- Unit tests for transformation logic.
2026-03-03 18:13:36 +05:30
Henrique Cavarsan
e799036473 fix(proxy): recover from prisma-query-engine zombie process (#21899)
* fix(proxy): recover from prisma-query-engine zombie process

* fix(proxy): remove unused imports and extract helper to fix PLR0915 in utils.py
2026-03-03 18:13:36 +05:30
Harshit28j
b7f0721c66 security: fix critical/high CVEs in OS-level libs and NPM transitive 2026-03-03 18:13:36 +05:30
Sameer Kankute
16b5fdccf5 Update the tests 2026-02-27 16:01:38 +05:30
Sameer Kankute
26c414f285 Update the docs 2026-02-27 16:01:23 +05:30
Sameer Kankute
ba08a7e2f6 Update the routing 2026-02-27 16:01:02 +05:30
Sameer Kankute
275e5ad722 Add encoding method for Encrypted-content-aware deployment 2026-02-27 16:00:43 +05:30
Sameer Kankute
0fd22346dd Fix logging for error 2026-02-24 23:58:50 +05:30
Sameer Kankute
3b6790af4c Fix mock github test 2026-02-24 23:06:54 +05:30
Sameer Kankute
185fcab88b Fix logging and encrypted content extraction 2026-02-24 22:56:57 +05:30
Sameer Kankute
db0ece391c ADd incident report 2026-02-24 16:24:57 +05:30
Sameer Kankute
863867c4fe Add docs for encrypted_content_affinity 2026-02-24 16:22:15 +05:30
Sameer Kankute
7ab577f836 Add tests for encrypted_content_affinity 2026-02-24 16:22:00 +05:30
Sameer Kankute
b28ebd2f4b Add tests for encrypted_content_affinity 2026-02-24 16:21:49 +05:30
Sameer Kankute
7e99106380 Add encrypted_content_affinity in router 2026-02-24 16:21:27 +05:30
Sameer Kankute
92c026d829 Add encrypted_content_affinity in router 2026-02-24 16:21:20 +05:30
Sameer Kankute
8e173860ce Add Encrypted-content-aware deployment affinity for the Router 2026-02-24 16:20:51 +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