Commit Graph
1120 Commits
Author SHA1 Message Date
Krish DholakiaandGitHub 9610c844c7 Merge pull request #9109 from BerriAI/litellm_dev_03_10_2025_p1_v2
Return `code`, `param` and `type` on openai bad request error
2025-03-10 22:38:16 -07:00
Krish DholakiaandGitHub c93a5e2301 Merge pull request #9047 from BerriAI/litellm_dev_03_06_2025_p4
feat(handle_jwt.py): support multiple jwt url's
2025-03-10 22:37:35 -07:00
Krish DholakiaandGitHub 86a5926e26 Merge pull request #9113 from BerriAI/litellm_dev_03_10_2025_p2
fix(base_invoke_transformation.py): support extra_headers on bedrock …
2025-03-10 22:19:10 -07:00
Krrish Dholakia 41b0404ae1 test: fix test 2025-03-10 22:00:50 -07:00
Krrish Dholakia 01aa536716 fix: fix test 2025-03-10 21:46:05 -07:00
Ishaan JaffandGitHub 2903caaf54 Merge pull request #8934 from BerriAI/litellm_fix_team_model_access_checks
JWT Auth Fix - [Bug]: JWT access with Groups not working when team is assigned All Proxy Models access
2025-03-10 21:01:41 -07:00
Utkash Dubey 074c8efdc1 cleanup 2025-03-10 20:13:03 -07:00
Utkash Dubey 14736283bc test original file instead of the backup 2025-03-10 20:09:05 -07:00
Ishaan Jaff 91a7fb0a23 test string checked for model access control 2025-03-10 20:04:18 -07:00
Ishaan Jaff aa5ac6ba3d can_team_access_model 2025-03-10 20:03:19 -07:00
Utkash Dubey 7dbc434318 remove incorrect moderations mode 2025-03-10 19:33:40 -07:00
Utkash Dubey a9d50a615b move test file to correct location 2025-03-10 19:21:51 -07:00
Utkash DubeyandGitHub 45f0ca68c4 Merge branch 'BerriAI:main' into main 2025-03-10 19:21:37 -07:00
Ishaan Jaff 9dcc25d63b Merge branch 'main' into litellm_fix_team_model_access_checks 2025-03-10 19:05:11 -07:00
Ishaan Jaff 8811d4cd11 generate_key 2025-03-10 19:03:50 -07:00
Krish DholakiaandGitHub c58941d49c Merge branch 'main' into litellm_dev_03_06_2025_p4 2025-03-10 18:41:10 -07:00
Krrish Dholakia 68bd05ac24 fix(base_invoke_transformation.py): support extra_headers on bedrock invoke route
Fixes https://github.com/BerriAI/litellm/issues/9106
2025-03-10 16:13:11 -07:00
Ishaan JaffandGitHub 94667e1cf0 Merge pull request #8386 from minwhoo/triton-completions-streaming-fix
Fix triton streaming completions bug
2025-03-10 16:07:19 -07:00
Krrish Dholakia bfbe26b91d feat(azure.py): add azure bad request error support 2025-03-10 15:59:06 -07:00
Krrish Dholakia 5f87dc229a feat(openai.py): bubble all error information back to client 2025-03-10 15:27:43 -07:00
Krrish Dholakia c1ec82fbd5 refactor: instrument body param to bubble up on exception 2025-03-10 15:21:04 -07:00
Utkash Dubey 495b3dc026 feedback 2025-03-10 14:52:30 -07:00
Utkash Dubey c7a04140e9 Revert "changes"
This reverts commit fa88bc9632.
2025-03-10 14:46:21 -07:00
Utkash DubeyandGitHub 1f17daf52c Merge branch 'BerriAI:main' into main 2025-03-10 14:42:30 -07:00
vivek-athinaandGitHub cd4a53d6f2 Merge pull request #4 from BerriAI/main
Update main
2025-03-10 11:13:21 +05:30
Krish DholakiaandGitHub f899b828cf Support openrouter reasoning_content on streaming (#9094)
* feat(convert_dict_to_response.py): support openrouter format of reasoning content

* fix(transformation.py): fix openrouter streaming with reasoning content

Fixes https://github.com/BerriAI/litellm/issues/8193#issuecomment-270892962

* fix: fix type error
2025-03-09 20:03:59 -07:00
Krrish Dholakia c08705517b test: fix test 2025-03-09 19:40:03 -07:00
65ef65d360 feat: prioritize api_key over tenant_id for more Azure AD token provi… (#8701)
* feat: prioritize api_key over tenant_id for more Azure AD token provider (#8318)

* fix: prioritize api_key over tenant_id for Azure AD token provider

* test: Add test for Azure AD token provider in router

* fix: fix linting error

---------

Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
2025-03-09 18:59:37 -07:00
Krish DholakiaandGitHub e00d4fb18c Litellm dev 03 08 2025 p3 (#9089)
* feat(ollama_chat.py): pass down http client to ollama_chat

enables easier testing

* fix(factory.py): fix passing images to ollama's `/api/generate` endpoint

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

* fix(factory.py): fix ollama pt to handle templating correctly
2025-03-09 18:20:56 -07:00
Ishaan Jaff 83062b892b fix test_list_key_helper_team_filtering 2025-03-08 17:21:32 -08:00
Ishaan Jaff 6e3b21775f test_cost_azure_openai_prompt_caching 2025-03-08 16:19:28 -08:00
Ishaan JaffandGitHub b41311bb21 (UI) - Fix show correct count of internal user keys on Users Page (#9082)
* get_user_key_counts

* fix get_user_key_counts

* fix get_user_key_counts

* test_get_users_filters_dashboard_keys

* remove unused func
2025-03-08 16:13:18 -08:00
Ishaan JaffandGitHub 73df319f4e (Clean up) - Allow switching off storing Error Logs in DB (#9084)
* fix - cleanup, dont store ErrorLogs in 2 tables

* async_post_call_failure_hook

* docs disable error logs

* disable_error_logs
2025-03-08 16:12:03 -08:00
Krish DholakiaandGitHub 4330ef8e81 Fix batches api cost tracking + Log batch models in spend logs / standard logging payload (#9077)
* feat(batches/): fix batch cost calculation - ensure it's accurate

use the correct cost value - prev. defaulting to non-batch cost

* feat(batch_utils.py): log batch models to spend logs + standard logging payload

makes it easy to understand how cost was calculated

* fix: fix stored payload for test

* test: fix test
2025-03-08 11:47:25 -08:00
Teja VishwanadhaandGitHub 8c049dfffc support bytes.IO for audio transcription (#9071) 2025-03-08 08:47:15 -08:00
Ishaan JaffandGitHub e2d612efd9 Bug fix - String data: stripped from entire content in streamed Gemini responses (#9070)
* _strip_sse_data_from_chunk

* use _strip_sse_data_from_chunk

* use _strip_sse_data_from_chunk

* use _strip_sse_data_from_chunk

* _strip_sse_data_from_chunk

* test_strip_sse_data_from_chunk

* _strip_sse_data_from_chunk

* testing

* _strip_sse_data_from_chunk
2025-03-07 21:06:39 -08:00
Krish DholakiaandGitHub 5591354309 Support master key rotations (#9041)
* feat(key_management_endpoints.py): adding support for rotating master key

* feat(key_management_endpoints.py): support decryption-re-encryption of models in db, when master key rotated

* fix(user_api_key_auth.py): raise valid token is None error earlier

enables easier debugging with api key hash in error message

* feat(key_management_endpoints.py): rotate any env vars

* fix(key_management_endpoints.py): uncomment check

* fix: fix linting error
2025-03-06 23:13:30 -08:00
Krrish Dholakia 805679becc feat(handle_jwt.py): support multiple jwt url's 2025-03-06 23:05:54 -08:00
Krish DholakiaandGitHub 274147bc5e fix(team_endpoints.py): ensure 404 raised when team not found (#9038)
* fix(team_endpoints.py): ensure 404 raised when team not found

* fix(key_management_endpoints.py): fix adding tags to key when metadata is empty

* fix(key_management_endpoints.py): refactor set metadata field to use common function across keys + teams

reduces scope for errors + easier testing

* fix: fix linting error
2025-03-06 22:04:36 -08:00
Ishaan JaffandGitHub 04e839d846 (AWS Secret Manager) - Using K/V pairs in 1 AWS Secret (#9039)
* fixes for primary_secret_kv_pairs

* _parse_primary_secret

* Using K/V pairs in 1 AWS Secret

* test_primary_secret_functionality
2025-03-06 19:30:18 -08:00
Ishaan JaffandGitHub b02af305de [Feat] - Display thinking tokens on OpenWebUI (Bedrock, Anthropic, Deepseek) (#9029)
* if merge_reasoning_content_in_choices

* _optional_combine_thinking_block_in_choices

* stash changes

* working merge_reasoning_content_in_choices with bedrock

* fix litellm_params accessor

* fix streaming handler

* merge_reasoning_content_in_choices

* _optional_combine_thinking_block_in_choices

* test_bedrock_stream_thinking_content_openwebui

* merge_reasoning_content_in_choices

* fix for _optional_combine_thinking_block_in_choices

* linting error fix
2025-03-06 18:32:58 -08:00
85d1427710 Fix: Create RedisClusterCache when startup nodes provided in cache args of router (#9010)
Co-authored-by: Ogün Öz <ogun.oz@cobrainer.com>
2025-03-06 17:14:32 -08:00
Ishaan Jaff cca71b41b3 test_e2e_batches_files 2025-03-06 08:42:17 -08:00
Ishaan Jaff 3d87bf9fe6 test fix await_batch_completion 2025-03-06 08:15:45 -08:00
Ishaan Jaff 1d2a9e423c test - remove anthropic_adapter tests. no longer used 2025-03-06 06:47:35 -08:00
Ishaan Jaff 29dc67a2aa test fix anthopic completion 2025-03-06 06:42:26 -08:00
Ishaan JaffandGitHub f47987e673 (Refactor) /v1/messages to follow simpler logic for Anthropic API spec (#9013)
* anthropic_messages_handler v0

* fix /messages

* working messages with router methods

* test_anthropic_messages_handler_litellm_router_non_streaming

* test_anthropic_messages_litellm_router_non_streaming_with_logging

* AnthropicMessagesConfig

* _handle_anthropic_messages_response_logging

* working with /v1/messages endpoint

* working /v1/messages endpoint

* refactor to use router factory function

* use aanthropic_messages

* use BaseConfig for Anthropic /v1/messages

* track api key, team on /v1/messages endpoint

* fix get_logging_payload

* BaseAnthropicMessagesTest

* align test config

* test_anthropic_messages_with_thinking

* test_anthropic_streaming_with_thinking

* fix - display anthropic url for debugging

* test_bad_request_error_handling

* test_anthropic_messages_router_streaming_with_bad_request

* fix ProxyException

* test_bad_request_error_handling_streaming

* use provider_specific_header

* test_anthropic_messages_with_extra_headers

* test_anthropic_messages_to_wildcard_model

* fix gcs pub sub test

* standard_logging_payload

* fix unit testing for anthopic /v1/messages support

* fix pass through anthropic messages api

* delete dead code

* fix anthropic pass through response

* revert change to spend tracking utils

* fix get_litellm_metadata_from_kwargs

* fix spend logs payload json

* proxy_pass_through_endpoint_tests

* TestAnthropicPassthroughBasic

* fix pass through tests

* test_async_vertex_proxy_route_api_key_auth

* _handle_anthropic_messages_response_logging

* vertex_credentials

* test_set_default_vertex_config

* test_anthropic_messages_litellm_router_non_streaming_with_logging

* test_ageneric_api_call_with_fallbacks_basic

* test__aadapter_completion
2025-03-06 00:43:08 -08:00
Krrish Dholakia 320cb1d51a docs: cleanup 'signature_delta' from docs 2025-03-05 23:53:38 -08:00
Krish DholakiaandGitHub 744e10b0f0 Litellm dev 03 05 2025 p3 (#9023)
* fix(invoke_handler.py): fix converse streaming - return signature + ensure consistency with anthropic api response

* build(model_prices_and_context_window.json): fix anthropic api claude-3-7 max output tokens

with beta header this is 128k

Resolves https://github.com/BerriAI/litellm/issues/8964

* feat(handler.py): handle new anthropic 'thinking_delta' block on streaming

Fixes https://github.com/BerriAI/litellm/issues/8825
2025-03-05 22:31:39 -08:00
Krish DholakiaandGitHub f6535ae6ad Support format param for specifying image type (#9019)
* fix(transformation.py): support a 'format' parameter for image's

allow user to specify mime type

* fix: pass mimetype via 'format' param

* feat(gemini/chat/transformation.py): support 'format' param for gemini

* fix(factory.py): support 'format' param on sync bedrock converse calls

* feat(bedrock/converse_transformation.py): support 'format' param for bedrock async calls

* refactor(factory.py): move to supporting 'format' param in base helper

ensures consistency in param support

* feat(gpt_transformation.py): filter out 'format' param

don't send invalid param to openai

* fix(gpt_transformation.py): fix translation

* fix: fix translation error
2025-03-05 19:52:53 -08:00