Skip to content

Python: agent-with-foundry-tools chat fails: ErrorAn unexpected error occurred. Check your agent config and try resubmitting the request. #508

@Menghua1

Description

@Menghua1

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.
Image

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

Steps to Reproduce:

  1. Initialize the project: azd init --template Azure-Samples/ai-foundry-starter-basic.
  2. 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.
  3. Run azd up.
  4. Navigate to agent playground on the Foundry Portal and enter "How do I create an HTTP-triggered Azure Function in Python?" in the chat.
  5. For pytest, copy the folder tests to the root directory.
  6. 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"
  1. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions