Skip to content

.NET: AgentWithHostedMCP chat fails: ErrorHTTP 404 (: 404) Resource not found #3195

@Menghua1

Description

@Menghua1

Description:
After deploying AgentWithHostedMCP, chatting in the Agent Playground on the Foundry Portal fails with the error:
"ErrorHTTP 404 (: 404) Resource not found."
Image

In addition, running Pytest also fails with the error "ID cannot be null or empty (Parameter 'id')", 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/agent-framework/blob/main/dotnet/samples/HostedAgents/AgentWithHostedMCP/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="WebSearchAgent"
  1. Run cd tests and pytest test_agent.py -v -s.

Environment:

  • Azd version: azd version 1.23.0-beta.1-daily.5744372 (commit 35c7b9a4a09b4a26b2e99b830746799c49f53fd3).
  • AI Agent Extension version: 0.1.5-preview
  • Agent: AgentWithHostedMCP
  • 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

Labels

.NETv1.0Features being tracked for the version 1.0 GA

Type

No type

Projects

Status

Planned

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions