Commit graph

1539 commits

Author SHA1 Message Date
Krrish Dholakia
4f91205530 refactor(utils.py): refactor Logging to it's own class. Cut down utils.py to <10k lines.
Easier debugging

 Reference: https://github.com/BerriAI/litellm/issues/4206
2024-06-15 10:57:20 -07:00
Krrish Dholakia
6f715b4782 feat(router.py): support content policy fallbacks
Closes https://github.com/BerriAI/litellm/issues/2632
2024-06-14 17:15:44 -07:00
Krrish Dholakia
2732ff5d56 fix(utils.py): return traceback on unmapped exception error
Fixes https://github.com/BerriAI/litellm/issues/4201
2024-06-14 15:08:01 -07:00
Krrish Dholakia
345094a49d fix(utils.py): check if model info is for model with correct provider
Fixes issue where incorrect pricing was used for custom llm provider
2024-06-13 15:54:24 -07:00
Ishaan Jaff
944d95d636
Merge pull request #4176 from BerriAI/litellm_fix_redacting_msgs
[Fix] Redacting messages from OTEL + Refactor `utils.py` to use `litellm_core_utils`
2024-06-13 13:50:13 -07:00
Ishaan Jaff
9cb582307a fix - fix redacting messages litellm 2024-06-13 11:52:20 -07:00
Krrish Dholakia
6ba7a0a909 refactor(utils.py): add more clear error logging 2024-06-13 11:49:42 -07:00
Krrish Dholakia
246491e663 fix(utils.py): log cache hit as INFO message 2024-06-13 11:42:16 -07:00
Krish Dholakia
05e21441a6
Merge branch 'main' into litellm_vertex_completion_httpx 2024-06-12 21:19:22 -07:00
Krrish Dholakia
c426d75e91 fix(vertex_httpx.py): add function calling support to httpx route 2024-06-12 21:11:00 -07:00
Ishaan Jaff
e128dc4e1f feat - add azure ai studio models on litellm ui 2024-06-12 20:28:16 -07:00
Krrish Dholakia
3955b058ed fix(vertex_httpx.py): support streaming via httpx client 2024-06-12 19:55:14 -07:00
Krrish Dholakia
3b913443fe feat(vertex_httpx.py): Moving to call vertex ai via httpx (instead of their sdk). Allows us to support all their api updates. 2024-06-12 16:47:00 -07:00
Ishaan Jaff
7eeef7ec1f feat - add mistral embedding config 2024-06-12 15:00:00 -07:00
Ishaan Jaff
3254cf50b7
Merge pull request #4152 from BerriAI/litellm_support_vertex_text_input
[Feat] Support `task_type`, `auto_truncate` params
2024-06-12 13:25:45 -07:00
Krish Dholakia
821d32fe17
Merge pull request #3861 from Manouchehri/aks-oidc-1852
feat(util.py/azure.py): Add OIDC support when running LiteLLM on Azure + Azure Upstream caching
2024-06-12 12:47:08 -07:00
Ishaan Jaff
f09158504b feat - support vertex ai dimensions 2024-06-12 09:29:51 -07:00
Ishaan Jaff
5ebeb4d067 ci/cd fix predibase 500 errors 2024-06-11 23:15:48 -07:00
Krish Dholakia
029d32344f
Merge pull request #4137 from jamesbraza/custom-llm-provider
Allowing inference of LLM provider in `get_supported_openai_params`
2024-06-11 18:38:42 -07:00
James Braza
ef6e920161 Added handling of unmapped provider, with test 2024-06-11 18:34:10 -07:00
Krish Dholakia
7c23077a71
Merge pull request #4119 from BerriAI/litellm_tiktoken_bump
feat(utils.py): bump tiktoken dependency to 0.7.0 (gpt-4o token counting support)
2024-06-11 18:24:58 -07:00
James Braza
cb5456c9f5 Allowing inferring custom LLM provider from model inside get_supported_openai_params 2024-06-11 18:16:19 -07:00
Krrish Dholakia
a9cbf2209c fix(utils.py): support dynamic api key for azure_ai route 2024-06-11 17:51:29 -07:00
Krrish Dholakia
9c7788ae48 fix(utils.py): fix formatting 2024-06-11 15:49:20 -07:00
Krrish Dholakia
88e567af2c fix(utils.py): add new 'azure_ai/' route
supports azure's openai compatible api endpoint
2024-06-11 14:06:56 -07:00
Krrish Dholakia
7eae0ff7e3 fix(utils.py): allow user to opt in to raw request logging to langfuse 2024-06-11 13:35:22 -07:00
David Manouchehri
a31fa5fbc8
feat(util.py/azure.py): Add OIDC support when running in Azure Kubernetes Service (AKS). 2024-06-11 15:54:34 +00:00
Krrish Dholakia
2e49614230 fix(utils.py): exception map vertex ai 500 internal server errors 2024-06-10 21:37:54 -07:00
Krrish Dholakia
b756374a4f feat(utils.py): bump tiktoken dependency to 0.7.0
adds support for gpt-4o token counting
2024-06-10 21:21:23 -07:00
Krish Dholakia
8379d58318
Merge pull request #4106 from BerriAI/litellm_anthropic_bedrock_tool_calling_fix
fix(bedrock_httpx.py): fix tool calling for anthropic bedrock calls w/ streaming
2024-06-10 20:21:16 -07:00
Krrish Dholakia
65baa83928 fix(bedrock_httpx.py): returning correct finish reason on streaming completion 2024-06-10 14:47:49 -07:00
Krrish Dholakia
84652dd946 fix(bedrock_httpx.py): fix tool calling for anthropic bedrock calls w/ streaming
Fixes https://github.com/BerriAI/litellm/issues/4091
2024-06-10 14:20:25 -07:00
Ishaan Jaff
39bbc5d8ac
Merge pull request #4086 from BerriAI/litellm_sdk_tool_calling_fic
[Fix] Litellm sdk - allow ChatCompletionMessageToolCall, and Function to be used as dict
2024-06-08 20:48:54 -07:00
Krish Dholakia
b4fc4abb76
Merge pull request #4080 from BerriAI/litellm_predibase_exception_mapping
fix(utils.py): improved predibase exception mapping
2024-06-08 20:27:44 -07:00
Ishaan Jaff
0253c2b213 feat - allow ChatCompletionMessageToolCall, and Function to be used as dict 2024-06-08 19:47:31 -07:00
Krrish Dholakia
b26c3c7d22 fix(cost_calculator.py): fixes tgai unmapped model pricing
Fixes error where tgai helper function returned None. Enforces stronger type hints, refactors code, adds more unit testing.
2024-06-08 19:43:57 -07:00
Krrish Dholakia
1dafb1b3b7 fix(utils.py): improved predibase exception mapping
adds unit testing + better coverage for predibase errors
2024-06-08 14:32:43 -07:00
Krrish Dholakia
93a3a0cc1e fix(utils.py): fix helicone success logging integration
Fixes https://github.com/BerriAI/litellm/issues/4062
2024-06-08 08:59:56 -07:00
Ishaan Jaff
366fc5e40b fix - vertex ai exception mapping 2024-06-07 18:16:26 -07:00
Ishaan Jaff
d5e97861ee fix vertex ai exceptions 2024-06-07 17:13:32 -07:00
Ishaan Jaff
718b547646
Merge branch 'main' into litellm_security_fix 2024-06-07 16:52:25 -07:00
Krrish Dholakia
5c46b386d0 fix(utils.py): fix vertex ai exception mapping 2024-06-07 16:06:31 -07:00
Krrish Dholakia
f73b6033fd fix(test_custom_callbacks_input.py): unit tests for 'turn_off_message_logging'
ensure no raw request is logged either
2024-06-07 15:39:15 -07:00
Ishaan Jaff
d9dacc1f43
Merge pull request #4065 from BerriAI/litellm_use_common_func
[Refactor] - Refactor proxy_server.py to use common function for `add_litellm_data_to_request`
2024-06-07 14:02:17 -07:00
Ishaan Jaff
2cf3133669
Merge branch 'main' into litellm_svc_logger 2024-06-07 14:01:54 -07:00
Ishaan Jaff
7ef7bc8a9a fix simplify - pass litellm_parent_otel_span 2024-06-07 13:48:21 -07:00
Ishaan Jaff
d2857fc24c
Merge branch 'main' into litellm_redact_messages_slack_alerting 2024-06-07 12:43:53 -07:00
Krrish Dholakia
e66b3d264f fix(factory.py): handle bedrock claude image url's 2024-06-07 10:04:03 -07:00
Ishaan Jaff
54ac848bfb use litellm_parent_otel_span as litellm_param 2024-06-07 08:54:28 -07:00
Krish Dholakia
26993c067e
Merge branch 'main' into litellm_bedrock_converse_api 2024-06-07 08:49:52 -07:00