Commit graph

270 commits

Author SHA1 Message Date
Alexsander Hamir
53a1f2d21c
perf(prometheus): parallelize budget metrics, fix caching bug, reduce CPU by ~40% (#20544) 2026-02-06 09:18:24 -08:00
Sameer Kankute
453d1bd5e1
Merge branch 'main' into litellm_oss_staging_02_04_2026 2026-02-05 12:19:03 +05:30
Sameer Kankute
64aeb18a10 chore: update poetry.lock for litellm-proxy-extras 0.4.30
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-05 09:25:52 +05:30
jquinter
18f4b7219b
feat: add faster linting targets for development workflow (#19729)
* feat: add faster linting targets for development workflow

- Add lint-dev target that only checks changed files vs origin/main
- Add lint-format-changed to format only modified Python lines
- Add lint-ruff-dev using diff-quality for incremental lint checks
- Upgrade ruff from 0.1.x to 0.2.x for --range formatting support
- Add pylint and diff-cover as dev dependencies
- Use portable PIP variable for cross-platform compatibility
- Suppress poetry warnings in install-dev target

* fix(mypy): fix type: ignore placement for OTEL LogRecord import

The type: ignore[attr-defined] comment was on the import alias line
inside parentheses, but mypy reports the error on the `from` line.
Collapse to single-line imports so the suppression is on the correct
line. Also add no-redef to the fallback branch.

* fix: address review issues in faster linting PR

- Remove poetry lock/check from install-dev (slow, can mutate lockfile)
- Remove misplaced [virtualenvs] and [installer] from pyproject.toml
  (these belong in poetry.toml, not project metadata)
- Remove unused pylint dev dependency (diff-quality uses pylint output
  format, not the pylint package itself)
- Fix trailing whitespace in .PHONY declaration
- Use mktemp instead of hardcoded /tmp/ruff.txt in lint-ruff-dev
- Guard lint-ruff-FULL-dev against empty file list from git diff
- Fix incorrect comment on lint-dev target
- Regenerate poetry.lock

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: address review issues in faster linting PR

- Remove poetry lock/check from install-dev (slow, can mutate lockfile)
- Remove misplaced [virtualenvs] and [installer] from pyproject.toml
  (these belong in poetry.toml, not project metadata)
- Remove unused pylint dev dependency (diff-quality uses pylint output
  format, not the pylint package itself)
- Fix trailing whitespace in .PHONY declaration
- Use mktemp instead of hardcoded /tmp/ruff.txt in lint-ruff-dev
- Guard lint-ruff-FULL-dev against empty file list from git diff
- Fix incorrect comment on lint-dev target
- Regenerate poetry.lock

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:29:29 -08:00
Ishaan Jaffer
c80fae71ef bump litellm enterprise PIP 2026-02-03 10:39:39 -08:00
jquinter
1985aa04fa Fix Nova grounding web_search_options={} not applying systemTool (#20044)
* Fix Nova grounding web_search_options={} not applying systemTool

Two bugs prevented web_search_options={} from working for Nova grounding:

1. Empty dict falsy check: The condition `value and isinstance(value, dict)`
   short-circuits to False when value is {} (empty dict is falsy in Python).
   Changed to `isinstance(value, dict)` to match Anthropic's implementation.

2. Pre-formatted tools mangled by _bedrock_tools_pt: The systemTool
   (already in Bedrock format) was added to optional_params["tools"], but
   _process_tools_and_beta passed all tools through _bedrock_tools_pt which
   expects OpenAI-format tools. This corrupted the systemTool into an empty
   toolSpec. Fixed by separating systemTool blocks before transformation
   and appending them after.

Fixes follow-up to #19598

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix python-multipart Python version constraint for Poetry lock

python-multipart ^0.0.22 requires Python >=3.10 but the project supports
>=3.9. Add python = ">=3.10" marker so Poetry can resolve dependencies
for Python 3.9.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 18:23:31 +05:30
Ishaan Jaffer
7e5e626781 bump extras 2026-01-31 15:19:14 -08:00
Alexsander Hamir
69bd4426e8
[Release Day] - Fixed CI/CD issues & changed processes (#19902) 2026-01-28 17:57:24 -08:00
Ishaan Jaffer
df3c54ec6a BUMP extras 2026-01-24 14:04:30 -08:00
Ishaan Jaffer
c945677ea8 BUMP pyproject 2026-01-23 13:28:06 -08:00
Kamil Jopek
ce722ab763
Make grpc dependency optional (#19447)
* Make grpc optional and document gRPC OTEL setup

* Add tests for missing OTLP gRPC imports
2026-01-20 19:03:52 -08:00
Yuta Saito
ec7bf0ff1a Merge remote-tracking branch 'upstream/main' into litellm_feat_mcp_version_up 2026-01-20 09:52:38 +09:00
Sameer Kankute
c5a8d4e34e
Merge branch 'main' into litellm_staging_01_16_2026 2026-01-19 18:11:21 +05:30
Yuta Saito
30f2c09401 feat: mcp version up 1.21.2 -> 1.25.0 2026-01-19 15:25:08 +09:00
Ishaan Jaffer
0a84120be5 v1.81.0 2026-01-17 16:43:00 -08:00
Harshit Jain
866bd46748
chore: resolve ModuleNotFoundError for Microsoft Foundry Agents (#18991) 2026-01-17 04:56:52 +05:30
YutaSaito
7aba0f738a
Revert "Litellm staging 01 15 2026" 2026-01-17 06:31:34 +09:00
Sameer Kankute
84974d5745 Fix boto3 conflicting dependency 2026-01-16 16:55:12 +05:30
burnerburnerburnerman
5676c6c135
Chore: bump boto3 version (#19090) 2026-01-16 02:39:30 +05:30
Ishaan Jaffer
3223554905 bump 2026-01-10 14:15:28 -08:00
Ishaan Jaffer
676e362d43 bump extrs 2026-01-07 14:40:30 +05:30
Anders Kaseorg
89b4a6d67c
Allow installation with current grpcio on old Python (#18473)
Instead of limiting grpcio < 1.68.0, specifically exclude the versions
affected by the reconnect bug, and allow installation with either
older or newer versions.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2026-01-04 00:45:15 +05:30
prasadkona
d33c54ee0c
Merge branch 'main' into feat/databricks-partner-integration 2025-12-22 12:30:03 -08:00
prasadkona
3a1baae45c feat(databricks): Add enhanced authentication, security features, and custom user-agent support
- Add OAuth M2M (Machine-to-Machine) authentication via DATABRICKS_CLIENT_ID and DATABRICKS_CLIENT_SECRET
- Add Databricks SDK auto-auth with automatic credential discovery
- Add sensitive data redaction for secure logging (tokens, API keys, secrets)
- Add custom user_agent parameter for partner attribution in Databricks telemetry
- Support user_agent in LiteLLM Proxy via config.yaml litellm_params
- Add 49 mocked unit tests for all new functionality
- Add 13 E2E tests for real-world validation (skipped in CI)
- Update documentation with new features and examples
2025-12-22 12:02:51 -08:00
Ishaan Jaffer
b351472f89 new build 2025-12-20 14:55:41 +05:30
Ishaan Jaffer
95e818fdc4 bump litellm-proxy-extras 2025-12-13 16:22:26 -08:00
Peter Chanthamynavong
df9a644e37
fix: add Python 3.14 support via grpcio version constraints (#17666)
* fix: add Python 3.14 support via grpcio version constraints

Updates grpcio dependency to support Python 3.14 while maintaining
backward compatibility:

- Python <3.14: grpcio >=1.62.3,<1.68.0 (avoids buggy 1.68.x versions)
- Python >=3.14: grpcio >=1.75.0 (has cp314 wheels + bug fix)

The grpc/grpc#38290 bug was fixed in grpcio 1.75.0+, which also
added Python 3.14 wheel support.

Fixes #15504
Fixes #17374

* chore: regenerate poetry.lock

Update lock file to match pyproject.toml changes for grpcio
Python 3.14 conditional dependency.
2025-12-11 15:24:48 -08:00
yuneng-jiang
1c6de2b80d Merge remote-tracking branch 'origin' into litellm_sendgrid 2025-12-10 20:39:25 -08:00
yuneng-jiang
439d42ba67 bump: version 0.1.24 → 0.1.25 2025-12-10 18:26:07 -08:00
Krrish Dholakia
4ea758767a build: update poetry.lock 2025-12-10 11:09:28 -08:00
saisurya237
f3ead2c153
add a new feature fix to expose the team alias when authenticating th… (#17725)
* CLI SSO: show team aliases in team selection

* temp poetry lock fix

* add poetry.lock to gitignore

* Revert proxy_server background job refactor

* Revert proxy_server background job refactor

* rever gitignore and poetry lock file
2025-12-10 10:10:28 -08:00
Ishaan Jaffer
bcf601b8a6 bump proxy extras pip 2025-12-06 10:00:22 -08:00
Andrew Truong
1879623502
feat: Basic Weave OTEL integration (#17439)
* test

* testfix
2025-12-03 21:26:22 -08:00
Yannay Hammer
d7ad2913be
Upgrade websockets to v15 (#16734) 2025-11-27 10:08:16 -08:00
Ishaan Jaffer
0437be13d3 bump pyproject extras 2025-11-26 13:10:57 -08:00
Ishaan Jaffer
c7746eb58f bump proxy extras 2025-11-26 11:40:06 -08:00
YutaSaito
93affcb732
[Feat] mcp resources support (#16800)
* feat: mcp prompts support

* feat: mcp resources support
2025-11-20 14:53:44 -08:00
Ishaan Jaffer
d389b9dd66 bump litellm enterprise 2025-11-19 16:56:50 -08:00
Ishaan Jaffer
6477740b8c bump proxy extras 2025-11-19 13:23:16 -08:00
Cesar Garcia
4167a64853
fix: Support GPT-5.1 reasoning.effort='none' in proxy (#16745)
* fix: Add support for GPT-5.1 reasoning.effort='none' parameter

- Override Reasoning type to include 'none' effort value
- Maintains compatibility with semantic-router (requires openai <2.0.0)
- GPT-5.1 defaults to reasoning.effort='none' as of OpenAI SDK 2.8.0
- Override can be removed once semantic-router supports OpenAI SDK 2.x

Fixes #16741

* feat: Update to OpenAI SDK 2.8+ and Python 3.9+

- Update minimum Python version from 3.8.1 to 3.9 (3.8 EOL Oct 2024)
- Update OpenAI SDK requirement from >=1.99.5 to >=2.8.0
- Update semantic-router to >=0.1.12 with Python >=3.9,<3.14 constraint
- Update resend to >=0.8.0 (allows 2.x versions)
- Revert custom Reasoning TypedDict - now using native type from OpenAI SDK 2.8+

OpenAI SDK 2.8.0 natively supports reasoning.effort='none' for GPT-5.1,
eliminating the need for our custom type override.

* chore: Update poetry.lock with OpenAI SDK 2.8.1 and dependencies
2025-11-18 20:06:50 -08:00
Krish Dholakia
586f126395
Prometheus - make OSS (#16689)
* refactor: remove enterprise license from prometheus metrics

* refactor: complete refactoring imports

* refactor: complete prometheus refactoring

* bump: version 1.80.0 → 1.80.1

* bump: version 1.80.1 → 1.80.2

* build: update litellm lock file

* docs(enterprise.md): cleanup enterprise docs

* docs: more docs cleanup

* docs: doc cleanup

* fix: fix imports

* fix: fix linting error
2025-11-15 11:06:34 -08:00
Krrish Dholakia
70b8641822 build: bump migration 2025-11-15 09:34:50 -08:00
Ishaan Jaffer
a029c88cb9 bump litellm-proxy-extras 2025-11-15 09:11:47 -08:00
Ishaan Jaffer
f8c022c8f5 bump new schema 2025-11-14 17:39:54 -08:00
Krish Dholakia
06906534b3
feat(audio_transcriptions/): calculate duration of audio file for cost calculation + feat (image_generations): cost tracking accuracy improved with output_format, quality, size values fixed per openai model
* feat(audio_transcriptions/): calculate duration of audio file for cost calculation

Fixes https://github.com/BerriAI/litellm/issues/11846

Closes https://github.com/BerriAI/litellm/issues/14605

* fix(cost_calculator.py): correctly use base model, when set

Fixes issue where azure base model was being ignored

* feat(cost_calculator.py): fix default cost tracking quality param for image generation

* feat(image_generations/): return output_format, quality, size

aligns response to openai spec and improves cost tracking accuracy

* fix(cost_calculator.py): refactor cost calculation for image generation to use image response instead of hidden params

* build: update build

* fix: fix cost calculation

* build: update poetry lock

* fix: fix ruff checks

* fix: fix aembedding

* fix: fix ruff errors

* fix: modify to catch errors

* fix: test

* fix: loosen test to handle openai lib out of sync

* fix: fix base models

* fix: fix usage object
2025-11-08 16:24:31 -08:00
Krish Dholakia
202eaeb1a2
Revert "(feat) Audio transcription - cost tracking + (feat) image generation …" (#16409)
This reverts commit c96da44265.
2025-11-08 15:38:16 -08:00
Krish Dholakia
c96da44265
(feat) Audio transcription - cost tracking + (feat) image generation - accurate cost tracking based on output_format/quality/size
* feat(audio_transcriptions/): calculate duration of audio file for cost calculation

Fixes https://github.com/BerriAI/litellm/issues/11846

Closes https://github.com/BerriAI/litellm/issues/14605

* fix(cost_calculator.py): correctly use base model, when set

Fixes issue where azure base model was being ignored

* feat(cost_calculator.py): fix default cost tracking quality param for image generation

* feat(image_generations/): return output_format, quality, size

aligns response to openai spec and improves cost tracking accuracy

* fix(cost_calculator.py): refactor cost calculation for image generation to use image response instead of hidden params

* build: update build

* fix: fix cost calculation

* build: update poetry lock

* fix: fix ruff checks

* fix: fix aembedding

* fix: fix ruff errors

* fix: modify to catch errors

* fix: test

* fix: loosen test to handle openai lib out of sync
2025-11-08 15:30:46 -08:00
Krish Dholakia
bce8a5d6b7
Revert "(feat) audio transcriptions cost tracking (for azure/other non-openai…" (#16402)
This reverts commit 9a88fe0861.
2025-11-08 14:24:51 -08:00
Krish Dholakia
9a88fe0861
(feat) audio transcriptions cost tracking (for azure/other non-openai models) + (fix) image generations - accurate cost tracking for dalle3/gpt-image-1 - uses the correct max image quality (#16076)
* feat(audio_transcriptions/): calculate duration of audio file for cost calculation

Fixes https://github.com/BerriAI/litellm/issues/11846

Closes https://github.com/BerriAI/litellm/issues/14605

* fix(cost_calculator.py): correctly use base model, when set

Fixes issue where azure base model was being ignored

* feat(cost_calculator.py): fix default cost tracking quality param for image generation

* feat(image_generations/): return output_format, quality, size

aligns response to openai spec and improves cost tracking accuracy

* fix(cost_calculator.py): refactor cost calculation for image generation to use image response instead of hidden params

* build: update build

* fix: fix cost calculation

* build: update poetry lock

* fix: fix ruff checks
2025-11-08 13:54:37 -08:00
Ishaan Jaffer
9b6a4c2650 bump pyproject 2025-11-08 10:24:23 -08:00