Commit graph

2623 commits

Author SHA1 Message Date
Ishaan Jaff
df8e33739d
Revert "Add return_exceptions to litellm.batch_completion" 2024-05-04 13:01:17 -07:00
Krrish Dholakia
09d7121af2 fix(bedrock.py): map finish reason for bedrock 2024-05-04 12:45:40 -07:00
Ishaan Jaff
7094ac9557
Merge pull request #3397 from ffreemt/main
Add return_exceptions to litellm.batch_completion
2024-05-04 12:41:21 -07:00
Krrish Dholakia
8d49b3a84c fix(factory.py): support openai 'functions' messages 2024-05-04 12:33:39 -07:00
Ishaan Jaff
76825e1d2c test - mapping content policy violation errors 2024-05-04 11:15:34 -07:00
Krrish Dholakia
d9d5149aa1 fix(factory.py): support mapping openai 'tool' message to anthropic format 2024-05-04 10:14:52 -07:00
Krrish Dholakia
33472bfd2b fix(factory.py): support 'function' openai message role for anthropic
Fixes https://github.com/BerriAI/litellm/issues/3446
2024-05-04 10:03:30 -07:00
Ishaan Jaff
0bc6969e4d
Merge pull request #3408 from msabramo/test_proxy_exception_mapping_mock_improvements
Improve mocking in `test_proxy_exception_mapping.py`
2024-05-04 09:29:41 -07:00
Krrish Dholakia
8249c986bf fix(main.py): support new 'supports_system_message=False' param
Fixes https://github.com/BerriAI/litellm/issues/3325
2024-05-03 21:31:45 -07:00
Krrish Dholakia
a35ac050d2 test(test_router_fallbacks.py): bump test limits 2024-05-03 20:42:29 -07:00
Krish Dholakia
7d2aa2f645
Merge pull request #3433 from BerriAI/litellm_timeout_fix
fix(bedrock.py): convert httpx.timeout to boto3 valid timeout
2024-05-03 18:53:59 -07:00
Marc Abramowitz
4ce4927c0c Add test_engines_model_chat_completions 2024-05-03 17:56:39 -07:00
Krrish Dholakia
097714e02f fix(anthropic.py): handle whitespace characters for anthropic calls 2024-05-03 17:31:34 -07:00
Krrish Dholakia
0450abfdc1 fix(bedrock.py): fix boto3 config init 2024-05-03 17:22:06 -07:00
Ishaan Jaff
5e6b6c41c4
Merge pull request #3432 from BerriAI/litellm_add_bedrock_titan_embed
Feat - add bedrock titan embed-v2
2024-05-03 16:28:12 -07:00
Ishaan Jaff
926670bfb7
Merge pull request #3429 from BerriAI/litellm_add_unit_tests_slack_alerts
[Test] Add Slack Alerting unit tests
2024-05-03 16:27:40 -07:00
Krrish Dholakia
a732d8772a fix(bedrock.py): convert httpx.timeout to boto3 valid timeout
Closes https://github.com/BerriAI/litellm/issues/3398
2024-05-03 16:24:21 -07:00
Ishaan Jaff
401bf8d67e test - bedrock v2 supports dimension 2024-05-03 16:23:37 -07:00
Krrish Dholakia
5b39f8e282 feat(proxy_server.py): return api base in response headers
Closes https://github.com/BerriAI/litellm/issues/2631
2024-05-03 15:27:32 -07:00
Ishaan Jaff
bae5d3601d feat - add unit tests for slack alerting 2024-05-03 15:08:55 -07:00
Krrish Dholakia
defc205348 test(test_alangfuse.py): fix test 2024-05-03 12:39:38 -07:00
Krrish Dholakia
2dd9d2f704 test(test_amazing_vertex_completion.py): try-except api errors 2024-05-03 10:09:57 -07:00
Krrish Dholakia
0b72904608 fix(lowest_latency.py): fix the size of the latency list to 10 by default (can be modified) 2024-05-03 09:00:32 -07:00
mikey
de7fe98556
Merge branch 'BerriAI:main' into main 2024-05-03 11:30:03 +08:00
ffreemt
a7ec1772b1 Add litellm\tests\test_batch_completion_return_exceptions.py 2024-05-03 11:28:38 +08:00
Krrish Dholakia
fdc4fdb91a fix(proxy/utils.py): fix slack alerting to only raise alerts for llm api exceptions
don't spam for bad user requests. Closes https://github.com/BerriAI/litellm/issues/3395
2024-05-02 17:18:21 -07:00
Krish Dholakia
2200900ca2
Merge pull request #3393 from Priva28/main
Add Llama3 tokenizer and allow custom tokenizers.
2024-05-02 16:32:41 -07:00
Marc Abramowitz
cdb39e90ce Improve mocking in test_proxy_exception_mapping
Mock the calls to the backend and assert that the correct parameters are passed
to the backend.
2024-05-02 15:16:20 -07:00
Ishaan Jaff
f893f8bc55
Merge pull request #3403 from msabramo/disambiguate-invalid-model-name-errors
Disambiguate invalid model name errors
2024-05-02 15:09:59 -07:00
Marc Abramowitz
6d154e2317 Update tests to reflect new error messages 2024-05-02 15:02:58 -07:00
Marc Abramowitz
14e7c9b01c Improve mocking in test_proxy_server
Mock the calls to the backend and assert that the correct parameters are passed
to the backend.
2024-05-02 13:36:23 -07:00
Krish Dholakia
762a1fbd50
Merge pull request #3375 from msabramo/GH-3372
Fix route `/openai/deployments/{model}/chat/completions` not working properly
2024-05-02 13:00:25 -07:00
Marc Abramowitz
a79fd772f4 Simplify mock_patch_acompletion 2024-05-02 12:47:27 -07:00
Marc Abramowitz
6ec058711a Make unnecessary to pass extra arg for mock object
Modify `mock_patch_acompletion` to be a context manager instead of a
function that returns a mock object. This way, the mock object is
created and yielded by the context manager, and the test function
doesn't need to pass the mock object as an argument.
2024-05-02 12:41:30 -07:00
Marc Abramowitz
4dfadb0cf4 mock_patch_acompletion in test_proxy_server.py 2024-05-02 12:24:49 -07:00
Marc Abramowitz
152b5c8ceb Add test_openai_deployments_model_chat_completions_azure 2024-05-02 10:27:32 -07:00
Krrish Dholakia
18cb0bc530 fix(utils.py): revert pydantic object changes 2024-05-02 08:14:45 -07:00
Lucca Zenóbio
78303b79ee
Merge branch 'main' into main 2024-05-02 09:46:34 -03:00
Krrish Dholakia
caf19478af fix(utils.py): fix pydantic object default values 2024-05-01 22:51:46 -07:00
Christian Privitelli
2d43153efa include methods in init import, add test, fix encode/decode param ordering 2024-05-02 15:49:22 +10:00
Krrish Dholakia
29aefaa7d7 fix(utils.py): fix default values 2024-05-01 22:24:37 -07:00
Ishaan Jaff
3d9287602e ci/cd run again 2024-05-01 21:13:14 -07:00
Krrish Dholakia
0ab6b4bb22 fix(langfuse.py): fix trace param overwriting when existing trace id is given 2024-05-01 08:44:46 -07:00
Krrish Dholakia
abdae87ba2 fix(langfuse.py): don't overwrite trace details if existing trace id passed in 2024-05-01 08:15:17 -07:00
Krrish Dholakia
cfc1eeb3c3 test(test_router_fallbacks.py): rename test to run earlier 2024-04-30 22:04:20 -07:00
Krrish Dholakia
e506e71cb9 fix(test_router_fallbacks.py): reduce test rpm 2024-04-30 22:00:48 -07:00
Krish Dholakia
9f55a99e98
Merge pull request #3376 from BerriAI/litellm_routing_logic
fix(router.py): unify retry timeout logic across sync + async function_with_retries
2024-04-30 19:58:45 -07:00
Krrish Dholakia
bc5c9d7da9 fix(test_router_fallbacks.py): fix tests 2024-04-30 18:48:39 -07:00
Krrish Dholakia
1baad80c7d fix(router.py): cooldown deployments, for 401 errors 2024-04-30 17:54:00 -07:00
Krrish Dholakia
8ee51a96f4 test(test_router_debug_logs.py): fix retry logic 2024-04-30 16:42:10 -07:00