{{ message }}
Repository navigation
chat: preserve conversation ID for Agent Host BYOK requests - #341450
Merged
Vritant Bhardwaj (vritant24) merged 1 commit intoOct 14, 2026
Merged
Vritant Bhardwaj (vritant24) merged 1 commit into
Vritant Bhardwaj (vritant24) merged 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused implementation preserves existing options and is covered across the affected proxy and renderer boundaries.
0 open findings
What changed in this PR
Preserves Agent Host BYOK session identity through the language-model bridge so Responses providers can generate stable prompt-cache keys.
Changes:
- Adds
_conversationIdwhile retaining existing model options. - Tests repeated requests, distinct sessions, continuations, and renderer forwarding.
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Vritant Bhardwaj (vritant24)
enabled auto-merge
October 14, 2026 04:52
Vritant Bhardwaj (vritant24)
approved these changes
Oct 14, 2026
Nick Trogh (ntrogh)
approved these changes
Oct 14, 2026
Aiday Marlen Kyzy (aiday-mar)
approved these changes
Oct 14, 2026
Vritant Bhardwaj (vritant24)
merged commit Oct 14, 2026
0d01f15
into
microsoft:main
35 checks passed
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.

Why
43f74c4 fixed #332031 by passing
_conversationIdto extension-provided models for prompt caching. The Agent Host BYOK proxy already has the SDK session ID, but drops it before reaching the provider.This forwards that ID through the existing
modelOptions._conversationId, preserving the other model options. Regression tests cover repeated requests, separate sessions, tool continuations, and forwarding to the language model service.Related: #337203 proposes a public session-ID API alongside request middleware. This patch uses the existing private field.
Testing
The proxy, Responses translation, and renderer handler suites pass (56 tests), as does lint on the changed files. Run them with
./scripts/test.sh --runGlob '**/{byokLmProxyService,byokResponsesTranslation,agentHostByokLmHandler}.test.js'after building client output.