Skip to content

[dotnet-port-fixes] Surface response.failed error content - #804

Merged
George Adams (gdams) merged 1 commit into
mainfrom
dotnet-port-fixes-response-failed-error-content-5fff6162ef959527
Aug 7, 2026
Merged

[dotnet-port-fixes] Surface response.failed error content#804
George Adams (gdams) merged 1 commit into
mainfrom
dotnet-port-fixes-response-failed-error-content-5fff6162ef959527

Conversation

@michelle-clayton-work

Copy link
Copy Markdown
Contributor

Summary

Port the .NET failure-handling fix from microsoft/agent-framework#7497 into the shared Go Responses provider path so response.failed events surface structured ErrorContent instead of empty updates. The Go change also applies the same fallback to failed non-streaming responses when the provider omits explicit error details, using a default message/code rather than silently dropping the failure.

Ported .NET PRs

Upstream commit referenced: d56e81357e5179b6f916b180c0cb34ea2e73c80b.

Breaking Changes

No. This keeps the public Go API unchanged and only corrects how existing failed Responses API events are surfaced to callers.

Tests and Examples

  • go test ./provider/openaiprovider
  • go test ./provider/foundryprovider
  • Added coverage for streaming response.failed events and failed responses without explicit provider error details

Notes

  • Duplicate check: no recent [dotnet-port-fixes] or [dotnet-port-api] issue/PR title in microsoft/agent-framework-go matched this failure-handling area.
  • The fix is intentionally scoped to the shared OpenAI Responses translation path used by Foundry, so no exported API or docs/example updates were needed.

Generated by .NET to Go Fixes and Test Porting Agent · gpt54 · 282.5 AIC · ⌖ 13.4 AIC · ⊞ 24.2K ·

Closes #787

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Note

This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.

@github-actions github-actions Bot added the parity-approved Go API consistency review found no parity issues label Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Parity Review: ✅ Approved

This PR is a direct port of the .NET fix from microsoft/agent-framework#7497. It corrects how response.failed events (both streaming and non-streaming) surface structured ErrorContent instead of silently dropping failures.

Scope: Only unexported helper functions in provider/openaiprovider/responses.go are modified. No exported Go API surface changes.

Parity: The behavior now aligns with the upstream .NET fix — failed responses produce structured error content with a message and error code. The Go-specific addition of a default fallback message/code for responses missing explicit error details is a defensive improvement consistent with the upstream intent.

Verdict: No cross-repo consistency issues. No public-api-change label needed.

Generated by Go API Consistency Review Agent for #804 · sonnet46 · 19.6 AIC · ⌖ 5.53 AIC · ⊞ 5.7K ·

@gdams
George Adams (gdams) added this pull request to the merge queue Aug 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 7, 2026
@gdams
George Adams (gdams) added this pull request to the merge queue Aug 7, 2026
Merged via the queue into main with commit e3b41e7 Aug 7, 2026
27 of 31 checks passed
@gdams
George Adams (gdams) deleted the dotnet-port-fixes-response-failed-error-content-5fff6162ef959527 branch August 7, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parity-approved Go API consistency review found no parity issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[dotnet-port-fixes] Surface response.failed error content

3 participants