Commit graph

12 commits

Author SHA1 Message Date
Ishaan Jaff
3c898e23ea refactor secret managers 2024-09-03 10:58:02 -07:00
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
f13a65be2d fix azure_ad_token_provider 2024-08-22 16:15:53 -07:00
Ishaan Jaff
08fa3f346a add new litellm params for client_id, tenant_id etc 2024-08-22 11:37:30 -07:00
Ishaan Jaff
8f657b40f5 use azure_ad_token_provider to init clients 2024-08-22 11:03:49 -07:00
Marc Abramowitz
ac9aa1ab67 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
9a545c1ff8
Revert "[Ui] add together AI, Mistral, PerplexityAI, OpenRouter models on Admin UI " 2024-07-20 19:04:22 -07:00
Ishaan Jaff
3708355f91 router fix init openai compatible providers 2024-07-19 19:42:04 -07:00
Krrish Dholakia
0710c167ab fix(client_initialization_utils.py): fix import logic 2024-07-06 19:28:38 -07:00
Krrish Dholakia
14ab1e5d2d fix(client_initialization_utils.py): fix merge conflicts 2024-07-06 19:20:28 -07:00
Ishaan Jaff
984cc4722e fix should_initialize_sync_client 2024-07-06 13:10:22 -07:00
Ishaan Jaff
2609de43d0 use helper for init client + check if we should init sync clients 2024-07-06 12:52:41 -07:00