Description:
After deploying agent-with-foundry-tools, chatting in the Agent Playground on the Foundry Portal fails with the error:
ErrorAn unexpected error occurred. Check your agent config and try resubmitting the request.

In addition, running Pytest also fails with the error as shown below:

Steps to Reproduce:
- Initialize the project:
azd init --template Azure-Samples/ai-foundry-starter-basic.
- Initialize AI agent:
azd ai agent init -m https://github.com/microsoft-foundry/foundry-samples/blob/main/samples/python/hosted-agents/agent-framework/agent-with-foundry-tools/agent.yaml and select location northcentralus.
- Run
azd up.
- Navigate to agent playground on the Foundry Portal and enter "How do I create an HTTP-triggered Azure Function in Python?" in the chat.
- For pytest, copy the folder tests to the root directory.
- Create a new .env file and add the following content.
AZURE_AI_PROJECT_ENDPOINT=""https://ai-account-bvmg7v2ge46ec.services.ai.azure.com/api/projects/ai-project-mhweb2""
AGENT_VERSION=1
AGENT_TEST_MESSAGE="How do I create an HTTP-triggered Azure Function in Python?"
AGENT_KIND=hosted
AGENT_NAME="af-agent-with-foundry-tools"
- Run
cd tests and pytest test_agent.py -v -s.
Environment:
- Azd version: azd version 1.24.0-beta.1-daily.5804512 (commit 72ee2e17e197ddf43dd3df5bb72307e2e015ab0c).
- AI Agent Extension version: 0.1.8-preview
- Agent: agent-with-foundry-tools
- OS: Windows
- Location:
northcentralus.
Expected Behavior:
Chatting is successful on the agent playground, and pytest also works successfully.
@JeffreyCA and @rajeshkamal5050 for notification.