Commit Graph
35826 Commits
Author SHA1 Message Date
Seokjun YangGitHubgreptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
eb733702fc Update tests/litellm_utils_tests/test_bedrock_token_counter.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-20 22:21:15 +09:00
Seokjun YangandGitHub 72902c39c5 Remove extra newline in common_utils.py 2026-03-20 18:09:52 +09:00
stias bc4608e718 fix(bedrock): respect api_base and aws_bedrock_runtime_endpoint in count_tokens endpoint
The /v1/messages/count_tokens endpoint was hardcoding the Bedrock runtime
URL, ignoring api_base and aws_bedrock_runtime_endpoint settings. This
aligns it with invoke/converse handlers by using the existing
get_runtime_endpoint() method for consistent endpoint resolution.

Signed-off-by: stias <seokjun.yang@mycraft.kr>
2026-03-20 17:58:20 +09:00
Joe ReynaandGitHub d7c419bfee Merge pull request #24179 from joereyna/fix/upgrade-mcp-1.26.0
fix: upgrade mcp to 1.26.0 and bump version to 1.82.5
2026-03-19 23:37:10 -07:00
joereyna 32ada454a2 fix: upgrade mcp to 1.26.0 2026-03-19 21:32:42 -07:00
yuneng-jiangandGitHub 30589b06ad Merge pull request #24187 from joereyna/fix/black-format-lint-cleanup
chore: apply black formatting and enable black pre-commit hook
2026-03-19 21:31:48 -07:00
joereyna 6f6e23a7b0 chore: apply black formatting to experimental_pass_through transformation 2026-03-19 21:25:02 -07:00
joereyna ff6faacc64 fix: resolve mypy union-attr error in anthropic messages transformation 2026-03-19 21:20:12 -07:00
joereyna c6b5c07005 chore: apply black formatting and enable black pre-commit hook 2026-03-19 21:00:54 -07:00
joereyna e5dc912367 bump: version 1.82.4 → 1.82.5 2026-03-19 19:58:04 -07:00
Krrish Dholakia 3093ef844e fix: document new config_settings.md 2026-03-19 18:57:02 -07:00
Krish DholakiaandGitHub 48e9d0b271 Merge pull request #24140 from devin-petersohn/feat/anthropic-auth-token-and-base-url
feat(anthropic): support ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL env vars
2026-03-19 18:50:48 -07:00
Krish DholakiaandGitHub 3a0652c445 Merge branch 'main' into feat/anthropic-auth-token-and-base-url 2026-03-19 18:41:19 -07:00
Krish DholakiaandGitHub 2900e0e384 Merge pull request #24090 from joereyna/fix/release-notes-v1-82-3-helicone-langfuse
docs(release-notes): complete v1.82.3 changelog with full PR audit
2026-03-19 18:33:02 -07:00
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
f784da41af Fix get_complete_url to honour ANTHROPIC_BASE_URL in experimental passthrough
Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-19 12:37:12 -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
b7e2269942 Address review feedback: fix OAuth routing in get_auth_header and self-contained validate_environment
Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-19 12:17:00 -07:00
yuneng-jiang afb35204ce Merge remote-tracking branch 'origin' into litellm_yj_march_18_2026 2026-03-19 11:53:58 -07:00
Devin PetersohnandClaude 41d9ecfebc Address feedback
Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-19 10:36:04 -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
f415b72bcf feat(anthropic): support ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL env vars
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Devin Petersohn <devin.petersohn@gmail.com>
2026-03-19 10:16:30 -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