sammo icon indicating copy to clipboard operation
sammo copied to clipboard

add support for azure managed identity auth

Open andrescodas opened this issue 10 months ago • 2 comments

allow the user to pass the azure_ad_token_provider as in https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/managed-identity#chat-completions to AzureChat.

The included jupyter notebook quickstart_azure.ipynb run the same example as quickstart.ipynb, however, it uses AzureChat with a azure_ad_token_provider

andrescodas avatar Feb 27 '25 14:02 andrescodas

Hi @andrescodas - thanks so much for putting this in! I was wondering whether it would be cleaner to use api_key for also the azure token provider. In the runner class, we could then check via callable(config["api_key"]). What do you think?

t-schn avatar Mar 14 '25 21:03 t-schn

Hi!. I think it could be confusing, because these refer to different authorization methods. The api_key is interfaced in the headers with

            headers = {"api_key": "my_api_key"}

while a token is interfaced with:

            headers = {"Authorization": "Bearer my_token"}

andrescodas avatar Mar 17 '25 11:03 andrescodas