Commit graph

21 commits

Author SHA1 Message Date
Ishaan Jaff
62a1cdec47 (code quality) run ruff rule to ban unused imports (#7313)
* remove unused imports

* fix AmazonConverseConfig

* fix test

* fix import

* ruff check fixes

* test fixes

* fix testing

* fix imports
2024-12-19 12:33:42 -08:00
Ishaan Jaff
d891861c8e (feat) Add Azure Blob Storage Logging Integration (#7265)
* add path to http handler

* AzureBlobStorageLogger

* test_azure_blob_storage

* use constants for Azure storage

* use helper get_azure_ad_token_from_entrata_id

* azure blob storage support

* get_azure_ad_token_from_azure_storage

* fix import

* azure logging

* docs azure storage

* add docs on azure blobs

* add premium user check

* add azure_storage  as identified logging callback

* async_upload_payload_to_azure_blob_storage

* docs azure storage

* callback_class_str_to_classType
2024-12-16 22:18:22 -08:00
Ishaan Jaff
664d82ca9e fix use consistent naming (#7092) 2024-12-07 22:01:00 -08:00
Ishaan Jaff
0c7fb1d16c (refactor) router - use static methods for client init utils (#6420)
* use InitalizeOpenAISDKClient

* use InitalizeOpenAISDKClient static method

* fix  # noqa: PLR0915
2024-10-24 19:26:46 +04:00
Ishaan Jaff
6ee6910c8e Revert "(refactor) litellm.Router client initialization utils (#6394)" (#6403)
This reverts commit b70147f63b.
2024-10-23 20:31:57 +05:30
Ishaan Jaff
170f517adb (refactor) litellm.Router client initialization utils (#6394)
* refactor InitalizeOpenAISDKClient

* use helper func for _should_create_openai_sdk_client_for_model

* use static methods for set client on litellm router

* reduce LOC in _get_client_initialization_params

* fix _should_create_openai_sdk_client_for_model

* code quality fix

* test test_should_create_openai_sdk_client_for_model

* test test_get_client_initialization_params_openai

* fix mypy linting errors

* fix OpenAISDKClientInitializationParams

* test_get_client_initialization_params_all_env_vars

* test_get_client_initialization_params_azure_ai_studio_mistral

* test_get_client_initialization_params_default_values

* fix _get_client_initialization_params
2024-10-23 17:33:19 +05:30
Ishaan Jaff
0c5a47c404 (code quality) add ruff check PLR0915 for too-many-statements (#6309)
* ruff add PLR0915

* add noqa for PLR0915

* fix noqa

* add # noqa: PLR0915

* # noqa: PLR0915

* # noqa: PLR0915

* # noqa: PLR0915

* add # noqa: PLR0915

* # noqa: PLR0915

* # noqa: PLR0915

* # noqa: PLR0915

* # noqa: PLR0915
2024-10-18 15:36:49 +05:30
Krish Dholakia
f7e896bdc5 Add pyright to ci/cd + Fix remaining type-checking errors (#6082)
* fix: fix type-checking errors

* fix: fix additional type-checking errors

* fix: additional type-checking error fixes

* fix: fix additional type-checking errors

* fix: additional type-check fixes

* fix: fix all type-checking errors + add pyright to ci/cd

* fix: fix incorrect import

* ci(config.yml): use mypy on ci/cd

* fix: fix type-checking errors in utils.py

* fix: fix all type-checking errors on main.py

* fix: fix mypy linting errors

* fix(anthropic/cost_calculator.py): fix linting errors

* fix: fix mypy linting errors

* fix: fix linting errors
2024-10-05 17:04:00 -04:00
Ishaan Jaff
6f68e860e0 fix import error 2024-09-05 10:09:44 -07:00
Ishaan Jaff
b5d1d93c14 refactor secret managers 2024-09-03 10:58:02 -07:00
Krish Dholakia
3fbb4f8fac 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
2203dad29e fix azure_ad_token_provider 2024-08-22 16:15:53 -07:00
Ishaan Jaff
b16752f0bc add new litellm params for client_id, tenant_id etc 2024-08-22 11:37:30 -07:00
Ishaan Jaff
525d152d85 use azure_ad_token_provider to init clients 2024-08-22 11:03:49 -07:00
Marc Abramowitz
4e2e8101c6 Use AZURE_API_VERSION as default azure openai version
Without this change, the default version of the Azure OpenAI API is hardcoded in
the code as an old version, `"2024-02-01"`. This change allows the user to set
the default version of the Azure OpenAI API by setting the environment variable
`AZURE_API_VERSION` or by using the command-line parameter `--api_version`.
2024-08-14 15:47:57 -07:00
Ishaan Jaff
037f737aa1 Revert "[Ui] add together AI, Mistral, PerplexityAI, OpenRouter models on Admin UI " 2024-07-20 19:04:22 -07:00
Ishaan Jaff
368e0109a4 router fix init openai compatible providers 2024-07-19 19:42:04 -07:00
Krrish Dholakia
8275e29030 fix(client_initialization_utils.py): fix import logic 2024-07-06 19:28:38 -07:00
Krrish Dholakia
71ea98d5ea fix(client_initialization_utils.py): fix merge conflicts 2024-07-06 19:20:28 -07:00
Ishaan Jaff
37312f08f2 fix should_initialize_sync_client 2024-07-06 13:10:22 -07:00
Ishaan Jaff
f6eccf84ce use helper for init client + check if we should init sync clients 2024-07-06 12:52:41 -07:00