Commit graph

107 commits

Author SHA1 Message Date
Krrish Dholakia
ea96eebe85 refactor: move all testing to top-level of repo
Closes https://github.com/BerriAI/litellm/issues/486
2024-09-28 21:08:14 -07:00
Krish Dholakia
02565cd58d LiteLLM Minor Fixes & Improvements (09/27/2024) (#5938)
* fix(langfuse.py): prevent double logging requester metadata

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

* build(model_prices_and_context_window.json): add mistral pixtral cost tracking

Closes https://github.com/BerriAI/litellm/issues/5837

* handle streaming for azure ai studio error

* [Perf Proxy] parallel request limiter - use one cache update call (#5932)

* fix parallel request limiter - use one cache update call

* ci/cd run again

* run ci/cd again

* use docker username password

* fix config.yml

* fix config

* fix config

* fix config.yml

* ci/cd run again

* use correct typing for batch set cache

* fix async_set_cache_pipeline

* fix only check user id tpm / rpm limits when limits set

* fix test_openai_azure_embedding_with_oidc_and_cf

* fix(groq/chat/transformation.py): Fixes https://github.com/BerriAI/litellm/issues/5839

* feat(anthropic/chat.py): return 'retry-after' headers from anthropic

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

* feat: raise validation error if message has tool calls without passing `tools` param for anthropic/bedrock

Closes https://github.com/BerriAI/litellm/issues/5747

* [Feature]#5940, add max_workers parameter for the batch_completion (#5947)

* handle streaming for azure ai studio error

* bump: version 1.48.2 → 1.48.3

* docs(data_security.md): add legal/compliance faq's

Make it easier for companies to use litellm

* docs: resolve imports

* [Feature]#5940, add max_workers parameter for the batch_completion method

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>
Co-authored-by: josearangos <josearangos@Joses-MacBook-Pro.local>

* fix(converse_transformation.py): fix default message value

* fix(utils.py): fix get_model_info to handle finetuned models

Fixes issue for standard logging payloads, where model_map_value was null for finetuned openai models

* fix(litellm_pre_call_utils.py): add debug statement for data sent after updating with team/key callbacks

* fix: fix linting errors

* fix(anthropic/chat/handler.py): fix cache creation input tokens

* fix(exception_mapping_utils.py): fix missing imports

* fix(anthropic/chat/handler.py): fix usage block translation

* test: fix test

* test: fix tests

* style(types/utils.py): trigger new build

* test: fix test

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
Co-authored-by: Jose Alberto Arango Sanchez <jose.arangos@udea.edu.co>
Co-authored-by: josearangos <josearangos@Joses-MacBook-Pro.local>
2024-09-27 22:52:57 -07:00
Krish Dholakia
f3fa2160a0 LiteLLM Minor Fixes & Improvements (09/21/2024) (#5819)
* fix(router.py): fix error message

* Litellm disable keys (#5814)

* build(schema.prisma): allow blocking/unblocking keys

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

* fix(key_management_endpoints.py): fix pop

* feat(auth_checks.py): allow admin to enable/disable virtual keys

Closes https://github.com/BerriAI/litellm/issues/5328

* docs(vertex.md): add auth section for vertex ai

Addresses - https://github.com/BerriAI/litellm/issues/5768#issuecomment-2365284223

* build(model_prices_and_context_window.json): show which models support prompt_caching

Closes https://github.com/BerriAI/litellm/issues/5776

* fix(router.py): allow setting default priority for requests

* fix(router.py): add 'retry-after' header for concurrent request limit errors

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

* fix(router.py): correctly raise and use retry-after header from azure+openai

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

* fix(user_api_key_auth.py): fix valid token being none

* fix(auth_checks.py): fix model dump for cache management object

* fix(user_api_key_auth.py): pass prisma_client to obj

* test(test_otel.py): update test for new key check

* test: fix test
2024-09-21 18:51:53 -07:00
Krish Dholakia
1a55827a0a test: replace gpt-3.5-turbo-0613 (deprecated model) (#5794) 2024-09-19 15:39:37 -07:00
Krish Dholakia
a878a61f81 Litellm fix router testing (#5748)
* test: fix testing - azure changed content policy error logic

* test: fix tests to use mock responses

* test(test_image_generation.py): handle api instability

* test(test_image_generation.py): handle azure api instability

* fix(utils.py): fix unbounded variable error

* fix(utils.py): fix unbounded variable error

* test: refactor test to use mock response

* test: mark flaky azure tests
2024-09-17 18:02:23 -07:00
Krish Dholakia
52849e6422 LiteLLM Minor Fixes and Improvements (09/07/2024) (#5580)
* fix(litellm_logging.py): set completion_start_time_float to end_time_float if none

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

* feat(_init_.py): add new 'openai_text_completion_compatible_providers' list

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

Handles correctly routing fireworks ai calls when done via text completions

* fix: fix linting errors

* fix: fix linting errors

* fix(openai.py): fix exception raised

* fix(openai.py): fix error handling

* fix(_redis.py): allow all supported arguments for redis cluster (#5554)

* Revert "fix(_redis.py): allow all supported arguments for redis cluster (#5554)" (#5583)

This reverts commit f2191ef4cb.

* fix(router.py): return model alias w/ underlying deployment on router.get_model_list()

Fixes https://github.com/BerriAI/litellm/issues/5524#issuecomment-2336410666

* test: handle flaky tests

---------

Co-authored-by: Jonas Dittrich <58814480+Kakadus@users.noreply.github.com>
2024-09-09 18:54:17 -07:00
Krrish Dholakia
0b898b9bd3 test: fix test 2024-08-27 19:33:14 -07:00
Krrish Dholakia
061bd2b4bd test(test_exceptions.py): loosen test 2024-08-27 17:39:53 -07:00
Krrish Dholakia
b1289b0d19 fix: fix linting errors 2024-08-27 12:14:23 -07:00
Krrish Dholakia
757172e31a fix(azure.py): add response header coverage for azure models 2024-08-24 15:12:51 -07:00
Krrish Dholakia
79bfdb83cc fix(main.py): cover openai /v1/completions endpoint 2024-08-24 13:25:17 -07:00
Krrish Dholakia
a6c38e8bff fix(openai.py): coverage for correctly re-raising exception headers on openai chat completion + embedding endpoints 2024-08-24 12:55:15 -07:00
Krrish Dholakia
2874b94fb1 refactor: replace .error() with .exception() logging for better debugging on sentry 2024-08-16 09:22:47 -07:00
Krrish Dholakia
089539e21e fix(utils.py): add exception mapping for databricks errors 2024-07-27 13:13:31 -07:00
Ishaan Jaff
de9aa8a31f test - openai content policy errors 2024-07-22 16:24:03 -07:00
Krrish Dholakia
492b406741 test: skip duplicate test 2024-07-19 18:51:50 -07:00
Ishaan Jaff
1c848b68d7 test - raise correct Auth exception for anthropic API 2024-07-16 20:44:40 -07:00
Ishaan Jaff
31c61951f2 test - test_completion_bedrock_invalid_role_exception 2024-07-13 09:54:32 -07:00
Ishaan Jaff
7f1e7929f2 test - test_azure_embedding_exceptions 2024-07-01 21:19:47 -07:00
Krrish Dholakia
03c7692c81 fix(utils.py): Fix anthropic tool calling exception mapping
Fixes https://github.com/BerriAI/litellm/issues/4348
2024-06-21 21:20:49 -07:00
Krrish Dholakia
40c9ecd470 fix(utils.py): improve coverage for anthropic exception mapping 2024-06-21 21:15:10 -07:00
Krrish Dholakia
71e882f4a2 fix(vertex_httpx.py): re-raise vertex content policy violation error
Fixes https://github.com/BerriAI/litellm/issues/4270
2024-06-18 19:00:35 -07:00
Ishaan Jaff
baafe32ba7 fix - show model group in exceptions 2024-06-10 20:30:31 -07:00
Krrish Dholakia
39ee6be477 fix(utils.py): improved predibase exception mapping
adds unit testing + better coverage for predibase errors
2024-06-08 14:32:43 -07:00
Ishaan Jaff
a12c1fddd9 test - exceptions predibase 2024-05-15 16:53:41 -07:00
Ishaan Jaff
db3092f46b fix - vertex exception test 2024-05-15 15:37:59 -07:00
Ishaan Jaff
0bf5d87f8e (ci/cd) fix test_content_policy_exception_azure 2024-05-15 14:47:39 -07:00
Ishaan Jaff
5f62f5da1f fix - vertex ai exceptions 2024-05-04 21:32:10 -07:00
Ishaan Jaff
8f238d957d fix - test exceptions vertex ai 2024-05-04 16:09:20 -07:00
Ishaan Jaff
2df9bafcb7 test azure exceptions are more decriptive 2024-05-04 13:02:29 -07:00
Ishaan Jaff
3c769d08e8 test - mapping content policy violation errors 2024-05-04 11:15:34 -07:00
Ishaan Jaff
50770ef3b0 test vertex ai exception mapping 2024-04-16 20:00:32 -07:00
Krrish Dholakia
e2f4d07a8d test(test_exceptions.py): handle api instability 2024-03-26 18:06:49 -07:00
ishaan-jaff
dd8e3351ad (test) test_exceptions.py 2024-03-04 09:06:42 -08:00
Krrish Dholakia
129e84f0c5 test: removing aws tests - account suspended - pending their approval 2024-02-28 13:46:20 -08:00
Krrish Dholakia
7a0bf3e25a test(test_exceptions.py): fix test to handle service unavailable error 2024-02-15 18:19:52 -08:00
ishaan-jaff
fddf9725fd (test) improve exceptions for pplx AI 2024-02-02 12:37:21 -08:00
ishaan-jaff
c1725bc175 (fix) test exception mapping 2024-02-02 12:32:10 -08:00
ishaan-jaff
38516c104c (test) exceptions 2024-02-02 10:38:28 -08:00
ishaan-jaff
6166566054 (test) perplexity exception raising 2024-02-02 08:46:42 -08:00
Krrish Dholakia
c6393a546e test(test_exceptions.py): fix test name 2024-01-23 06:57:18 -08:00
Krrish Dholakia
e04a4a7439 fix(utils.py): fix content policy violation check for streaming 2024-01-23 06:55:04 -08:00
ishaan-jaff
3297b8ac0c (test) test exceptions 2024-01-15 22:01:33 -08:00
ishaan-jaff
83861730b5 (feat) improve bedrock, sagemaker exception mapping 2024-01-15 21:22:22 -08:00
ishaan-jaff
5ebcc6386c (test) ContentPolicyViolationError 2024-01-09 16:53:57 +05:30
ishaan-jaff
1a65705596 (test) content policy violation error 2024-01-09 16:34:20 +05:30
Krrish Dholakia
79978c44ba refactor: add black formatting 2023-12-25 14:11:20 +05:30
ishaan-jaff
1af258ac2f (test) raise NotFoundError 2023-12-15 10:18:53 +05:30
ishaan-jaff
e6a6b070a1 (feat) add BadRequestError for Azure 2023-12-15 09:53:38 +05:30
ishaan-jaff
95454e5176 (feat) mistral - add exception mapping 2023-12-14 18:57:39 +05:30