Commit graph

32523 commits

Author SHA1 Message Date
Yuneng Jiang
458a4210a0
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:17:09 -07:00
Ryan Crabbe
1840913a4a Merge branch 'perf/skip-redundant-redaction-when-global-enabled' into litellm_perf_ryan_staging
# Conflicts:
#	tests/test_litellm/litellm_core_utils/test_litellm_logging.py
2026-02-16 13:50:23 -08:00
Ryan Crabbe
d84e5e381a fix: redact standard_logging_object in global redaction path
perform_redaction did not redact standard_logging_object, so when
per-callback redaction was skipped (global_redaction_applied=True),
sensitive messages/responses could leak to callbacks like Langfuse
and Datadog. Extend perform_redaction to cover this field.
2026-02-16 13:49:22 -08:00
Ryan Crabbe
4cea5bd9fa Add unit test for MRO-aware method override detection
Tests that the fix using `getattr(type(self), method_name) is not getattr(CustomLogger, method_name)` correctly walks the full Method Resolution Order, unlike the buggy `method_name in type(self).__dict__` which only checks the immediate class.
2026-02-16 13:49:22 -08:00
Ryan Crabbe
5d69c66813 fix: Check full MRO for method override detection 2026-02-16 13:49:22 -08:00
Ryan Crabbe
492ad0c282 fix: Add safeguard to allow overridden redaction methods to run
Check if redact_standard_logging_payload_from_model_call_details was
overridden in a subclass before skipping redundant redaction. This
ensures custom callbacks with additional redaction logic still execute.
2026-02-16 13:49:22 -08:00
Ryan Crabbe
d527a042ae perf: skip redundant redaction + avoid double check
- Add global_redaction_applied flag to skip per-callback redaction
- Add should_redact param to avoid calling should_redact_message_logging twice
- Add tests for both flag=True (skip) and flag=False (proceed) cases
2026-02-16 13:49:22 -08:00
Ryan Crabbe
aaef0ce3ea perf: skip redundant redaction when global redaction enabled
When turn_off_message_logging is enabled globally, skip per-callback
redaction functions that would re-process already-redacted data.

17% faster async_success_handler when global redaction is ON.
2026-02-16 13:48:46 -08:00
Ryan Crabbe
d591b2bb04 Merge remote-tracking branch 'fork/perf/remove-redundant-get-llm-provider-call' into litellm_perf_ryan_staging 2026-02-16 13:47:03 -08:00
Ryan Crabbe
e84f130413 Merge branch 'perf/logging-early-return' into litellm_perf_ryan_staging 2026-02-16 13:45:41 -08:00
Ryan Crabbe
b9deb21d64 test: add unit tests for process_dynamic_callbacks early return and ordering 2026-02-16 13:45:28 -08:00
Ryan Crabbe
61dfce06bf Optimize process_dynamic_callbacks with early return and per-callback conditionals
- Add early return when all callbacks are None (common case)
- Add per-callback conditionals to only process callbacks that are set
- Reorder processing: success before async_success, failure before async_failure
  (required because success/failure processing adds items to async lists)

