Commit graph

1858 commits

Author SHA1 Message Date
Ishaan Jaff
b0178a85cf refactor get_secret 2024-09-03 10:42:12 -07:00
Krish Dholakia
9f3fa29624
feat(router.py): Support Loadbalancing batch azure api endpoints (#5469)
* feat(router.py): initial commit for loadbalancing azure batch api endpoints

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

* fix(router.py): working `router.acreate_file()`

* feat(router.py): working router.acreate_batch endpoint

* feat(router.py): expose router.aretrieve_batch function

Make it easy for user to retrieve the batch information

* feat(router.py): support 'router.alist_batches' endpoint

Adds support for getting all batches across all endpoints

* feat(router.py): working loadbalancing on `/v1/files`

* feat(proxy_server.py): working loadbalancing on `/v1/batches`

* feat(proxy_server.py): working loadbalancing on Retrieve + List batch
2024-09-02 21:32:55 -07:00
Ishaan Jaff
c1adb0b7f2
Merge branch 'main' into litellm_track_imagen_spend_logs 2024-09-02 21:21:15 -07:00
Ishaan Jaff
9fcab392a4 fix get llm provider for imagen 2024-09-02 17:49:36 -07:00
Ishaan Jaff
666dd6aca2
Merge pull request #5478 from BerriAI/litellm_Add_ai21
[Feat] Add AI21 /chat API
2024-09-02 16:20:37 -07:00
Krish Dholakia
f9e6507cd1
LiteLLM Minor Fixes + Improvements (#5474)
* feat(proxy/_types.py): add lago billing to callbacks ui

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

* fix(anthropic.py): return anthropic prompt caching information

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

* feat(bedrock/chat.py): support 'json_schema' for bedrock models

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

* fix(bedrock/embed/embeddings.py): support async embeddings for amazon titan models

* fix: linting fixes

* fix: handle key errors

* fix(bedrock/chat.py): fix bedrock ai21 streaming object

* feat(bedrock/embed): support bedrock embedding optional params

* fix(databricks.py): fix usage chunk

* fix(internal_user_endpoints.py): apply internal user defaults, if user role updated

Fixes issue where user update wouldn't apply defaults

* feat(slack_alerting.py): provide multiple slack channels for a given alert type

multiple channels might be interested in receiving an alert for a given type

* docs(alerting.md): add multiple channel alerting to docs
2024-09-02 14:29:57 -07:00
Ishaan Jaff
f28e94827c docs update ai21 doc 2024-09-02 12:26:53 -07:00
Ishaan Jaff
263e283126 add ai21 model test 2024-09-02 12:14:13 -07:00
Ishaan Jaff
05d92e34a3 add ai21 provider 2024-09-02 11:45:27 -07:00
Krish Dholakia
e0d81434ed
LiteLLM minor fixes + improvements (31/08/2024) (#5464)
* fix(vertex_endpoints.py): fix vertex ai pass through endpoints

* test(test_streaming.py): skip model due to end of life

* feat(custom_logger.py): add special callback for model hitting tpm/rpm limits

Closes https://github.com/BerriAI/litellm/issues/4096
2024-09-01 13:31:42 -07:00
Krish Dholakia
37f9705d6e
Bedrock Embeddings refactor + model support (#5462)
* refactor(bedrock): initial commit to refactor bedrock to a folder

Improve code readability + maintainability

* refactor: more refactor work

* fix: fix imports

* feat(bedrock/embeddings.py): support translating embedding into amazon embedding formats

* fix: fix linting errors

* test: skip test on end of life model

* fix(cohere/embed.py): fix linting error

* fix(cohere/embed.py): fix typing

* fix(cohere/embed.py): fix post-call logging for cohere embedding call

* test(test_embeddings.py): fix error message assertion in test
2024-09-01 13:29:58 -07:00
Krish Dholakia
47ef1f9191 anthropic prompt caching cost tracking (#5453)
* fix(utils.py): support 'drop_params' for embedding requests

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

* feat(anthropic/cost_calculation.py): Support calculating cost for prompt caching on anthropic

* feat(types/utils.py): allows us to migrate to openai's equivalent, once that comes out

* fix: fix linting errors

* test: mark flaky test
2024-08-31 14:50:12 -07:00
Ishaan Jaff
de9efe76ca add cerebras api 2024-08-31 08:35:23 -07:00
Ishaan Jaff
541033ec7e add VertexAITextEmbeddingConfig 2024-08-30 12:53:43 -07:00
Ishaan Jaff
a842723bb0
Merge pull request #5439 from BerriAI/litellm_use_correct_ai21_pricing
[Fix] Use correct Vertex AI AI21 Cost tracking
2024-08-30 10:49:42 -07:00
JooHo Kim
5b1d9712c5
chore: Clarify support-related Exceptions in utils.py (#5447)
Improved the clarity of Exceptions in supports_system_messages, supports_response_schema, supports_function_calling, and supports_parallel_function_calling. Previously, it was difficult to determine the cause of Exception logs due to vague messaging. Each case now includes a more specific and appropriate Exception message.
2024-08-30 08:29:05 -07:00
Krish Dholakia
dd7b008161
fix: Minor LiteLLM Fixes + Improvements (29/08/2024) (#5436)
* fix(model_checks.py): support returning wildcard models on `/v1/models`

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

* fix(bedrock_httpx.py): support calling bedrock via api_base

Closes https://github.com/BerriAI/litellm/pull/4587

* fix(litellm_logging.py): only leave last 4 char of gemini key unmasked

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

* feat(router.py): support setting 'weight' param for models on router

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

* test(test_bedrock_completion.py): add unit test for custom api base

* fix(model_checks.py): handle no "/" in model
2024-08-29 22:40:25 -07:00
Ishaan Jaff
6bd6c956a5 use correct vtx ai21 pricing 2024-08-29 19:04:05 -07:00
Krish Dholakia
8ce1e49fbe
fix(utils.py): correctly log streaming cache hits (#5417) (#5426)
Fixes https://github.com/BerriAI/litellm/issues/5401
2024-08-28 22:50:33 -07:00
Ishaan Jaff
11c175a215 refactor partner models to include ai21 2024-08-27 13:35:22 -07:00
Krish Dholakia
415abc86c6
Merge pull request #5358 from BerriAI/litellm_fix_retry_after
fix retry after - cooldown individual models based on their specific 'retry-after' header
2024-08-27 11:50:14 -07:00
Krrish Dholakia
18b67a455e test: fix test 2024-08-27 10:46:57 -07:00
Krrish Dholakia
5aad9d2db7 fix: fix imports 2024-08-26 22:19:01 -07:00
Krrish Dholakia
0eea01dae9 feat(vertex_ai_context_caching.py): check gemini cache, if key already exists 2024-08-26 22:19:01 -07:00
Krrish Dholakia
b0cc1df2d6 feat(vertex_ai_context_caching.py): support making context caching calls to vertex ai in a normal chat completion call (anthropic caching format)
Closes https://github.com/BerriAI/litellm/issues/5213
2024-08-26 22:19:01 -07:00
Krish Dholakia
c503ff435e
Merge pull request #5368 from BerriAI/litellm_vertex_function_support
feat(vertex_httpx.py): support 'functions' param for gemini google ai studio + vertex ai
2024-08-26 22:11:42 -07:00
Krrish Dholakia
0a15d3b3c3 fix(utils.py): fix message replace 2024-08-26 15:43:30 -07:00
Krrish Dholakia
174b1c43e3 fix(utils.py): support 'PERPLEXITY_API_KEY' in env 2024-08-26 13:59:57 -07:00
Krrish Dholakia
1cbf851ac2 fix(utils.py): fix value check 2024-08-26 12:04:56 -07:00
Krrish Dholakia
b9d1296319 feat(utils.py): support gemini/vertex ai streaming function param usage 2024-08-26 11:23:45 -07:00
Krish Dholakia
f27abe0462
Merge branch 'main' into litellm_vertex_migration 2024-08-24 18:24:19 -07:00
Krrish Dholakia
756a828c15 fix(azure.py): add response header coverage for azure models 2024-08-24 15:12:51 -07:00
Krrish Dholakia
87549a2391 fix(main.py): cover openai /v1/completions endpoint 2024-08-24 13:25:17 -07:00
Krrish Dholakia
068aafdff9 fix(utils.py): correctly re-raise the headers from an exception, if present
Fixes issue where retry after on router was not using azure / openai numbers
2024-08-24 12:30:30 -07:00
Krrish Dholakia
6d2ae5a0d8 fix(utils.py): support passing response_format for together ai calls 2024-08-23 21:31:59 -07:00
Krish Dholakia
cd61ddc610
Merge pull request #5343 from BerriAI/litellm_sagemaker_chat
feat(sagemaker.py): add sagemaker messages api support
2024-08-23 21:00:00 -07:00
Krrish Dholakia
3007f0344d fix(utils.py): only filter additional properties if gemini/vertex ai 2024-08-23 14:22:59 -07:00
Krrish Dholakia
3f116b25a9 feat(sagemaker.py): add sagemaker messages api support
Closes https://github.com/BerriAI/litellm/issues/2641

 Closes https://github.com/BerriAI/litellm/pull/5178
2024-08-23 10:31:35 -07:00
Krrish Dholakia
93ed8c7216 fix(utils.py): handle additionalProperties is False for vertex ai / gemini calls
Fixes https://github.com/BerriAI/litellm/issues/5338

Also adds together ai json mode support
2024-08-23 09:21:32 -07:00
Ishaan Jaff
228252b92d
Merge branch 'main' into litellm_allow_using_azure_ad_token_auth 2024-08-22 18:21:24 -07:00
Krrish Dholakia
98f73b35ba docs(utils.py): cleanup docstring 2024-08-22 11:05:25 -07:00
Krrish Dholakia
70bf8bd4f4 feat(factory.py): enable 'user_continue_message' for interweaving user/assistant messages when provider requires it
allows bedrock to be used with autogen
2024-08-22 11:03:33 -07:00
Ishaan Jaff
2a3bc8c190 add azure_ad_token_provider as all litellm params 2024-08-22 10:59:18 -07:00
Krrish Dholakia
11bfc1dca7 fix(cohere_chat.py): support passing 'extra_headers'
Fixes https://github.com/BerriAI/litellm/issues/4709
2024-08-22 10:17:36 -07:00
Krrish Dholakia
3c99ad19fa feat(utils.py): support global vertex ai safety settings param 2024-08-21 17:37:50 -07:00
Ishaan Jaff
dd524a4f50
Merge pull request #5326 from BerriAI/litellm_Add_vertex_multimodal_embedding
[Feat] add vertex multimodal embedding support
2024-08-21 17:06:43 -07:00
Ishaan Jaff
35781ab8d5 add multi modal vtx embedding 2024-08-21 15:05:59 -07:00
Krrish Dholakia
7aec6f0f2a fix(litellm_pre_call_utils.py): handle dynamic keys via api correctly 2024-08-21 13:37:21 -07:00
Ishaan Jaff
7d0196191f
Merge pull request #5018 from haadirakhangi/main
Qdrant Semantic Caching
2024-08-21 08:50:43 -07:00
Krrish Dholakia
1b6db8359a fix(utils.py): support openrouter streaming
Fixes https://github.com/BerriAI/litellm/issues/5080
2024-08-21 08:48:58 -07:00