microsoft / TaskWeaver

A code-first agent framework for seamlessly planning and executing data analytics tasks.
https://microsoft.github.io/TaskWeaver/
MIT License
5.2k stars 662 forks source link

Transitioning from OpenAI API Keys to Azure Managed Identity (MSI) – Issues with Taskweaver Expecting API Keys in Multiple Processes #408

Open bsavocad opened 4 days ago

bsavocad commented 4 days ago

Hello,

I'm currently in the process of transitioning my application from using OpenAI API keys to Azure Managed Service Identity (MSI) for enhanced security and credential management. However, I'm encountering several issues with Taskweaver, mainly because it expects an API key in multiple processes.

Issues Encountered:

Questions:

What I've Tried So Far:

Additional Information:

Request:

Any assistance or guidance on how to overcome these issues would be greatly appreciated. If MSI integration isn't currently supported, are there any workarounds or plans to support this in the future?

Thank you for your help!

Jack-Q commented 4 days ago

We support using Entra authentication when using Azure OpenAI on Azure services. Maybe you can check the related instructions in this doc to configure access Azure OpenAI with managed identity.

bsavocad commented 1 day ago

unfortunately, i have not been able to solve this problem even though i followed the documentation to the letter. i keep getting errors like _ValueError: Config value llm.azure_ad.aad_client_secret_ is not found, when variables like these shouldn't be hardcoded but should auto-execute with DefaultAzureCredential by defining my managed_identity_client_id and my default_credential for my token_provider. have you heard of similar issues? it's quite frustrating!