Python: Select Foundry hosting conversation history source - #6
Closed
eavanvalkenburg wants to merge 5 commits into
Closed
Python: Select Foundry hosting conversation history source#6eavanvalkenburg wants to merge 5 commits into
eavanvalkenburg wants to merge 5 commits into
Conversation
…ock.MEAI (microsoft#7983) * `AWSSDK.Extensions.Bedrock.MEAI` -> `AWS.Bedrock.MEAI` * Update `AgentWithMemory_Step03_MemoryUsingValkey_Bedrock` project
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a4c73599-9f66-4c22-bd66-96fe676e0ce6
eavanvalkenburg
had a problem deploying
to
github-app-auth
September 1, 2026 15:59 — with
GitHub Actions
Failure
eavanvalkenburg
had a problem deploying
to
github-app-auth
September 1, 2026 15:59 — with
GitHub Actions
Failure
eavanvalkenburg
had a problem deploying
to
integration
September 1, 2026 15:59 — with
GitHub Actions
Error
eavanvalkenburg
had a problem deploying
to
integration
September 1, 2026 15:59 — with
GitHub Actions
Error
eavanvalkenburg
had a problem deploying
to
github-app-auth
September 1, 2026 15:59 — with
GitHub Actions
Failure
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a4c73599-9f66-4c22-bd66-96fe676e0ce6
eavanvalkenburg
had a problem deploying
to
github-app-auth
September 1, 2026 16:03 — with
GitHub Actions
Failure
eavanvalkenburg
temporarily deployed
to
integration
September 1, 2026 16:05 — with
GitHub Actions
Inactive
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a4c73599-9f66-4c22-bd66-96fe676e0ce6
eavanvalkenburg
had a problem deploying
to
github-app-auth
September 1, 2026 16:18 — with
GitHub Actions
Failure
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a4c73599-9f66-4c22-bd66-96fe676e0ce6
eavanvalkenburg
had a problem deploying
to
github-app-auth
September 1, 2026 19:02 — with
GitHub Actions
Failure
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
Foundry-hosted Responses agents can restore a downstream service conversation ID while also replaying the complete AgentServer response transcript. The model then receives duplicated history, and the duplication compounds on each turn. Always disabling downstream storage avoids that defect but introduces a measured multi-second streaming delay on the Foundry project endpoint and prevents applications from using their normal Agent history configuration.
This change makes the model-history source explicit while retaining AgentServer response persistence and session storage as independent concerns.
Description & Review Guide
history_source="agent_server" | "agent"toResponsesHostServer. The default AgentServer mode replays response-provider history, forces downstreamstore=False, clears stale service IDs, rejects conflicting history/default conversation configuration, and refuses to persist a session if a client still stores downstream. Agent mode passes only current request input and preserves normalAgenthistory-provider and service-storage behavior. The PR also adds focused regression coverage, package documentation, and ADR 0039 with the considered alternatives and latency evidence.InMemoryHistoryProviderpersisted throughFoundryAgentSessionStore, or an external history provider can explicitly selecthistory_source="agent".service_session_id, and whether the two-value API communicates that distinction clearly.Related Issue
Fixes microsoft#7955
The earlier PR microsoft#7957 was closed unmerged for design discussion; there is no other open PR for this issue.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and the title prefix in sync automatically.