fix(github-copilot): preserve reasoning ids with encrypted_content#71448
Conversation
Greptile SummaryThis PR adds a targeted guard in Confidence Score: 5/5Safe to merge — minimal, well-scoped fix with direct regression tests. The change is two guarded lines with a clear precondition ( No files require special attention. Reviews (1): Last reviewed commit: "fix(github-copilot): skip id rewrite for..." | Re-trigger Greptile |
5328494 to
f2a24d7
Compare
a9b87c1 to
798c799
Compare
798c799 to
8197623
Compare
8197623 to
f7f4857
Compare
|
Landed via squash merge.
Thanks @a410979729-sys! |
…content (openclaw#71448) Preserve encrypted Copilot Responses reasoning item IDs during replay and harden the live Copilot replay probe. Thanks @a410979729-sys.
…content (openclaw#71448) Preserve encrypted Copilot Responses reasoning item IDs during replay and harden the live Copilot replay probe. Thanks @a410979729-sys.
…content (openclaw#71448) Preserve encrypted Copilot Responses reasoning item IDs during replay and harden the live Copilot replay probe. Thanks @a410979729-sys.
Summary
Fix GitHub Copilot response replay so that
reasoningitems withencrypted_contentdo not have their item ids rewritten by connection-bound id normalization.Problem
Copilot/OpenAI Responses reasoning items can carry
encrypted_contentthat is bound to the original item id.The existing connection-bound id normalization rewrites opaque response item ids before replay. For normal items this is fine, but for
reasoningitems withencrypted_contentit creates an inconsistent payload:rs_<hash>idThis causes provider-side request rejection with errors like:
Fix
Skip connection-bound id rewriting for response items where:
type === "reasoning"encrypted_contentis presentThis keeps the encrypted reasoning block internally consistent while preserving the existing normalization behavior for other item types.
Tests
Added regression coverage for:
reasoningitems withencrypted_contentencrypted_contentis absentLocal verification:
corepack pnpm exec vitest run extensions/github-copilot/connection-bound-ids.test.tsRelated
Addresses #70654
Submitted by Tianji on behalf of the Beidou Five and Joy.