Commit Graph

30881 Commits

Author SHA1 Message Date
Krrish Dholakia
2af5900c00 build(pyproject.toml): bump version 2025-07-30 15:45:37 -07:00
Ishaan Jaff
5aa4a70bd3 fix grype scan 2025-07-30 15:35:16 -07:00
Krrish Dholakia
3bf7411491 ci(config.yml): run prisma generate before running enterprise tests 2025-07-30 15:28:45 -07:00
Krrish Dholakia
6da36049fe ci: remove bad script 2025-07-30 15:25:32 -07:00
Jugal D. Bhatt
5db4862cbf
[MCP Gateway] Litellm mcp client list fail (#13114)
* fix headers

* fix test

* fix ruff

* added try except for catching errors which lead to client failures

* fix mypy

* fix ruff

* fix tests

* fix python error

* fix test

* fix test

* fixed the MCP Call Tool result
2025-07-30 15:23:19 -07:00
Krish Dholakia
3ca99f1def
Litellm explore postgres db ci cd (#13156)
* ci(config.yml): testing with ci/cd db

* build: spin up pg db in ci/cd test
2025-07-30 15:17:12 -07:00
Ishaan Jaff
92cdac2e87
[Feat] v2 updates - tracking DAU, WAU, MAU for coding tool usage + show Daily Usage per User (#13147)
* Add user agent analytics endpoints and UI for tracking client metrics

Co-authored-by: ishaan <ishaan@berri.ai>

* fix user agent analytics

* fix getting DAU

* fixes for user agent

* showing top user agents

* on this page remove Success Rate by User Agent

* fix linting

* add agent activity

* cleanup interface

* fix ruff

* round cost

* fix charts

* fixes - show DAU, MAU, WAU

* move to a diff file

* fix

* fixes for user agent analytics

* fix user_agent_analytics_endpoints

* fix mypy linting

* fix linting

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: ishaan <ishaan@berri.ai>
2025-07-30 14:42:30 -07:00
joshualipman123
471eec09c3 Add site url and app name env var instructions to docs 2025-07-30 14:19:33 -07:00
Jugal D. Bhatt
eb8a338d9b
[MCP Guardrails] move pre and during hooks to ProxyLoggin (#13109)
* move pre and during hooks t o ProxyLoggin

* fix lint

* fix ruff

* fix tests
2025-07-30 13:58:41 -07:00
betterthanbreakfast
51a103c351 [Bug]: Set user from token user_id for OpenMeter integration 2025-07-30 22:23:30 +02:00
Jugal D. Bhatt
840dd2e7c7
[LLM translation] Fix bedrock computer use (#13143)
* Add support for bedrock computer use

* remove print

* split bedrock tools

* add hosted tools

* fix tool use

* fix tool use

* fix function calling

* fix converse transformation

* fix tests

* fix llm translation test

* fix computer use
2025-07-30 12:27:12 -07:00
Ishaan Jaff
0201c51b50
[Feat] UI + Backend add a tab for use agent activity (#13146)
* Add user agent analytics endpoints and UI for tracking client metrics

Co-authored-by: ishaan <ishaan@berri.ai>

* fix user agent analytics

* fix getting DAU

* fixes for user agent

* showing top user agents

* on this page remove Success Rate by User Agent

* fix linting

* add agent activity

* cleanup interface

* fix ruff

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: ishaan <ishaan@berri.ai>
2025-07-30 12:11:07 -07:00
tanjiro
1f0e5ef340
New Advanced Date Range Picker Component (#13141)
* new date-range picker added

* remove unused utils
2025-07-30 11:56:24 -07:00
joshualipman123
7ef52882b7 Add Vercel AI Gateway API key docs link to docs 2025-07-30 11:43:41 -07:00
Jugal D. Bhatt
89daa665a3
fix object permission for orgs (#13142) 2025-07-30 11:41:25 -07:00
Krrish Dholakia
68177686e3 docs: cleanup 2025-07-30 10:21:45 -07:00
joshualipman123
9783a8aa7c Update ai gateway docs 2025-07-30 10:17:54 -07:00
Jason Jensen
9b75b6915d test(customer): add unit tests for customer budget update functionality 2025-07-30 17:01:18 +00:00
tanjiro
0af45206a3
Added Voyage, Jinai, Deepinfra and VolcEngine providers on the UI (#13131)
* added voyage and jinai and volcengine

* deepinfra added and alphabetically ordered
2025-07-30 10:01:07 -07:00
joshualipman123
1ea28ccf67 Add Vercel AI Gateway provider support 2025-07-30 10:01:05 -07:00
Jason Jensen
1181f1bb2e test(customer): add unit tests for budget_id handling in customer update endpoint 2025-07-30 16:47:25 +00:00
Jugal D. Bhatt
5fbe732ce1
[MCP Protocol header] fix issue with clients protocol header (#13112)
* fix headers

* fix test

* fix ruff

* fix mypy
2025-07-30 20:42:29 +05:30
Jugal D. Bhatt
e324f76859
[MCP Gateway] add health check endpoints for MCP (#13106)
* add health check endpoints for MCP

* add import

* Clean up endpopints

* fix ruff
2025-07-30 20:40:44 +05:30
Krrish Dholakia
8c70025a63 docs: cleanup 2025-07-30 08:02:00 -07:00
Johnny.H
97d89584c1
fix tool aws bedrock call index when the function only have optional arg (#13115) 2025-07-29 22:07:24 -07:00
Krrish Dholakia
ae947e63ce test: update test 2025-07-29 22:07:07 -07:00
Krish Dholakia
ea6b4b08d3
move to use_prisma_migrate by default + resolve team-only models on auth checks + UI - add sagemaker on UI (#13117)
* fix(proxy_cli.py): make use_prisma_migrate proxy default

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

 Prisma migrate deploy prevents resetting db

* fix(auth_checks.py): resolve team only models while doing auth checks on model access groups

Fixes issue where key had access via an access group, but team only model could not be called

* test(test_router.py): add unit testing

* feat(provider_specific_fields.tsx): add aws sagemaker on UI
2025-07-29 21:56:18 -07:00
Krish Dholakia
a34206f67e
fix(model_checks.py): handle custom values in wildcard model name (e.g. genai/test/*) (#13116)
Fixes https://github.com/BerriAI/litellm/issues/13078
2025-07-29 21:42:15 -07:00
Krrish Dholakia
7e5bc8af28 test: update test 2025-07-29 21:35:44 -07:00
Krish Dholakia
1c182919b5
Revert "[LLM translation] Add support for bedrock computer use (#12948)" (#13118)
This reverts commit 760d747465.
2025-07-29 21:33:46 -07:00
Krrish Dholakia
f544a4e238 test: update test 2025-07-29 21:08:36 -07:00
Ishaan Jaff
36d46e0ecf use _safe_get_request_query_params 2025-07-29 18:19:38 -07:00
Ishaan Jaff
1af0743e58 Revert "Revert "[MCP Gateway] Add protocol headers (#13062)""
This reverts commit acd915f2db.
2025-07-29 18:14:31 -07:00
Ishaan Jaff
50466e0077 test_user_api_key_auth 2025-07-29 18:01:40 -07:00
tanjiro
c4088841d9
After selecting date range show loader on usage cost charts (#13113)
* prettier

* added loader in bar chart

* prettier

* added existing loader style

* make datepicker responsive
2025-07-29 17:55:39 -07:00
Ishaan Jaff
d10a5a69af fix test_mlflow_request_tags_functionality 2025-07-29 17:33:24 -07:00
Ishaan Jaff
acd915f2db Revert "[MCP Gateway] Add protocol headers (#13062)"
This reverts commit 8de24bab7c.
2025-07-29 17:26:00 -07:00
Ishaan Jaff
e938fa9e41 fix transform_image_generation_response 2025-07-29 17:08:44 -07:00
Ishaan Jaff
51a140feb7 transform_image_generation_response 2025-07-29 17:06:16 -07:00
Ishaan Jaff
33f65114b6 bump: version 1.74.10 → 1.74.11 2025-07-29 16:56:09 -07:00
Jugal D. Bhatt
760d747465
[LLM translation] Add support for bedrock computer use (#12948)
* Add support for bedrock computer use

* remove print

* split bedrock tools

* add hosted tools

* fix tool use

* fix tool use

* fix function calling

* fix converse transformation

* fix tests
2025-07-29 16:52:23 -07:00
Ishaan Jaff
5fa2b00c3f
[Feat] MLFlow Logging - Allow adding tags for ML Flow logging requests (#13108)
* add mlflow tags

* fixes config

* add litellm mlflow

* test_mlflow_request_tags_functionality

* docs ML flow litellm proxy

* docs ml flow

* docs mlflow
2025-07-29 16:51:27 -07:00
Cole McIntosh
8826e02a98
feat: Add dot notation support for all JWT fields (#13013)
* feat: Add dot notation support for all JWT fields

- Updated all JWT field access methods to use get_nested_value for dot notation support
- Enhanced get_team_id to properly handle team_id_default fallback with nested fields
- Added comprehensive unit tests for nested JWT field access and edge cases
- Updated documentation to reflect dot notation support across all JWT fields
- Maintains full backward compatibility with existing flat field configurations

Supported fields with dot notation:
- team_id_jwt_field, team_ids_jwt_field, user_id_jwt_field
- user_email_jwt_field, org_id_jwt_field, object_id_jwt_field
- end_user_id_jwt_field (roles_jwt_field was already supported)

Example: user_id_jwt_field: 'user.sub' accesses token['user']['sub']

* fix: Add type annotations to resolve mypy errors

- Add explicit type annotation for team_ids variable in get_team_ids_from_jwt
- Add type ignore comment for sentinel object return in get_team_id
- Resolves mypy errors while maintaining functionality

* fix: Resolve mypy type error in get_team_ids_from_jwt

- Remove explicit List[str] type annotation that conflicts with get_nested_value return type
- Simplify return logic to use 'team_ids or []' ensuring always returns List[str]
- Fixes: Incompatible types in assignment (expression has type 'list[str] | None', variable has type 'list[str]')

* fix: Add proper type annotation for team_ids variable

- Use Optional[List[str]] type annotation to satisfy mypy requirements
- Resolves: Need type annotation for 'team_ids' [var-annotated]
- Maintains functionality while ensuring type safety

* refactor: remove outdated JWT unit tests and consolidate JWT-related functionality

- Deleted the test_jwt.py file as it contained outdated and redundant tests.
- Consolidated JWT-related tests into test_handle_jwt.py for better organization and maintainability.
- Updated tests to ensure proper functionality of JWT handling, including token validation and role mapping.
- Enhanced test coverage for JWT field access and nested claims handling.

* test: add comprehensive unit tests for JWT authentication

- Introduced a new test file `test_jwt.py` containing unit tests for JWT authentication.
- Implemented tests for loading configuration with custom role names, validating tokens, and handling team tokens.
- Enhanced coverage for JWT field access, nested claims, and role-based access control.
- Added fixtures for Prisma client and public JWT key generation to support testing.
- Ensured proper handling of valid and invalid tokens, including user and team scenarios.

* revert test_handle_jwt.py

* rename file

* test: remove outdated JWT nesting tests and add new nested field access tests

- Deleted the `test_jwt_nesting.py` file as it contained outdated tests.
- Introduced new tests in `test_handle_jwt.py` to verify nested JWT field access.
- Enhanced coverage for accessing nested values using dot notation and ensured backward compatibility with flat field names.
- Added tests for handling missing nested paths and appropriate default values.
- Improved handling of metadata prefixes in nested field access.

* restore file
2025-07-29 16:51:17 -07:00
Krrish Dholakia
8e3caf4306 docs(index.md): cleanup 2025-07-29 16:31:19 -07:00
Krrish Dholakia
b35d20fd93 docs(index.md): add rc docker tag 2025-07-29 16:30:43 -07:00
Krish Dholakia
b7c5073d28
Custom Auth - bubble up custom exceptions (#13093)
* fix(enterprise/litellm_enterprise/proxy/auth/user_api_key_auth.py): bubble up exception if type is ProxyException

* docs(custom_auth.md): doc on bubbling up custom exceptions
2025-07-29 16:28:25 -07:00
Amit Kumar
b6f15ed64d
Fix token counter to ignore unsupported keys like prefix (#11791) (#11954) 2025-07-29 16:04:09 -07:00
Jugal D. Bhatt
8de24bab7c
[MCP Gateway] Add protocol headers (#13062)
* Add protocol headers

* fix mypy

* fix tests

* fix tests
2025-07-29 16:03:23 -07:00
Siddharth Sahu
39d59f1900
Fix/gemini api key environment variable support (#12507)
* Fix: Add support for GOOGLE_API_KEY environment variables for Gemini API authentication

* added test cases

* incoperated feedback to make it more maintainable

* fix failed linting CI
2025-07-29 15:56:01 -07:00
zengxu
1899549e7b
Fix fallback delete (#12606)
* fix fallbacks deletion

* x
2025-07-29 15:52:28 -07:00