Commit graph

13405 commits

Author SHA1 Message Date
Ishaan Jaff
86b473d267 allow adding auth on /metrics endpoint 2025-04-04 20:37:17 -07:00
Krish Dholakia
90a4dfab3c
fix(xai/chat/transformation.py): filter out 'name' param for xai non-… (#9761)
* fix(xai/chat/transformation.py): filter out 'name' param for xai non-user roles

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

* test fix test_hf_chat_template

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
2025-04-04 20:37:08 -07:00
Krish Dholakia
d66db2207b
Allow team members to see team models (#9742)
* fix(proxy_server.py): allow team member to see team models

* fix(model_dashboard.tsx): show edit + delete icons to be disabled if user is not admin and did not create models

* fix(proxy_server.py): fix ruff function size error

* fix(proxy_server.py): fix user model filter check
2025-04-04 20:36:48 -07:00
Ishaan Jaff
96ce5dbf7d _should_run_auth_on_metrics_endpoint 2025-04-04 20:32:04 -07:00
Ishaan Jaff
c7523818b4 PrometheusAuthMiddleware 2025-04-04 20:27:17 -07:00
Ishaan Jaff
f16c531002 _mount_metrics_endpoint 2025-04-04 19:54:20 -07:00
Krish Dholakia
c555c15ad7
fix(router.py): support reusable credentials via passthrough router (#9758)
* fix(router.py): support reusable credentials via passthrough router

enables reusable vertex credentials to be used in passthrough

* test: fix test

* test(test_router_adding_deployments.py): add unit testing
2025-04-04 18:40:14 -07:00
Ishaan Jaff
253060cb09 allow requiring auth for /metrics endpoint 2025-04-04 17:35:02 -07:00
Ishaan Jaff
c402db9057 prometheus emit llm provider on failure metric 2025-04-04 17:07:43 -07:00
Ishaan Jaff
150e77cd7d Merge branch 'main' into litellm_reliability_fix_db_txs 2025-04-04 16:46:46 -07:00
Ishaan Jaff
d3018a4c28 Merge branch 'main' into litellm_metrics_pod_lock_manager 2025-04-04 16:46:32 -07:00
Ishaan Jaff
901d6fe7b7 add operational metrics for pod lock manager v2 arch 2025-04-04 16:41:07 -07:00
Krish Dholakia
e1f7bcb47d
Fix VertexAI Credential Caching issue (#9756)
* refactor(vertex_llm_base.py): Prevent credential misrouting for projects

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

* fix: passing unit tests

* fix(vertex_llm_base.py): common auth logic across sync + async vertex ai calls

prevents credential caching issue across both flows

* test: fix test

* fix(vertex_llm_base.py): handle project id in default cause

* fix(factory.py): don't pass cache control if not set

bedrock invoke does not support this

* test: fix test

* fix(vertex_llm_base.py): add .exception message in load_auth

* fix: fix ruff error
2025-04-04 16:38:08 -07:00
Ishaan Jaff
bde88b3ba6 fix type error 2025-04-04 16:34:43 -07:00
Ishaan Jaff
1cdee4b331 Merge branch 'main' into litellm_metrics_pod_lock_manager 2025-04-04 16:33:16 -07:00
Ishaan Jaff
decb6649ec test_queue_flush_limit 2025-04-04 16:29:06 -07:00
Ishaan Jaff
e77a178a37 test_queue_size_reduction_with_large_volume 2025-04-04 16:21:29 -07:00
Ishaan Jaff
eb48cbdec6 aggregate_queue_updates 2025-04-04 15:54:07 -07:00
Ishaan Jaff
cdd351a03b
Merge pull request #9745 from BerriAI/litellm_sso_fixes_dev
[Feat] Allow assigning SSO users to teams on MSFT SSO
2025-04-04 15:40:19 -07:00
Ishaan Jaff
93068cb142 flush_all_updates_from_in_memory_queue 2025-04-04 15:34:56 -07:00
Ishaan Jaff
065477abb4 add _get_aggregated_spend_update_queue_item 2025-04-04 15:32:27 -07:00
Ishaan Jaff
9abaefea62 add logic for max size in memory queue 2025-04-04 15:31:40 -07:00
Ishaan Jaff
363fb0c46f add MAX_SIZE_IN_MEMORY_QUEUE 2025-04-04 15:31:09 -07:00
Ishaan Jaff
3374c54ba2 add MAX_SIZE_IN_MEMORY_QUEUE constant 2025-04-04 15:30:53 -07:00
Ishaan Jaff
cba1dacc7d ui new build 2025-04-04 14:39:55 -07:00
Krrish Dholakia
ad90871ad6 fix(factory.py): don't pass cache control if not set
bedrock invoke does not support this
2025-04-04 12:37:34 -07:00
Adrian Lyjak
d640bc0a00
fix #8425, passthrough kwargs during acompletion, and unwrap extra_body for openrouter (#9747) 2025-04-03 22:19:40 -07:00
Ishaan Jaff
984114adf0 fix sso callback 2025-04-03 22:13:46 -07:00
Ishaan Jaff
f1bc99a137 MSFT make it easier for using group ids with MSFT 2025-04-03 20:43:22 -07:00
Albert Örwall
bd5a8d582b
Fix prompt caching for Anthropic tool calls (#9706)
* Add prompt cache support to Anhtropic tool calls

* Fix linting issue and add test
2025-04-03 20:19:21 -07:00
Ishaan Jaff
add24d5999 debug show SSO callback result 2025-04-03 20:06:21 -07:00
sajda
4a4328b5bb
fix:Gemini Flash 2.0 implementation is not returning the logprobs (#9713)
* fix:Gemini Flash 2.0 implementation is not returning the logprobs

* fix: linting error by adding a helper method called _process_candidates
2025-04-03 11:53:41 -07:00
Krish Dholakia
6dda1ba6dd
LiteLLM Minor Fixes & Improvements (04/02/2025) (#9725)
* Add date picker to usage tab + Add reasoning_content token tracking across all providers on streaming (#9722)

* feat(new_usage.tsx): add date picker for new usage tab

allow user to look back on their usage data

* feat(anthropic/chat/transformation.py): report reasoning tokens in completion token details

allows usage tracking on how many reasoning tokens are actually being used

* feat(streaming_chunk_builder.py): return reasoning_tokens in anthropic/openai streaming response

allows tracking reasoning_token usage across providers

* Fix update team metadata + fix bulk adding models on Ui  (#9721)

* fix(handle_add_model_submit.tsx): fix bulk adding models

* fix(team_info.tsx): fix team metadata update

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

* (v0) Unified file id - allow calling multiple providers with same file id (#9718)

* feat(files_endpoints.py): initial commit adding 'target_model_names' support

allow developer to specify all the models they want to call with the file

* feat(files_endpoints.py): return unified files endpoint

* test(test_files_endpoints.py): add validation test - if invalid purpose submitted

* feat: more updates

* feat: initial working commit of unified file id translation

* fix: additional fixes

* fix(router.py): remove model replace logic in jsonl on acreate_file

enables file upload to work for chat completion requests as well

* fix(files_endpoints.py): remove whitespace around model name

* fix(azure/handler.py): return acreate_file with correct response type

* fix: fix linting errors

* test: fix mock test to run on github actions

* fix: fix ruff errors

* fix: fix file too large error

* fix(utils.py): remove redundant var

* test: modify test to work on github actions

* test: update tests

* test: more debug logs to understand ci/cd issue

* test: fix test for respx

* test: skip mock respx test

fails on ci/cd - not clear why

* fix: fix ruff check

* fix: fix test

* fix(model_connection_test.tsx): fix linting error

* test: update unit tests
2025-04-03 11:48:52 -07:00
fengjiajie
5a18eebdb6
Fix: Use request body in curl log for Gemini streaming mode (#9736) 2025-04-03 09:45:27 -07:00
Tobias Hermann
5785600c4e
[Feat] Add VertexAI gemini-2.0-flash (#9723) 2025-04-02 22:33:23 -07:00
Ishaan Jaff
e3b788ea29 fix test 2025-04-02 21:58:35 -07:00
Ishaan Jaff
dd2d1dc2f4 Merge branch 'main' into litellm_metrics_pod_lock_manager 2025-04-02 21:35:55 -07:00
Krish Dholakia
8ee32291e0
Squashed commit of the following: (#9709)
commit b12a9892b7
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Wed Apr 2 08:09:56 2025 -0700

    fix(utils.py): don't modify openai_token_counter

commit 294de31803
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Mon Mar 24 21:22:40 2025 -0700

    fix: fix linting error

commit cb6e9fbe40
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Mon Mar 24 19:52:45 2025 -0700

    refactor: complete migration

commit bfc159172d
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Mon Mar 24 19:09:59 2025 -0700

    refactor: refactor more constants

commit 43ffb6a558
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Mon Mar 24 18:45:24 2025 -0700

    fix: test

commit 04dbe4310c
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Mon Mar 24 18:28:58 2025 -0700

    refactor: refactor: move more constants into constants.py

commit 3c26284aff
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Mon Mar 24 18:14:46 2025 -0700

    refactor: migrate hardcoded constants out of __init__.py

commit c11e0de69d
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Mon Mar 24 18:11:21 2025 -0700

    build: migrate all constants into constants.py

commit 7882bdc787
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Mon Mar 24 18:07:37 2025 -0700

    build: initial test banning hardcoded numbers in repo
2025-04-02 21:24:54 -07:00
Ishaan Jaff
bcf42fd82d linting fix prometheus services 2025-04-02 21:19:05 -07:00
Ishaan Jaff
0155b9f212 Merge branch 'main' into litellm_refactor_pod_lock_manager 2025-04-02 21:05:18 -07:00
Ishaan Jaff
5222cce510 Merge branch 'main' into litellm_metrics_pod_lock_manager 2025-04-02 21:04:44 -07:00
Ishaan Jaff
acf920a41a
Merge branch 'main' into litellm_fix_azure_o_series 2025-04-02 20:58:52 -07:00
Ishaan Jaff
c4e8b9607d fix async_set_cache 2025-04-02 18:54:51 -07:00
Ishaan Jaff
07215e3f7a fix async_set_cache 2025-04-02 18:51:41 -07:00
Ishaan Jaff
80fb4ece97 prom emit size of DB TX queues for observability 2025-04-02 18:39:29 -07:00
Ishaan Jaff
3256b6af6c track service types on prom services 2025-04-02 18:03:09 -07:00
Ishaan Jaff
05b30e28db clean up service metrics 2025-04-02 17:50:41 -07:00
Ishaan Jaff
73bbd0a446 emit lock acquired and released events 2025-04-02 17:40:25 -07:00
Ishaan Jaff
e09ef4afc7 use service logger for tracking pod lock status 2025-04-02 17:39:48 -07:00
Ishaan Jaff
8b12a2e5dc fix pod lock manager 2025-04-02 14:52:55 -07:00