Skip to content

feat(responses): add encrypted reasoning replay opt-in - #9601

Closed
jackjinke wants to merge 0 commit into
diegosouzapw:release/v3.8.50from
jackjinke:feat/encrypted-reasoning-replay-recreated
Closed

feat(responses): add encrypted reasoning replay opt-in#9601
jackjinke wants to merge 0 commit into
diegosouzapw:release/v3.8.50from
jackjinke:feat/encrypted-reasoning-replay-recreated

Conversation

@jackjinke

@jackjinke jackjinke commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a default-off connection toggle for encrypted OpenAI Responses reasoning replay
  • apply the selected connection policy to Codex, first-party OpenAI, and OpenAI-compatible Responses upstreams, including combo targets
  • preserve only self-contained reasoning.encrypted_content input items when enabled
  • always remove stored item references and sanitize server-generated response item IDs
  • validate and normalize the persisted setting
  • place the replay toggle with connection-level controls, immediately above Disable cooldown for this connection
  • omit opaque encrypted_content values from persisted structured payloads and captured SSE chunks while retaining compact diagnostic markers

Recreates #9004, which was accidentally closed and could not be reopened.

Closes #9000

Tests

Test files included from the original PR:

  • tests/unit/chatcore-translation-paths.test.ts
  • tests/unit/strip-reasoning-blobs-agentic-context-1599.test.ts
  • tests/unit/provider-specific-data-schema.test.ts
  • tests/unit/request-defaults-store-session.test.ts
  • tests/unit/request-log-payloads.test.ts
  • tests/unit/ui/edit-connection-modal-free-models.test.tsx

The original PR's validation and coverage details remain available in #9004.

Manual combo validation

Validated one session against a combo containing gpt-5.6-sol and kimi-k3:

  1. Initial turns routed to gpt-5.6-sol; encrypted reasoning content was returned and preserved in client replay history.
  2. Removed gpt-5.6-sol from the combo; the same session switched to kimi-k3 and continued successfully. OmniRoute omitted the Codex-only encrypted reasoning item from the non-Responses upstream request while the client retained it.
  3. Restored 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.

@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks for the PR. Please address the mandatory items (tests and/or merge blockers) in this branch, then rerun checks before /merge-prs.

3 similar comments
@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks for the PR. Please address the mandatory items (tests and/or merge blockers) in this branch, then rerun checks before /merge-prs.

@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks for the PR. Please address the mandatory items (tests and/or merge blockers) in this branch, then rerun checks before /merge-prs.

@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks for the PR. Please address the mandatory items (tests and/or merge blockers) in this branch, then rerun checks before /merge-prs.

@diegosouzapw

Copy link
Copy Markdown
Owner

Obrigado pelo PR. Mantive a revisão de fix-in-place e não foi possível concluir o ajuste completo aqui:

  • Para os PRs em fork: não consigo aplicar push de correção diretamente na sua branch.
    Por favor, faça um rebase/sync com release/v3.8.50, resolva conflitos se houver, e rode os checks dessa branch.
    Se preferir, posso aplicar a correção na próxima rodada assim que você mandar o branch atualizado ou confirmar que o PR está limpo pra esse merge.

@mergify

mergify Bot commented Aug 11, 2026

Copy link
Copy Markdown

⚠️ The sha of the head commit of this PR conflicts with #8875. Mergify cannot evaluate rules on this PR. Once #8875 is merged or closed, Mergify will resume processing this PR. ⚠️

@diegosouzapw diegosouzapw mentioned this pull request Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(api): opt-in encrypted reasoning replay for Responses providers

2 participants