Profiling shows ~79% reduction in process_dynamic_callbacks time (11.5% -> 0.8%)
2026-02-16 13:44:24 -08:00
Ryan Crabbe
ad2400c494 Merge branch 'pr-19904' into litellm_perf_ryan_staging 2026-02-16 13:37:19 -08:00
Ryan Crabbe
5ca4e54f98 Merge branch 'pr-20013' into litellm_perf_ryan_staging 2026-02-16 13:36:24 -08:00
Alexsander Hamir
a5e8eb6848
docs: add Semgrep & OOM fixes section to v1.81.12 release notes (#21334) 2026-02-16 11:40:39 -08:00
yuneng-jiang
17312f5d20
Merge pull request #21332 from BerriAI/yj_infra_feb16
[Infra] Bumping proxy extras version
2026-02-16 11:23:22 -08:00
yuneng-jiang
ca1a642655 bumping pypi + build artifacts 2026-02-16 11:21:40 -08:00
yuneng-jiang
6371b30bfd bump: version 0.4.39 → 0.4.40 2026-02-16 11:20:59 -08:00
Ishaan Jaff
90edd98e0b
Fix OCI Grok output pricing (#21329) 2026-02-16 10:40:51 -08:00
Krish Dholakia
45690db820
UI - Content Filters, help edit/view categories and 1-click add categories + go to next page (#21223)
* feat(ui/): allow viewing content filter categories on guardrail info

* fix(add_guardrail_form.tsx): add validation check to prevent adding empty content filter guardrails

* feat(ui/): improve ux around adding new content filter categories

easy to skip adding a category, so make it a 1-click thing
2026-02-16 09:11:16 -08:00
michelligabriele
035f0916ad
fix(mcp): revert StreamableHTTPSessionManager to stateless mode (#21323)
PR #19809 changed stateless=True to stateless=False to enable progress
notifications for MCP tool calls. This caused the mcp library to enforce
mcp-session-id headers on all non-initialize requests, breaking MCP
Inspector, curl, and any client without automatic session management.

Revert to stateless=True to restore compatibility with all MCP clients.
The progress notification code already handles missing sessions gracefully
(defensive checks + try/except), so no other changes are needed.

Fixes #20242
2026-02-16 09:08:44 -08:00
Vincent Koc
0dcc744f7e
fix(proxy): handle missing DATABASE_URL in append_query_params (#21239)
* fix: handle missing database url in append_query_params

* Update litellm/proxy/proxy_cli.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-16 09:03:10 -08:00
Krrish Dholakia
89e95f779f fix(index.md): cleanup str 2026-02-16 08:59:17 -08:00
Atharva Jaiswal
7bcef1490b
Fix: Exclude tool params for models without function calling support (#21125) (#21244)
* Fix tool params reported as supported for models without function calling (#21125)

JSON-configured providers (e.g. PublicAI) inherited all OpenAI params
including tools, tool_choice, function_call, and functions — even for
models that don't support function calling. This caused an inconsistency
where get_supported_openai_params included "tools" but
supports_function_calling returned False.

The fix checks supports_function_calling in the dynamic config's
get_supported_openai_params and removes tool-related params when the
model doesn't support it. Follows the same pattern used by OVHCloud
and Fireworks AI providers.

* Style: move verbose_logger to module-level import, remove redundant try/except

Address review feedback from Greptile bot:
- Move verbose_logger import to top-level (matches project convention)
- Remove redundant try/except around supports_function_calling() since it
  already handles exceptions internally via _supports_factory()
2026-02-16 08:36:32 -08:00
Sameer Kankute
351e834802
Merge pull request #21320 from BerriAI/litellm_anthropic_doc_beta_header
Litellm anthropic doc beta header
2026-02-16 22:03:18 +05:30
Sameer Kankute
452f481fa0 correct the time 2026-02-16 21:59:54 +05:30
Sameer Kankute
e67641cdb3 Add blog fffor Managing Anthropic Beta Headers 2026-02-16 21:46:12 +05:30
Sameer Kankute
2ad648a083 Add blog fffor Managing Anthropic Beta Headers 2026-02-16 21:45:01 +05:30
jquinter
bf93ce8841
Merge pull request #21284 from BerriAI/fix/mcp-server-test-mocks
fix(test): add cleanup fixture and no_parallel mark for MCP tests
2026-02-16 12:12:58 -03:00
jquinter
c3fb5e1ea5
Update tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_server.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-16 12:12:48 -03:00
jquinter
d84336bd07
Merge pull request #21283 from BerriAI/fix/video-generation-logging-mock
fix(test): correct async mock for video generation logging test
2026-02-16 12:12:20 -03:00
jquinter
87861549d8
Merge pull request #21282 from BerriAI/fix/cost-calculation-log-test-parallel
fix(test): replace caplog with custom handler for parallel execution
2026-02-16 12:11:48 -03:00
jquinter
a2ce7fc99d
Merge pull request #21280 from BerriAI/fix/add-pytest-postgresql-dependency
fix(deps): add pytest-postgresql for db schema migration tests
2026-02-16 12:09:55 -03:00
Julio Quinteros Pro
af9b6f6e0d Merge main into fix/add-pytest-postgresql-dependency
Resolved poetry.lock conflict by regenerating with Poetry 2.3.2.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-16 12:03:20 -03:00
Harshit Jain
1308a2cd76
Merge pull request #20314 from Harshit28j/fix/sso_PKCE_deployments
fix: SSO PKCE support fails in multi-pod Kubernetes deployments
2026-02-16 19:40:44 +05:30
Harshit Jain
dd2111e664
Merge pull request #20321 from Harshit28j/litellm_fix-virtual-key-grace-period
fix: virutal key grace period from env/UI
2026-02-16 19:36:18 +05:30
Sameer Kankute
86a254a215
Merge pull request #21307 from BerriAI/litellm_oss_staging_02_14_20262
Litellm oss staging 02 14 20262
2026-02-16 19:10:59 +05:30
Sameer Kankute
0f2b0869ae
Merge pull request #21311 from BerriAI/litellm_add_agents_sdk_openai
Add doc for OpenAI Agents SDK with LiteLLM
2026-02-16 19:06:27 +05:30
Sameer Kankute
6ceebdcfe2 fix mypy 2026-02-16 19:05:06 +05:30
Sameer Kankute
be9df253dd
Update docs/my-website/sidebars.js
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-16 19:03:15 +05:30
Sameer Kankute
5b6e232da6 Add doc for OpenAI Agents SDK with LiteLLM 2026-02-16 19:00:53 +05:30
Sameer Kankute
a38b4c8924 Add doc for OpenAI Agents SDK with LiteLLM 2026-02-16 18:59:39 +05:30
Sameer Kankute
4548d9fbe9 fix mypy 2026-02-16 18:55:21 +05:30
Sameer Kankute
ac2f17a514 fix: proxy/batches_endpoints/endpoints.py:309:11: PLR0915 Too many statements (54 > 50) 2026-02-16 18:41:06 +05:30
Sameer Kankute
27890dd46e
Merge pull request #21306 from mjkam/fix/bedrock-min-budget-tokens
fix(bedrock): clamp thinking.budget_tokens to minimum 1024
2026-02-16 18:31:28 +05:30
Sameer Kankute
72a1bd66c7
Merge pull request #21157 from Point72/ephrimstanley/s3-logger-skip-missing-standard-logging-object
Managed batches - Misc bug fixes
2026-02-16 18:29:59 +05:30
Emerson Gomes
06e7bfce2e perf(spend): avoid duplicate daily agent transaction computation (#21187) 2026-02-16 18:28:34 +05:30
Constantine
7ef9083812 fix(aiohttp): prevent closing shared ClientSession in AiohttpTransport (#21117)
When a shared ClientSession is passed to LiteLLMAiohttpTransport,
calling aclose() on the transport would close the shared session,
breaking other clients still using it.

Add owns_session parameter (default True for backwards compatibility)
to AiohttpTransport and LiteLLMAiohttpTransport. When a shared session
is provided in http_handler.py, owns_session=False is set to prevent
the transport from closing a session it does not own.

This aligns AiohttpTransport with the ownership pattern already used
in AiohttpHandler (aiohttp_handler.py).
2026-02-16 18:28:28 +05:30
Kristoffer Arlind
51b1b0339c Allow effort="max" for Claude Opus 4.6 (#21112) 2026-02-16 18:28:22 +05:30
Ephrim Stanley
a3762e7d49 Addressed greptile comments to extract common helpers and return 404 2026-02-16 07:58:04 -05:00