I’m a member of the Azure AI Founders Hub program with $5,000 in credits and am trying to integrate Azure OpenAI with CrewAI Enterprise. Despite following the setup instructions, I’m encountering authentication issues.
Thanks, Matt, I appreciate it. I started with that guide it was great. I can’t tell if the problem is with CrewAI enterprise or Azure. I’m running into some interesting differences between your guide and my setup:
Current Configuration
Successfully deployed gpt-4o model in Azure AI Foundry
Model version: 2024-11-20
All environment variables set in CrewAI Enterprise:
AZURE_API_BASE
AZURE_API_KEY
AZURE_API_TYPE
AZURE_API_VERSION
AZURE_DEPLOYMENT_TARGET_URL
Key Differences
Your guide shows Model Deployments under Resource Management in the Azure OpenAI Studio, but I’m noticing this section isn’t visible in my interface. I’ve deployed through Azure AI Foundry instead, which seems to be the newer approach.
Current Issue
Still getting a 401 authentication error despite having:
Correct API key from Azure portal
Proper endpoint URL
Model deployed and showing as “Succeeded”
All environment variables configured in both CrewAI sections
Would appreciate any insights on whether the Azure AI Foundry deployment method requires different configuration than what’s shown in your guide, or if there are any known authentication issues when using this newer deployment approach.
Thanks for your help!
Best regards
I keep getting this error: Error Message:
litellm.AuthenticationError: AuthenticationError: OpenAIException - Error code: 401 - {‘error’: {‘message’: ‘Incorrect API key provided: 6a4JFKc8************************************************************************i13N. You can find your API key at https://platform.openai.com/account/api-keys.’, ‘type’: ‘invalid_request_error’, ‘param’: None, ‘code’: ‘invalid_api_key’}}
It doesn’t matter if you use AI Foundry or AI Studio, I have old and new deployments and no one works in CrewAI Enterprise. Your guide doesn’t match with CrewAI requirements, where I was asked for AZURE_DEPLOYMENT_TARGET_URL, AZURE_API_KEY and AZURE_API_VERSION, what is for API_BASE and why there is no deployment name env var key? I can select the models: azure/[model], but in Azure we name the model ourself: