Skip to content

.NET: [Bug]: Azure.AI.AgentServer.Responses.PayloadValidationException: Required property 'logprobs' is missing #5854

@justinyoo

Description

@justinyoo

Description

.NET hosted agent SDK omits the logprobs property while serialising/deserialising JSON payloads and throws the error.

Code Sample

Here's the steps to reproduce the error:

1. Clone https://github.com/Azure/microsoft-agent-framework-foundry-starter-pack-net.
1. Switch the branch to `feat/aspire-connection-review`.
1. Provision the MCP server under the `resources-mcp` directory through `azd up`.
1. Provision the Foundry hosted agent under the `resources-foundry` directory through `azd up`.
1. Run Aspire by running `dotnet watch run --project src/MafStarterPack.AppHost`.
1. Open the DevUI page of the `agent` app.
1. Send a prompt like "show me the list to do" and confirm it returns response.
1. Send another prompt like "add workout at 7am" and confirm it throws an error.
1. Open Foundry Portal, get to the project and find the log trace that shows the error.

Error Messages / Stack Traces

Here's the error log from Foundry Hosted Agent trace:


event: log
data: {"timestamp":"2026-05-14T14:55:01.105+00:00","session_id":"6b12095bb527399851890122f858dc4464720cc5297c5e3e291c2418f5a4c93","session_state":"Running","agent":"todo-agent","generated_at":"2026-05-14T14:55:09.0425049+00:00","last_accessed":"2026-05-14T14:55:01.105+00:00"}
event: log
data: {"timestamp":"2026-05-14T14:55:09.138913599Z","stream":"status","message":"Connecting to the container..."}
event: log
data: {"timestamp":"2026-05-14T14:55:01.138138109\u002B00:00","stream":"stdout","message":"Starting Hosted Agent..."}
event: log
data: {"timestamp":"2026-05-14T14:55:01.138334595\u002B00:00","stream":"stdout","message":"Using Azure OpenAI Endpoint: https://ai-account-4m4qk3g4rudh4.services.ai.azure.com/api/projects/ai-project-juyoo-mafstarter-agent-2026051401"}
event: log
data: {"timestamp":"2026-05-14T14:55:01.138348841\u002B00:00","stream":"stdout","message":"Using Azure OpenAI Deployment Name: gpt-5-mini"}
event: log
data: {"timestamp":"2026-05-14T14:55:01.138355398\u002B00:00","stream":"stdout","message":"Using Azure Tenant ID: d91aa5af-8c1e-442c-b77c-0b92988b387b"}
event: log
data: {"timestamp":"2026-05-14T14:55:01.138361500\u002B00:00","stream":"stdout","message":"Using MCP Todo FQDN: mcp-todo.happysand-e4a4dac4.koreacentral.azurecontainerapps.io"}
event: log
data: {"timestamp":"2026-05-14T14:55:01.334987453\u002B00:00","stream":"stdout","message":"info: Azure.AI.AgentServer.Core.AgentHostBuilder[0]"}
event: log
data: {"timestamp":"2026-05-14T14:55:01.334987453\u002B00:00","stream":"stdout","message":"      AgentServer platform environment: IsHosted=True AgentName=todo-agent AgentVersion=2 Port=8088 SessionId=6b12095bb527399851890122f858dc4464720cc5297c5e3e291c2418f5a4c93 SseKeepAliveInterval=00:00:15"}
event: log
data: {"timestamp":"2026-05-14T14:55:01.337753164\u002B00:00","stream":"stdout","message":"info: Azure.AI.AgentServer.Core.AgentHostBuilder[0]"}
event: log
data: {"timestamp":"2026-05-14T14:55:01.337753164\u002B00:00","stream":"stdout","message":"      AgentServer connectivity: ProjectEndpoint=https://ai-account-4m4qk3g4rudh4.services.ai.azure.com OtlpEndpoint=(not set) AppInsightsConfigured=True"}
event: log
data: {"timestamp":"2026-05-14T14:55:01.337753164\u002B00:00","stream":"stdout","message":"info: Azure.AI.AgentServer.Core.AgentHostBuilder[0]"}
event: log
data: {"timestamp":"2026-05-14T14:55:01.337753164\u002B00:00","stream":"stdout","message":"      AgentServer host options: ShutdownTimeout=00:00:30 Protocols=responses"}
event: log
data: {"timestamp":"2026-05-14T14:55:01.509051072\u002B00:00","stream":"stdout","message":"info: Azure.AI.AgentServer.Responses.Internal.ResponsesStartupLogger[0]"}
event: log
data: {"timestamp":"2026-05-14T14:55:01.509051072\u002B00:00","stream":"stdout","message":"      Responses protocol configuration: StorageProvider=FoundryStorageProvider DefaultModel=(not set) DefaultFetchHistoryCount=100 EventStreamTtl=00:10:00"}
event: log
data: {"timestamp":"2026-05-14T14:55:01.562618702\u002B00:00","stream":"stdout","message":"warn: Microsoft.AspNetCore.Server.Kestrel[0]"}
event: log
data: {"timestamp":"2026-05-14T14:55:01.562618702\u002B00:00","stream":"stdout","message":"      Overriding address(es) \u0027http://*:8080\u0027. Binding to endpoints defined via IConfiguration and/or UseKestrel() instead."}
event: log
data: {"timestamp":"2026-05-14T14:55:01.572792055\u002B00:00","stream":"stdout","message":"info: Microsoft.Hosting.Lifetime[14]"}
event: log
data: {"timestamp":"2026-05-14T14:55:01.572792055\u002B00:00","stream":"stdout","message":"      Now listening on: http://0.0.0.0:8088"}
event: log
data: {"timestamp":"2026-05-14T14:55:01.573955255\u002B00:00","stream":"stdout","message":"info: Microsoft.Hosting.Lifetime[0]"}
event: log
data: {"timestamp":"2026-05-14T14:55:01.573955255\u002B00:00","stream":"stdout","message":"      Application started. Press Ctrl\u002BC to shut down."}
event: log
data: {"timestamp":"2026-05-14T14:55:01.574028300\u002B00:00","stream":"stdout","message":"info: Microsoft.Hosting.Lifetime[0]"}
event: log
data: {"timestamp":"2026-05-14T14:55:01.574028300\u002B00:00","stream":"stdout","message":"      Hosting environment: Production"}
event: log
data: {"timestamp":"2026-05-14T14:55:01.574098891\u002B00:00","stream":"stdout","message":"info: Microsoft.Hosting.Lifetime[0]"}
event: log
data: {"timestamp":"2026-05-14T14:55:01.574098891\u002B00:00","stream":"stdout","message":"      Content root path: /app"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.003987839\u002B00:00","stream":"stdout","message":"info: Microsoft.AspNetCore.Hosting.Diagnostics[1]"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.003987839\u002B00:00","stream":"stdout","message":"      Request starting HTTP/1.1 GET http://0d8e5fdc-dcd4-469f-940e-059643ad1247--8088.koreacentral.adcproxy.io/readiness - - -"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.063054311\u002B00:00","stream":"stdout","message":"info: Azure.AI.AgentServer.Core.Internal.InboundRequestLoggingMiddleware[1689694937]"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.063054311\u002B00:00","stream":"stdout","message":"      Inbound GET /readiness starting (x-request-id: , x-ms-client-request-id: , trace-id: 68e1ab9fe5f2774781cde0d4ad88cb04)"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.065235005\u002B00:00","stream":"stdout","message":"info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.065235005\u002B00:00","stream":"stdout","message":"      Executing endpoint \u0027Health checks\u0027"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.071861290\u002B00:00","stream":"stdout","message":"info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.071861290\u002B00:00","stream":"stdout","message":"      Executed endpoint \u0027Health checks\u0027"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.073476808\u002B00:00","stream":"stdout","message":"info: Azure.AI.AgentServer.Core.Internal.InboundRequestLoggingMiddleware[194824245]"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.073476808\u002B00:00","stream":"stdout","message":"      Inbound GET /readiness completed HTTP 200 in 10ms (x-request-id: , x-ms-client-request-id: , trace-id: 68e1ab9fe5f2774781cde0d4ad88cb04)"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.075225042\u002B00:00","stream":"stdout","message":"info: Microsoft.AspNetCore.Hosting.Diagnostics[2]"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.075225042\u002B00:00","stream":"stdout","message":"      Request finished HTTP/1.1 GET http://0d8e5fdc-dcd4-469f-940e-059643ad1247--8088.koreacentral.adcproxy.io/readiness - 200 - text/plain 82.5600ms"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.333019509\u002B00:00","stream":"stdout","message":"info: Microsoft.AspNetCore.Hosting.Diagnostics[1]"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.333019509\u002B00:00","stream":"stdout","message":"      Request starting HTTP/1.1 POST http://0d8e5fdc-dcd4-469f-940e-059643ad1247--8088.koreacentral.adcproxy.io/responses - application/json 552"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.334483535\u002B00:00","stream":"stdout","message":"info: Azure.AI.AgentServer.Core.Internal.InboundRequestLoggingMiddleware[1689694937]"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.334483535\u002B00:00","stream":"stdout","message":"      Inbound POST /responses starting (x-request-id: 68e1ab9fe5f2774781cde0d4ad88cb04, x-ms-client-request-id: ee1bd026-7830-4a57-9498-9c8e3ace3507, trace-id: 68e1ab9fe5f"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.334501144\u002B00:00","stream":"stdout","message":"2774781cde0d4ad88cb04)"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.334629419\u002B00:00","stream":"stdout","message":"info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.334629419\u002B00:00","stream":"stdout","message":"      Executing endpoint \u0027HTTP: POST /responses\u0027"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.356787880\u002B00:00","stream":"stdout","message":"warn: Azure.AI.AgentServer.Responses.Internal.ResponsesExceptionFilter[0]"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.356787880\u002B00:00","stream":"stdout","message":"      Payload validation failed with 1 error(s)"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.356787880\u002B00:00","stream":"stdout","message":"      Azure.AI.AgentServer.Responses.PayloadValidationException: Required property \u0027logprobs\u0027 is missing"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.356787880\u002B00:00","stream":"stdout","message":"         at Azure.AI.AgentSer"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.356816353\u002B00:00","stream":"stdout","message":"ver.Responses.Internal.ResponseEndpointHandler.CreateResponseAsync(HttpContext httpContext)"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.356816353\u002B00:00","stream":"stdout","message":"         at Azure.AI.AgentServer.Responses.ResponsesServerEndpointRouteBuilderExtensions.\u003C\u003Ec.\u003C\u003CMapResponsesServer\u003Eb__0_0\u003Ed.MoveNext()"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.356816353\u002B00:00","stream":"stdout","message":"      --- End of stack trace f"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.356824588\u002B00:00","stream":"stdout","message":"rom previous location ---"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.356824588\u002B00:00","stream":"stdout","message":"         at Microsoft.AspNetCore.Http.RequestDelegateFactory.\u003CTaskOfTToValueTaskOfObject\u003Eg__ExecuteAwaited|92_0[T](Task\u00601 task)"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.356824588\u002B00:00","stream":"stdout","message":"         at Azure.AI.AgentServer.Responses.Internal.ResponsesExceptionFilter.InvokeAsync(EndpointFilte"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.356831394\u002B00:00","stream":"stdout","message":"rInvocationContext context, EndpointFilterDelegate next)"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.366696169\u002B00:00","stream":"stdout","message":"info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.366696169\u002B00:00","stream":"stdout","message":"      Executed endpoint \u0027HTTP: POST /responses\u0027"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.368381563\u002B00:00","stream":"stdout","message":"warn: Azure.AI.AgentServer.Core.Internal.InboundRequestLoggingMiddleware[601900377]"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.368381563\u002B00:00","stream":"stdout","message":"      Inbound POST /responses failed HTTP 400 in 32ms (x-request-id: 68e1ab9fe5f2774781cde0d4ad88cb04, x-ms-client-request-id: ee1bd026-7830-4a57-9498-9c8e3ace3507, trace-i"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.368398143\u002B00:00","stream":"stdout","message":"d: 68e1ab9fe5f2774781cde0d4ad88cb04)"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.369565608\u002B00:00","stream":"stdout","message":"info: Microsoft.AspNetCore.Hosting.Diagnostics[2]"}
event: log
data: {"timestamp":"2026-05-14T14:55:02.369565608\u002B00:00","stream":"stdout","message":"      Request finished HTTP/1.1 POST http://0d8e5fdc-dcd4-469f-940e-059643ad1247--8088.koreacentral.adcproxy.io/responses - 400 - application/json 37.1351ms"}
event: log
data: {"timestamp":"2026-05-14T14:55:08.790667204\u002B00:00","stream":"stdout","message":"info: Microsoft.AspNetCore.Hosting.Diagnostics[1]"}
event: log
data: {"timestamp":"2026-05-14T14:55:08.790667204\u002B00:00","stream":"stdout","message":"      Request starting HTTP/1.1 GET http://0d8e5fdc-dcd4-469f-940e-059643ad1247--8088.koreacentral.adcproxy.io/readiness - - -"}
event: log
data: {"timestamp":"2026-05-14T14:55:08.790879307\u002B00:00","stream":"stdout","message":"info: Azure.AI.AgentServer.Core.Internal.InboundRequestLoggingMiddleware[1689694937]"}
event: log
data: {"timestamp":"2026-05-14T14:55:08.790879307\u002B00:00","stream":"stdout","message":"      Inbound GET /readiness starting (x-request-id: , x-ms-client-request-id: , trace-id: 7e1f0fd2e3b74ae195fb888445ed27a0)"}
event: log
data: {"timestamp":"2026-05-14T14:55:08.790951564\u002B00:00","stream":"stdout","message":"info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]"}
event: log
data: {"timestamp":"2026-05-14T14:55:08.790951564\u002B00:00","stream":"stdout","message":"      Executing endpoint \u0027Health checks\u0027"}
event: log
data: {"timestamp":"2026-05-14T14:55:08.791623424\u002B00:00","stream":"stdout","message":"info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]"}
event: log
data: {"timestamp":"2026-05-14T14:55:08.791623424\u002B00:00","stream":"stdout","message":"      Executed endpoint \u0027Health checks\u0027"}
event: log
data: {"timestamp":"2026-05-14T14:55:08.791708823\u002B00:00","stream":"stdout","message":"info: Azure.AI.AgentServer.Core.Internal.InboundRequestLoggingMiddleware[194824245]"}
event: log
data: {"timestamp":"2026-05-14T14:55:08.791708823\u002B00:00","stream":"stdout","message":"      Inbound GET /readiness completed HTTP 200 in 0ms (x-request-id: , x-ms-client-request-id: , trace-id: 7e1f0fd2e3b74ae195fb888445ed27a0)"}
event: log
data: {"timestamp":"2026-05-14T14:55:08.791983676\u002B00:00","stream":"stdout","message":"info: Microsoft.AspNetCore.Hosting.Diagnostics[2]"}
event: log
data: {"timestamp":"2026-05-14T14:55:08.791983676\u002B00:00","stream":"stdout","message":"      Request finished HTTP/1.1 GET http://0d8e5fdc-dcd4-469f-940e-059643ad1247--8088.koreacentral.adcproxy.io/readiness - 200 - text/plain 1.5791ms\n"}
event: log
data: {"timestamp":"2026-05-14T14:55:09.140185089Z","stream":"status","message":"Successfully connected to container"}

Package Versions

"Microsoft.Agents.AI.Foundry.Hosting": "1.6.1-preview.260514.1"

.NET Version

.NET 10.0.300

Additional Context

No response

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions