Commit graph

587 commits

Author SHA1 Message Date
Krish Dholakia
02f288a8a3
Azure Service Principal with Secret authentication workflow. (#5131) (#5437)
* Azure Service Principal with Secret authentication workflow. (#5131)

* Implement Azure Service Principal with Secret authentication workflow.

* Use `ClientSecretCredential` instead of `DefaultAzureCredential`.

* Move imports into the function.

* Add type hint for `azure_ad_token_provider`.

* Add unit test for router initialization and sample completion using Azure Service Principal with Secret authentication workflow.

* Add unit test for router initialization with neither API key nor using Azure Service Principal with Secret authentication workflow.

* fix(client_initializtion_utils.py): fix typing + overrides

* test: fix linting errors

* fix(client_initialization_utils.py): fix client init azure ad token logic

* fix(router_client_initialization.py): add flag check for reading azure ad token from environment

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

* test(test_router_client_init.py): add correct flag to test

---------

Co-authored-by: kzych-inpost <142029278+kzych-inpost@users.noreply.github.com>
2024-09-02 14:29:00 -07:00
Ishaan Jaff
263e283126 add ai21 model test 2024-09-02 12:14:13 -07:00
Ishaan Jaff
82eacf2106 add ai21_chat as new provider 2024-09-02 11:44:06 -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
518aa639fa fix map input_type to task_type for vertex ai 2024-08-30 12:09:07 -07:00
Ishaan Jaff
6bd6c956a5 use correct vtx ai21 pricing 2024-08-29 19:04:05 -07:00
Ishaan Jaff
5851a8f901
Merge pull request #5431 from BerriAI/litellm_Add_fireworks_ai_health_check
[Fix-Proxy] /health check for provider wildcard models (fireworks/*)
2024-08-29 14:25:05 -07:00
Ishaan Jaff
4b6a2fa4f3 add fireworks_ai_models 2024-08-29 09:23:11 -07:00
Krish Dholakia
d928220ed2
Merge pull request #5393 from BerriAI/litellm_gemini_embedding_support
feat(vertex_ai_and_google_ai_studio): Support Google AI Studio Embedding Endpoint
2024-08-28 13:46:28 -07:00
Krrish Dholakia
bd4f63eebf fix(__init__.py): fix import 2024-08-27 19:35:03 -07:00
Krrish Dholakia
77e6da78a1 fix: initial commit 2024-08-27 17:35:56 -07:00
Ishaan Jaff
3a82334762 add basic cohere rerank 2024-08-27 15:55:43 -07:00
Ishaan Jaff
11c175a215 refactor partner models to include ai21 2024-08-27 13:35:22 -07:00
Krrish Dholakia
3ec8a0d25d fix: fix imports 2024-08-26 22:24:30 -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
3a6412c9c3
Merge pull request #5376 from BerriAI/litellm_sagemaker_streaming_fix
fix(sagemaker.py): support streaming for messages api
2024-08-26 21:36:10 -07:00
Krrish Dholakia
8e9acd117b fix(sagemaker.py): support streaming for messages api
Fixes https://github.com/BerriAI/litellm/issues/5372
2024-08-26 15:08:08 -07:00
Ishaan Jaff
da63775371 use common folder for cohere 2024-08-26 14:28:50 -07:00
Krish Dholakia
f27abe0462
Merge branch 'main' into litellm_vertex_migration 2024-08-24 18:24:19 -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
Krish Dholakia
f458f565af
Merge pull request #5292 from OgnjenFrancuski/main
Update SSL verification
2024-08-23 20:42:35 -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
80675b22bd feat(batches): add azure openai batches endpoint support
Closes https://github.com/BerriAI/litellm/issues/5073
2024-08-22 14:46:51 -07:00
Krrish Dholakia
3c99ad19fa feat(utils.py): support global vertex ai safety settings param 2024-08-21 17:37:50 -07:00
Ognjen Francuski
765e020e75 Update handling of 'litellm.ssl_verify' in HTTP handlers to allow for custom, self-signed certificates. 2024-08-20 10:16:03 +02:00
Krrish Dholakia
cbdaecb5a8 fix(__init__.py): fix models_by_provider to include cohere_chat models
Fixes https://github.com/BerriAI/litellm/issues/5201
2024-08-16 11:33:23 -07:00
Ishaan Jaff
42bd5de7c0 feat allow controlling logged tags on langfuse 2024-08-13 12:24:01 -07:00
Krrish Dholakia
fdd9a07051 fix(utils.py): Break out of infinite streaming loop
Fixes https://github.com/BerriAI/litellm/issues/5158
2024-08-12 14:00:43 -07:00
Ishaan Jaff
ce9af1e1df refactor prometheus to be a customLogger class 2024-08-10 09:28:46 -07:00
Ishaan Jaff
43ff70348d init bedrock_tool_name_mappings 2024-08-09 17:09:19 -07:00
Krrish Dholakia
5da4c27e8d fix(internal_user_endpoints.py): expose new 'internal_user_budget_duration' flag
Relevant to - https://github.com/BerriAI/litellm/issues/5106
2024-08-08 13:05:03 -07:00
Krish Dholakia
baf01b47d8
Merge branch 'main' into litellm_personal_user_budgets 2024-08-07 19:59:50 -07:00
Krrish Dholakia
ec0b511119 fix: use more descriptive flag 2024-08-07 18:59:46 -07:00
Krrish Dholakia
2dd27a4e12 feat(utils.py): support validating json schema client-side if user opts in 2024-08-06 19:35:33 -07:00
Krrish Dholakia
5f6f1bdad4 fix(__init__.py): bump default allowed fails 2024-08-05 16:50:26 -07:00
Krrish Dholakia
936640948d fix: bump default allowed_fails + reduce default db pool limit
Fixes issues with running proxy server in production
2024-08-05 15:07:46 -07:00
Ishaan Jaff
a4eb32f4f3 fix linting errors 2024-08-05 08:54:04 -07:00
Ishaan Jaff
377272a152 add ALL_LITELLM_RESPONSE_TYPES 2024-08-05 08:41:13 -07:00
Krrish Dholakia
4258295a07 feat(utils.py): Add github as a provider
Closes https://github.com/BerriAI/litellm/issues/4922#issuecomment-2266564469
2024-08-03 09:11:22 -07:00
Ishaan Jaff
6c368b703e init gcs using gcs_bucket 2024-08-01 15:25:19 -07:00
Ishaan Jaff
70c836623d use itellm.forward_traceparent_to_llm_provider 2024-08-01 09:05:13 -07:00
Ishaan Jaff
59fc3ba649 add create_fine_tuning 2024-07-29 18:57:29 -07:00
Krish Dholakia
b854d2100c
Merge branch 'main' into litellm_vertex_migration 2024-07-27 20:25:12 -07:00
Krrish Dholakia
5b71421a7b feat(vertex_ai_partner.py): initial working commit for calling vertex ai mistral
Closes https://github.com/BerriAI/litellm/issues/4874
2024-07-27 12:54:14 -07:00
Krrish Dholakia
b4e3a77ad0 feat(utils.py): support sync streaming for custom llm provider 2024-07-25 16:47:32 -07:00
Krrish Dholakia
6bf1b9353b feat(custom_llm.py): initial working commit for writing your own custom LLM handler
Fixes https://github.com/BerriAI/litellm/issues/4675

 Also Addresses https://github.com/BerriAI/litellm/discussions/4677
2024-07-25 15:33:05 -07:00
Ishaan Jaff
11512c057d feat use UnsupportedParamsError as litellm error type 2024-07-24 12:19:10 -07:00
Krrish Dholakia
ae693424e4 fix(__init__.py): update init 2024-07-23 17:55:28 -07:00