feat(responses): add encrypted reasoning replay opt-in - #9004
Closed
jackjinke wants to merge 5 commits into
Closed
Conversation
jackjinke
marked this pull request as ready for review
July 30, 2026 19:18
jackjinke
force-pushed
the
feat/encrypted-reasoning-replay
branch
from
August 2, 2026 16:50
ffe96ce to
7ee824b
Compare
jackjinke
added a commit
to jackjinke/OmniRoute
that referenced
this pull request
Aug 5, 2026
…asoning-replay
Contributor
Author
|
This PR was accidentally closed while cleaning up and recreating my fork. GitHub would not allow it to be reopened, so I recreated it as #9601 with the same implementation rebased onto the latest release/v3.8.50. |
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.
Summary
reasoning.encrypted_contentinput items when enabledencrypted_contentvalues from persisted structured payloads and captured SSE chunks while retaining compact diagnostic markersCloses #9000
Tests
Changed test files:
tests/unit/chatcore-translation-paths.test.tstests/unit/strip-reasoning-blobs-agentic-context-1599.test.tstests/unit/provider-specific-data-schema.test.tstests/unit/request-defaults-store-session.test.tstests/unit/request-log-payloads.test.tstests/unit/ui/edit-connection-modal-free-models.test.tsxCommands run after rebasing onto current
release/v3.8.50:node --import tsx/esm --test tests/unit/strip-reasoning-blobs-agentic-context-1599.test.ts tests/unit/chatcore-translation-paths.test.ts tests/unit/provider-specific-data-schema.test.ts tests/unit/request-defaults-store-session.test.ts tests/unit/executor-codex.test.ts— 133 passednpm exec -- vitest run tests/unit/ui/edit-connection-modal-free-models.test.tsx— 12 passednode --import tsx/esm --import ./open-sse/utils/setupPolyfill.ts --import ./tests/_setup/isolateDataDir.ts --test --test-force-exit tests/unit/request-log-payloads.test.ts— 9 passed./node_modules/.bin/eslint src/lib/logPayloads.ts src/lib/usage/callLogs/format.ts tests/unit/request-log-payloads.test.ts --suppressions-location config/quality/eslint-suppressions.json— passednpm run test:coverage— coverage thresholds passed: 84.35% statements, 84.35% lines, 88.23% functions, 78.64% branches. Unrelated existing suite failures kept command exit nonzero, including provider golden snapshot drift and service-supervisor port adoption.Manual combo validation
Validated one session against a combo containing
gpt-5.6-solandkimi-k3:gpt-5.6-sol; encrypted reasoning content was returned and preserved in client replay history.gpt-5.6-solfrom the combo; the same session switched tokimi-k3and continued successfully. OmniRoute omitted the Codex-only encrypted reasoning item from the non-Responses upstream request while the client retained it.gpt-5.6-sol; the same session switched back and continued successfully with the retained encrypted reasoning available again.This confirms mixed-provider combo switching does not break the session and Codex encrypted reasoning survives a temporary hop through a non-Responses target for reuse when routing returns to Codex.
Context
Inspired by OpenAI's report that retained reasoning and compaction tripled ARC-AGI-3 scores while reducing output tokens: https://openai.com/index/how-two-settings-tripled-our-arc-agi-3-scores/
This PR intentionally adds only user-controlled passthrough for encrypted reasoning already present in request input. It adds no replay cache, stored-response lineage, or server-side compaction policy.