Skip to content

[dotnet-port-api] Align concurrent tool invocation opt-in #910

Description

@github-actions

Summary

Port microsoft/agent-framework#7650 (commit 047ec7eaffab0d85306d85d7771cdfbc87d66e18) by surfacing a public Go opt-in, agent.Config.AllowConcurrentToolInvocations, to the default tool auto-call middleware used by the OpenAI chat/responses, Anthropic, Gemini, and AG-UI providers. Foundry inherits the same behavior through the OpenAI Responses-backed agent path.

This keeps the existing default serial behavior, adds provider-level parity for concurrent tool execution when a single model response returns multiple tool calls, adds end-to-end AG-UI coverage for both modes, and updates the feature comparison doc to reflect the new surface.

Ported .NET PRs

Breaking Changes

No.

Tests and Examples

  • go test ./provider/aguiprovider ./provider/openaiprovider ./provider/anthropicprovider ./provider/geminiprovider ./provider/foundryprovider
  • Added AG-UI provider coverage for the default serial auto-call path and the new concurrent opt-in path.

Notes

Generated by .NET to Go API Porting Agent · gpt54 · 215.1 AIC · ⌖ 17.3 AIC · ⊞ 24.4K ·


Note

This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
The changes have been pushed to branch copilot/dotnet-port-concurrent-tool-invocation-efd5ad63961375af.

Click here to create the pull request

To fix the permissions issue, go to SettingsActionsGeneral and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ

Show patch preview (239 of 239 lines)
From f5d63c81857a01b88388ec02dbf39811894b7068 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Tue, 25 Aug 2026 05:43:40 +0000
Subject: [PATCH] [dotnet-port-api] Align concurrent tool invocation opt-in

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
 agent/agent.go                           |  7 ++
 docs/dotnet-go-sdk-feature-comparison.md |  2 +-
 provider/aguiprovider/agui.go            |  5 +-
 provider/aguiprovider/agui_test.go       | 88 ++++++++++++++++++++++++
 provider/anthropicprovider/agent.go      |  5 +-
 provider/geminiprovider/agent.go         |  5 +-
 provider/openaiprovider/chat.go          |  5 +-
 provider/openaiprovider/responses.go     |  5 +-
 8 files changed, 111 insertions(+), 11 deletions(-)

diff --git a/agent/agent.go b/agent/agent.go
index 11953bae0..7516ce3e7 100644
--- a/agent/agent.go
+++ b/agent/agent.go
@@ -81,6 +81,13 @@ type Config struct {
 	// DisableFuncAutoCall tells provider constructors not to add automatic function-tool calling middleware.
 	DisableFuncAutoCall bool
 
+	// AllowConcurrentToolInvocations allows the default automatic function-tool
+	// calling middleware added by provider constructors to execute multiple tool
+	// calls from the same provider response in parallel. The default is false.
+	// This setting has no effect when DisableFuncAutoCall is true or when the
+	// provider uses a custom toolautocall middleware configuration.
+	AllowConcurrentToolInvocations bool
+
 	// Logger receives run, middleware, and provider diagnostics.
 	Logger *slog.Logger
 
diff --git a/docs/dotnet-go-sdk-feature-comparison.md b/docs/dotnet-go-sdk-feature-comparison.md
index 22f52a521..f6a5ada89 100644
--- a/docs/dotnet-go-sdk-feature-comparison.md
+++ b/docs/dotnet-go-sdk-feature-comparison.md
@@ -38,7 +38,7 @@ Within overlapping features, the main misalignments are API shape and ecosystem
 | Annotations/citations | MEAI annotation/content support th
... (truncated)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions