Commit Graph
35808 Commits
Author SHA1 Message Date
Krish DholakiaandGitHub 29647856b5 Merge branch 'main' into fix/release-notes-v1-82-3-helicone-langfuse 2026-03-19 18:32:38 -07:00
Krish DholakiaandGitHub d8b28141b9 Merge pull request #24173 from joereyna/fix/black-format-batch-3
chore: apply black formatting to fix lint CI (batch 3)
2026-03-19 18:27:30 -07:00
joereyna 87b5039aaa chore: apply black formatting to fix lint CI (batch 3) 2026-03-19 18:11:40 -07:00
Krish DholakiaandGitHub 482b77e71d Merge pull request #24081 from BerriAI/litellm_oss_staging_03_18_2026
Litellm oss staging 03 18 2026
2026-03-19 17:58:07 -07:00
Krish DholakiaandGitHub 8d92d8637d Merge branch 'main' into litellm_oss_staging_03_18_2026 2026-03-19 17:57:55 -07:00
Krish DholakiaandGitHub b1731b6798 Merge pull request #24168 from BerriAI/cursor/litellm-license-key-environment-16b4
docs: add LiteLLM license key environment variable instructions
2026-03-19 17:35:33 -07:00
Cursor AgentandKrish Dholakia e668ca310d docs: add LiteLLM license key environment variable instructions
Added a new section to the config.yaml documentation explaining how to
set the LITELLM_LICENSE environment variable for enterprise features.

Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
2026-03-20 00:28:21 +00:00
yuneng-jiangandGitHub 35d4984033 Merge pull request #24167 from joereyna/fix/black-format-types
chore: apply black formatting to proxy/_types.py to fix lint CI
2026-03-19 17:25:08 -07:00
joereyna 6f1bac07e5 chore: apply black formatting to proxy/_types.py to fix lint CI 2026-03-19 17:11:04 -07:00
yuneng-jiangandGitHub 0781f68b8a Merge pull request #24150 from BerriAI/litellm_yj_march_18_2026
[Infra] Merge daily internal branch with main
2026-03-19 16:43:47 -07:00
yuneng-jiang 7b600cdbfe linting 2026-03-19 16:31:50 -07:00
yuneng-jiang f60e3cfd34 remove returning key in error message 2026-03-19 16:29:51 -07:00
yuneng-jiangandClaude Opus 4.6 05620c87e3 [Fix] Update bulk key update tests for find_unique refactor
Tests were outdated after _get_and_validate_existing_key was refactored
to use prisma_client.db.litellm_verificationtoken.find_unique() and
ProxyException. Also add ProxyException handling in bulk_update_keys
error extractor so error messages aren't empty.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 15:34:44 -07:00
yuneng-jiangandGitHub 2d3cff99fe Merge pull request #24159 from joereyna/fix/add-poetry-lock-check
chore: add poetry check --lock to lint CI to prevent stale lockfile merges
2026-03-19 14:48:11 -07:00
joereyna d118bf4818 chore: add poetry check --lock to lint CI to prevent stale lockfile merges 2026-03-19 14:36:02 -07:00
yuneng-jiang e86ca7f34d Revert "[Fix] Update tests for _get_and_validate_existing_key refactor"
This reverts commit cf63697703.
2026-03-19 14:32:14 -07:00
Joe ReynaandGitHub 2df965513e Merge pull request #24153 from joereyna/fix/black-format-lint-2
chore: apply black formatting to fix lint CI (batch 2)
2026-03-19 12:56:48 -07:00
Krish DholakiaandGitHub 739356640b Merge pull request #24120 from BerriAI/litellm_proxy-azure-api-version-bump
feat(proxy): use AZURE_DEFAULT_API_VERSION for proxy --api_version default
2026-03-19 12:54:14 -07:00
yuneng-jiangandClaude Opus 4.6 cf63697703 [Fix] Update tests for _get_and_validate_existing_key refactor
Tests were outdated after _get_and_validate_existing_key was refactored
to use prisma_client.db.litellm_verificationtoken.find_unique() instead
of prisma_client.get_data(), and to raise ProxyException instead of
HTTPException. Also fix bulk_update_keys error handler to extract
ProxyException.message (str(ProxyException) returns empty string).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 12:41:11 -07:00
joereyna 004d8d01f6 chore: apply black formatting to fix lint CI 2026-03-19 12:39:39 -07:00
yuneng-jiangandClaude Opus 4.6 c2b8ba8b1b [Fix] Resolve mypy errors in key_management_endpoints.py
Add None guard for prisma_client before calling update_data, and add
"unblocked" to AUDIT_ACTIONS literal type.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 12:28:56 -07:00
yuneng-jiangandGitHub dfcf978745 Merge pull request #24092 from joereyna/fix/black-format-lint
chore: apply black formatting to fix lint CI
2026-03-19 12:22:48 -07:00
yuneng-jiang afb35204ce Merge remote-tracking branch 'origin' into litellm_yj_march_18_2026 2026-03-19 11:53:58 -07:00
81dadb698a Ishaan - March 18th changes (#24056)
* add DD Tracing (#24033)

* feat(models): add Azure GPT-5.4 mini and nano variants (#24045)

Add `azure/gpt-5.4-mini` and `azure/gpt-5.4-nano` to the model
database with official pricing from Azure OpenAI:

- GPT-5.4 mini: $0.75/M input, $0.075/M cached, $4.5/M output
- GPT-5.4 nano: $0.20/M input, $0.02/M cached, $1.25/M output

Both models support:
- 1.05M input / 128K output context window
- Chat, batch, and responses endpoints
- Function calling, tools, vision, reasoning
- Prompt caching with automatic tiered pricing

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* Add new model pricing details for volcengine Doubao-Seed-2.0 series (#23871)

Add entries for volcengine Doubao-Seed-2.0 series

* fix(mcp): support refresh_token grant type in OAuth token endpoint (#23701)

* fix(mcp): support refresh_token grant type in OAuth token endpoint (#23700)

The .well-known/oauth-authorization-server metadata advertises
refresh_token as a supported grant type, but the token endpoint
rejected it with HTTP 400. This adds refresh_token grant support
so MCP clients can refresh expired tokens without re-authenticating.

* test(mcp): add tests for refresh_token grant type in OAuth token endpoint

* fix(mcp): move code_verifier guard into authorization_code branch

code_verifier is only relevant for authorization_code grants (PKCE).
Move it inside the else branch so it doesn't apply to refresh_token.

* fix(mcp): guard None client_secret and forward scope in token exchange

- Conditionally include client_secret in form data to prevent httpx
  from sending the literal string "None" (applies to both
  authorization_code and refresh_token branches)
- Forward optional scope parameter per RFC 6749 §6, allowing clients
  to request a subset of originally-granted scopes on refresh

* fix(mcp): validate code param in authorization_code grant

Guard against None code being form-encoded as literal string "None"
by httpx, symmetric with the existing refresh_token guard.

* docs: add incident report for guardrail logging secret exposure (#24059)

Add blog post documenting the guardrail logging path exposing internal
request data (e.g. Authorization headers) in spend logs and OTEL traces.
Fix available in LiteLLM 1.82.3+.

Made-with: Cursor

* [Fix] Datadog LLM Observability tags format (env, service, version missing) (#23673)

* tag fix

* greptile comment

* fix(ci): stabilize 6 failing CI jobs

1. mypy: remove duplicate type annotation for token_data in discoverable_endpoints.py
2. integrations tests: add parameterized to CI test deps
3. doc quality: document OTEL_IGNORE_CONTEXT_PROPAGATION env key
4. security: allowlist CVE-2026-2673, CVE-2026-3644, CVE-2026-4224 (no fix available)
5. proxy_store_model_in_db: fix missing x-litellm-call-id header on error responses
6. google tests: add --retries 3 for transient Vertex AI rate limits

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>

* fix(streaming): handle RuntimeError during model_copy in streaming handler

The race condition occurs when model_copy(deep=True) tries to deepcopy
_hidden_params dict while it's being concurrently modified by logging
callbacks. Fall back to shallow copy if the deep copy fails.

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>

* fix(cost): handle non-string traffic_type in cost calculator + add retries

1. Fix AttributeError in _map_traffic_type_to_service_tier when traffic_type
   is an integer (cast to str before calling .upper()). This was causing
   pass-through vertex spend logging to fail silently.
2. Add --retries to llm_translation_testing for flaky external API calls.

Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>

---------

Co-authored-by: Emerson Gomes <emerson.gomes@thalesgroup.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: ExMatics HydrogenC <33123710+HydrogenC@users.noreply.github.com>
Co-authored-by: Jack Venberg <jack.venberg@rover.com>
Co-authored-by: milan-berri <milan@berri.ai>
Co-authored-by: Shivam Rawat <161387515+shivamrawat1@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Ishaan Jaff <ishaan-jaff@users.noreply.github.com>
2026-03-19 10:20:35 -07:00
Sameer Kankute b9564834e6 Fix mypy errors 2026-03-19 16:18:06 +05:30
Sameer Kankute 067dab42e6 refactor: reduce statement count in langsmith and anthropic methods
- Extract helper methods in langsmith._prepare_log_data to reduce from 51 to <50 statements
- Extract helper methods in anthropic.transform_parsed_response to reduce from 57 to <50 statements
- Fixes PLR0915 linter errors
- All existing tests pass (10 langsmith tests, 126 anthropic tests)

Made-with: Cursor
2026-03-19 16:16:23 +05:30
Sameer Kankute 532e0d13df feat(proxy): use AZURE_DEFAULT_API_VERSION for proxy --api_version default
Aligns proxy default with litellm.AZURE_DEFAULT_API_VERSION (2025-02-01-preview)
so Azure response_format + json_schema works without tools fallback.

Made-with: Cursor
2026-03-19 15:57:03 +05:30
joereynaandClaude Sonnet 4.6 d5ef754950 docs(release-notes): align v1.82.3 notes with release notes guide
- Add MCP Gateway section (moved from Management per guide rule §11)
- Rename Spend Tracking → Spend Tracking, Budgets and Rate Limiting
- Fix Hashicorp Vault doc link: docs/secret → docs/secret_managers
- Fix LLM API section: #### Bug Fixes → #### Bugs (matches guide)
- Add Documentation Updates section (required by guide §11)
- Update Diff Summary: correct section names, add MCP Gateway and
  Documentation Updates counts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 23:35:40 -07:00
joereynaandClaude Sonnet 4.6 61df7471ba docs(release-notes): complete v1.82.3 changelog with 30+ missing features
Full audit of 371 PRs in v1.82.0-stable...v1.82.3-stable range.
Adds previously undocumented user-facing changes:

- Key Highlights: Hashicorp Vault, Responses WebSocket, Org Admin RBAC,
  guardrail mode defaults
- New Providers: Google Search API, Bedrock Mantle (7 total, was 5)
- LLM API: Anthropic Files API, Mistral Voxtral transcription, WebRTC,
  Responses WebSocket, litellm.acount_tokens() public API, OpenRouter
  image edit, Vertex AI VIDEO token tracking, input_fidelity image edit,
  model cost aliases, per-request json schema validation, 15+ bug fixes
- Management: RBAC expansion for Org Admins, Vector Store CRUD, MCP
  token auth + team scoping, BYOK key precedence, virtual key spend reset,
  batch expiry for teams, Admin Viewer audit log access, 12+ bug fixes
- Guardrails: mode default list, tag-based modes, presidio fix, OTEL fix
- Secret Managers: Hashicorp Vault (was "no changes")
- Spend Tracking: new section — budget-linked reset fix, flex pricing,
  spend log cleanup, WebSearch dedup fix
- Performance: 4 additional reliability fixes
- Diff summary counts updated to reflect actual scope

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 23:30:42 -07:00
joereyna dab8721ba3 chore: apply black formatting to fix lint CI 2026-03-18 22:57:38 -07:00
joereynaandClaude Sonnet 4.6 bba3b1fe4c docs(release-notes): add missing Helicone and Langfuse entries to v1.82.3 changelog
Helicone (PRs #19288, #22603) and Langfuse (#22390) were present in the
v1.82.0-stable...v1.82.3-stable diff but omitted from the AI Integrations
logging section. Also updates the AI Integrations diff summary count from 2 to 4.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 22:42:25 -07:00
Krish DholakiaandGitHub e5baa2232f Merge pull request #24082 from joereyna/fix/poetry-lock-content-hash 2026-03-18 22:04:08 -07:00
Krish DholakiaandGitHub 547a73120e Merge pull request #24083 from BerriAI/cursor/missing-guardrails-docs-143b
docs: add Contributing to Guardrails section to Guardrail Providers sidebar
2026-03-18 21:54:24 -07:00
Cursor AgentandKrish Dholakia df38fbcc97 docs: add Contributing to Guardrails section to Guardrail Providers sidebar
- Add 'Contributing to Guardrails' category with links to:
  - Generic Guardrail API (integrate without PR)
  - Adding a New Guardrail Integration tutorial
  - Adding Guardrail Support to Endpoints

- Add 'Team Bring-Your-Own Guardrails' link for team BYOG workflow

These docs existed but were only accessible from the 'LiteLLM AI Gateway'
sidebar. Now they're also accessible when browsing the 'Guardrail Providers'
section.

Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
2026-03-19 04:47:30 +00:00
Krish DholakiaandGitHub 49443cc08c Merge pull request #24080 from BerriAI/litellm_dev_03_18_2026_p1
fix: fix logging for response incomplete streaming + custom pricing on /v1/messages and /v1/responses
2026-03-18 21:45:17 -07:00
Krish DholakiaandGitHub 11f0f061bc Merge pull request #18120 from hytromo/improve-llm-repeated-message-detection-performance
Fix model repetition detection performance
2026-03-18 21:43:03 -07:00
Krrish Dholakia 08f0cbc2e9 fix: address greptile feedback 2026-03-18 21:36:39 -07:00
Krish DholakiaandGitHub 5c93c107d9 Merge pull request #24043 from themavik/fix/24001-langsmith-usage-metadata
fix(langsmith): populate usage_metadata in outputs for Cost column
2026-03-18 21:30:23 -07:00
Krish DholakiaandGitHub 379ed72336 Merge pull request #24050 from alilxxey/fix/proxy-only-failure-call-type
Fix/proxy only failure call type
2026-03-18 21:29:14 -07:00
Krish DholakiaandGitHub 3a878b8b6b Merge branch 'litellm_oss_staging_03_18_2026' into fix/proxy-only-failure-call-type 2026-03-18 21:29:07 -07:00
Krish DholakiaandGitHub 6ef440c2f5 Merge pull request #24044 from emerzon/fix-generic-api-model-group-logging
Preserve router model_group in generic API logs
2026-03-18 21:23:22 -07:00
Krish DholakiaandGitHub 8b4ed363e4 Merge pull request #24070 from xr843/fix/24026-thinking-blocks-null
Fix thinking blocks dropped when thinking field is null
2026-03-18 21:22:37 -07:00
yuneng-jiangandGitHub e8e4d9fa0f Merge pull request #24069 from BerriAI/litellm_leftnav_external_icon
[Feature] UI - Leftnav: Add external link icon to Learning Resources
2026-03-18 21:22:33 -07:00
joereyna f7803d2d6d chore: regenerate poetry.lock to unblock CI (pyproject.toml content hash drift) 2026-03-18 21:21:07 -07:00
Krrish Dholakia bd0c3bfdc4 fix: fix logging for response incomplete streaming 2026-03-18 20:58:41 -07:00
Krrish Dholakia 0ecced9780 fix: fix responses cost calc 2026-03-18 19:52:59 -07:00
xianrenandClaude Opus 4.6 8969a3d176 Fixed thinking blocks dropped when thinking field is null (#24026)
The check `content.get("thinking", None) is not None` incorrectly
drops thinking blocks when the `thinking` key is explicitly null or
absent. Changed to `content.get("type") == "thinking"` to match
the fix already applied in the experimental pass-through path (PR #15501).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 09:10:21 +08:00
Cesar GarciaandGitHub ef3b05b8c7 Merge pull request #23784 from andrzej-pomirski-yohana/fix/surface-anthropic-tool-results-responses-api
fix: surface Anthropic code execution results as code_interpreter_call in Responses API
2026-03-18 22:07:51 -03:00
Chesars 4770b657e1 refactor: extract duplicated stdout/stderr → logs logic to shared helper 2026-03-18 22:05:27 -03:00
yuneng-jiangandClaude Opus 4.6 d984b293de [Feature] UI - Leftnav: Add external link icon to Learning Resources
Add ExportOutlined icon next to nav items that link to external pages,
making it clear to users when a link opens in a new tab.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 17:56:25 -07:00