Description:
When testing Scenario 1: Hello World (Python, Invocations), Scenario 3: LangGraph Toolbox (Responses), and Scenario 6: existing Foundry project, remote invoke fails in all cases. Running azd ai agent invoke --protocol invocations returns 500 Internal Server Error.

Running azd ai agent monitor --tail 20 to check the logs showed that the service starts successfully and /readiness returns 200, but handling POST /invocations fails with the following exception: AttributeError: 'InvocationAgentServerHost' object has no attribute 'request_span'.


Steps to Reproduce:
mkdir py-hello-invocations and cd py-hello-invocations
- Run
azd ai agent init --manifest "https://github.com/microsoft-foundry/foundry-samples/blob/main/samples/python/hosted-agents/bring-your-own/invocations/hello-world/agent.manifest.yaml" and select location northcentralus.
- Run
azd up.
- Run
azd ai agent invoke --protocol invocations '{"message": "Hello from hosted agent"}'.
- Run
azd ai agent monitor --tail 20.
Environment:
- Azd version: azd version 1.26.0-beta.1-daily.6335418 (commit 84dd634326889128cfc0b605e3956cf515be42a8) (daily).
- AI Agent Extension version: 0.1.32-preview
- Manifest URL:
Scenario 1: Hello World (Python, Invocations): https://github.com/microsoft-foundry/foundry-samples/blob/main/samples/python/hosted-agents/bring-your-own/invocations/hello-world/agent.manifest.yaml
Scenario 3: LangGraph Toolbox (Responses): https://github.com/microsoft-foundry/foundry-samples/blob/main/samples/python/hosted-agents/bring-your-own/responses/langgraph-toolbox/agent.manifest.yaml
- OS: Windows
- Location:
northcentralus.
Expected Behavior:
Remote invoke should succeed.
@JeffreyCA and @rajeshkamal5050 for notification.
Description:

When testing Scenario 1: Hello World (Python, Invocations), Scenario 3: LangGraph Toolbox (Responses), and Scenario 6: existing Foundry project, remote invoke fails in all cases. Running
azd ai agent invoke --protocol invocationsreturns500 Internal Server Error.Running


azd ai agent monitor --tail 20to check the logs showed that the service starts successfully and/readinessreturns 200, but handlingPOST /invocationsfails with the following exception:AttributeError: 'InvocationAgentServerHost' object has no attribute 'request_span'.Steps to Reproduce:
mkdir py-hello-invocationsandcd py-hello-invocationsazd ai agent init --manifest "https://github.com/microsoft-foundry/foundry-samples/blob/main/samples/python/hosted-agents/bring-your-own/invocations/hello-world/agent.manifest.yaml"and select locationnorthcentralus.azd up.azd ai agent invoke --protocol invocations '{"message": "Hello from hosted agent"}'.azd ai agent monitor --tail 20.Environment:
northcentralus.Expected Behavior:
Remote invoke should succeed.
@JeffreyCA and @rajeshkamal5050 for notification.