Repository navigation
[dotnet-port-api] Add Responses reasoning include control - #966
Quim Muntal (qmuntal) merged 5 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The new option is correctly wired behind existing store=false behavior, preserves defaults, and includes targeted coverage for both direct OpenAI and Foundry passthrough scenarios.
Pull request overview
Adds a new per-run OpenAI Responses provider option to control whether reasoning.encrypted_content is automatically included when Responses output storage is disabled (store=false), aligning Go behavior with upstream .NET’s split control while keeping the existing default behavior unchanged.
Changes:
- Introduced
openaiprovider.ResponsesIncludeReasoningEncryptedContent(bool)and gated the automatic include behavior behind it (defaulttrue). - Documented the default include behavior and the opt-out mechanism for both OpenAI and Foundry agent configs.
- Added targeted tests covering direct OpenAI Responses usage and Foundry
RunOptionspassthrough.
File summaries
| File | Description |
|---|---|
| provider/openaiprovider/responses.go | Adds the new option type + helper and gates automatic reasoning.encrypted_content inclusion on the option. |
| provider/openaiprovider/responses_test.go | Adds a test ensuring include is omitted when the option disables automatic encrypted reasoning include while store=false. |
| provider/openaiprovider/chat.go | Updates DisableStoreOutput docs to mention the default encrypted reasoning include and the per-run opt-out. |
| provider/foundryprovider/agent.go | Updates Foundry agent config docs to describe the default include behavior and the opt-out via RunOptions. |
| provider/foundryprovider/agent_test.go | Adds a test verifying Foundry RunOptions can disable the automatic include passthrough. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Resolve conflicts against main: keep both new helpers in responses.go, keep both test imports. Adapt the port to main's changes -- rename the option method Value -> MAFValue, and drop the now-removed Config.DisableFuncAutoCall from the tests (matches review feedback).
This comment has been minimized.
This comment has been minimized.
|
Scope: public API Changed Go contract: New exported Upstream evidence reviewed: Result: aligned. The Go option preserves the existing default behavior (auto-include
|
Summary
Added
openaiprovider.ResponsesIncludeReasoningEncryptedContent(bool)so Go Responses agents can opt out of automatically requestingreasoning.encrypted_contentwhilestore=false, matching the split control that upstream .NET added around stateless stored-output handling. The existing default behavior stays intact, and the Foundry provider docs/tests now cover the same run-option passthrough.Upstream commit:
4ca093371ebbf42b549093aa73f7788d7b7416a0(microsoft/agent-framework@4ca0933).Ported .NET PRs
Breaking Changes
No. Existing
store=falsebehavior still auto-includes encrypted reasoning content by default; this change only adds a new public opt-out control.Tests and Examples
go test ./provider/openaiprovider ./provider/foundryproviderRunOptionspassthrough with the new option.Notes
DisableStoreOutput) and Carry reasoning EncryptedContent through the OpenAI Responses streaming path for store=false replay #683 (carrying encrypted reasoning content forstore=falsereplay). This PR ports the remaining public control surfaced by .NET #7572 without changing the default behavior.Closes #827