.NET: Forward A2A MessageSendParams.Configuration in the A2A adapter - #7365
Merged
SergeyMenshykh merged 1 commit intoJul 28, 2026
Merged
Conversation
The A2A hosting layer now forwards the caller-supplied SendMessageConfiguration from RequestContext.Configuration into AgentRunOptions.AdditionalProperties under the key 'a2a.configuration'. This covers all three handler paths: non-streaming, streaming, and task continuation. The server-configured AgentRunMode remains authoritative for AllowBackgroundResponses — the caller's ReturnImmediately is forwarded but does not override the server decision. Closes microsoft#5869 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5ee820de-3e34-493b-a19c-1db6bc04871d
SergeyMenshykh
temporarily deployed
to
github-app-auth
July 28, 2026 13:29 — with
GitHub Actions
Inactive
SergeyMenshykh
temporarily deployed
to
github-app-auth
July 28, 2026 13:29 — with
GitHub Actions
Inactive
SergeyMenshykh
temporarily deployed
to
github-app-auth
July 28, 2026 13:29 — with
GitHub Actions
Inactive
SergeyMenshykh
temporarily deployed
to
integration
July 28, 2026 13:29 — with
GitHub Actions
Inactive
SergeyMenshykh
temporarily deployed
to
integration
July 28, 2026 13:29 — with
GitHub Actions
Inactive
SergeyMenshykh
temporarily deployed
to
github-app-auth
July 28, 2026 13:31 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the .NET A2A hosting adapter to forward the caller-provided MessageSendParams.Configuration (SendMessageConfiguration) into AgentRunOptions.AdditionalProperties so hosted agents can observe request configuration through the normal RunAsync/RunStreamingAsync options path.
Changes:
- Refactors A2A option construction into a single
CreateRunOptionshelper used by non-streaming, streaming, and continuation paths. - Forwards the full
SendMessageConfigurationobject under the"a2a.configuration"key inAgentRunOptions.AdditionalProperties. - Adds unit tests verifying configuration forwarding (including in streaming mode) and ensuring server run mode remains authoritative for background execution.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| dotnet/src/Microsoft.Agents.AI.Hosting.A2A/A2AAgentHandler.cs | Centralizes AgentRunOptions creation and forwards SendMessageConfiguration via AdditionalProperties. |
| dotnet/tests/Microsoft.Agents.AI.Hosting.A2A.UnitTests/A2AAgentHandlerTests.cs | Adds coverage for configuration forwarding and run-mode authority behavior. |
SergeyMenshykh
marked this pull request as ready for review
July 28, 2026 14:23
SergeyMenshykh
temporarily deployed
to
github-app-auth
July 28, 2026 14:23 — with
GitHub Actions
Inactive
SergeyMenshykh
enabled auto-merge
July 28, 2026 14:38
westey-m
approved these changes
Jul 28, 2026
peibekwe
approved these changes
Jul 28, 2026
This was referenced Jul 30, 2026
Merged
This was referenced Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation & Context
RequestContext.Configuration(SendMessageConfiguration) is never read by the A2A hosting layer, so agent authors cannot see the caller'sacceptedOutputModes,historyLength, etc. throughAgentRunOptions.Description & Review Guide
A2AAgentHandlernow stores the wholeSendMessageConfigurationinAdditionalProperties["a2a.configuration"]via a sharedCreateRunOptionshelper used by all three handler paths.AgentRunModestays authoritative forAllowBackgroundResponses.Related Issue
Closes #5869
Contribution Checklist