Skip to content

feat(runtime): add reasoning replay feature flag - #12486

Merged
diegosouzapw merged 14 commits into
cheaper-inference:release/v3.8.52from
jacobsparts:feat/reasoning-replay-toggle
Oct 8, 2026
Merged

diegosouzapw merged 14 commits into
cheaper-inference:release/v3.8.52from
jacobsparts:feat/reasoning-replay-toggle

Conversation

@jacobsparts

Copy link
Copy Markdown
Contributor

Summary

Adds a default-enabled runtime feature flag for Reasoning Replay.

When REASONING_REPLAY_ENABLED is disabled, the shared cache service skips reasoning writes and lookups. Provider/model detection and protocol shaping remain unchanged.

Scope

  • Register REASONING_REPLAY_ENABLED under Runtime settings
  • Gate the shared cache write and lookup functions
  • Add one focused disabled-state test
  • Add the description key to all 43 locale catalogs
  • Add a changelog fragment

The default remains enabled, so existing behavior is unchanged.

Validation

  • Feature-flag tests: 54/54
  • Reasoning Replay tests: 62/62
  • Core typecheck
  • Touched-file ESLint
  • UI locale-key coverage
  • Prettier
  • JSON validation for all locale catalogs
  • git diff --check

Keep the reasoning-replay feature flag on the current tip. Drop
src/i18n/messages/in.json to match the locale catalog. Move the disable-path
test out of the frozen reasoning-cache suite, wrap lookupReasoning so the flag
guard does not add cognitive complexity, and lock the flag's on-by-default value.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Clean, well-scoped feature flag addition — defaulting to "true" keeps current behavior
unchanged, the gate placement in cacheReasoningByKey()/lookupReasoning() is correct, and the
i18n coverage is thorough. CI shows the flag conflicts with the base (likely from recent locale
merges) — could you rebase onto the current release/v3.8.51 tip? Also flagging for the
maintainer: there are two other open PRs touching reasoning replay (#13031, #12688) that should
probably be checked against this new flag before all three land.

jacobsparts and others added 7 commits September 15, 2026 15:28
…-settings test

The EXPECTED_FEATURE_FLAG_COUNT assertion conflicted with newly merged
locale/i18n changes from the release tip; resolved to 58 (57 on tip +
REASONING_REPLAY_ENABLED added by this PR).

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
…r locales

The release branch now ships 66 locales; the merge brought in 24 locale
files that predate this PR, so featureFlagReasoningReplayEnabledDescription
existed in only 42 of them. Mirror the English text into the remaining 24
so the UI key coverage gate stays green.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
…soning-replay-toggle

# Conflicts:
#	src/i18n/messages/ar.json
#	src/i18n/messages/az.json
#	src/i18n/messages/bg.json
#	src/i18n/messages/bn.json
#	src/i18n/messages/cs.json
#	src/i18n/messages/da.json
#	src/i18n/messages/de.json
#	src/i18n/messages/es.json
#	src/i18n/messages/fa.json
#	src/i18n/messages/fi.json
#	src/i18n/messages/fr.json
#	src/i18n/messages/gu.json
#	src/i18n/messages/he.json
#	src/i18n/messages/hi.json
#	src/i18n/messages/hu.json
#	src/i18n/messages/id.json
#	src/i18n/messages/it.json
#	src/i18n/messages/ja.json
#	src/i18n/messages/ko.json
#	src/i18n/messages/mr.json
#	src/i18n/messages/ms.json
#	src/i18n/messages/nl.json
#	src/i18n/messages/no.json
#	src/i18n/messages/phi.json
#	src/i18n/messages/pl.json
#	src/i18n/messages/pt.json
#	src/i18n/messages/ro.json
#	src/i18n/messages/ru.json
#	src/i18n/messages/sk.json
#	src/i18n/messages/sv.json
#	src/i18n/messages/sw.json
#	src/i18n/messages/ta.json
#	src/i18n/messages/te.json
#	src/i18n/messages/th.json
#	src/i18n/messages/tr.json
#	src/i18n/messages/uk-UA.json
#	src/i18n/messages/ur.json
#	src/i18n/messages/zh-CN.json
#	src/i18n/messages/zh-TW.json
#	tests/unit/feature-flags-settings.test.ts
…soning-replay-toggle

# Conflicts:
#	tests/unit/feature-flags-settings.test.ts
@jacobsparts

Copy link
Copy Markdown
Contributor Author

Updated this branch to the current release/v3.8.51 tip (83fa4328); PR head is 9299dde4c and GitHub reports it mergeable. I also added the newly required feature-flag catalog row/count updates; the focused docs/flag/replay suite passes 77/77 locally, along with core typecheck, ESLint, Prettier, and the new-code complexity check.

The remaining red checks reproduce on the base/current upstream state (API-route baseline drift, docs-count drift, frozen chat-pipeline.test.ts size, and unrelated unit failures); the Reasoning Replay and flag-count tests pass. Compatibility check: #12688 merges cleanly; #13031's production changes merge cleanly, with only its generated file-size baseline needing mechanical resolution if it lands first.

@diegosouzapw diegosouzapw added the deferred-v3.8.52 Grande demais / suspeito para o lote atual; precisa de sessão dedicada no ciclo v3.8.52 label Sep 25, 2026
@diegosouzapw diegosouzapw changed the title feat(runtime): add reasoning replay feature flag [defer] feat(runtime): add reasoning replay feature flag Sep 25, 2026
@diegosouzapw
diegosouzapw changed the base branch from release/v3.8.51 to release/v3.8.52 September 29, 2026 11:28
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Re-homed to release/v3.8.52: v3.8.51 entered its release freeze, so the branch now belongs to the release captain and development continues on the next cycle. Nothing is wrong with this PR — it just needed a live base. No action needed from you; CI will re-run against the new base.

@diegosouzapw diegosouzapw changed the title [defer] feat(runtime): add reasoning replay feature flag feat(runtime): add reasoning replay feature flag Oct 1, 2026
@diegosouzapw diegosouzapw removed the deferred-v3.8.52 Grande demais / suspeito para o lote atual; precisa de sessão dedicada no ciclo v3.8.52 label Oct 1, 2026
jacobsparts and others added 5 commits October 7, 2026 21:24
Keep unique REASONING_REPLAY_ENABLED flag, i18n key, and changelog
fragment. Take tip translations for existing keys. Snapshot live
catalog at 83 flags.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
Replace __MISSING__ markers with locale translations so the new-key
coverage gate accepts the unique reasoning-replay flag.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
# Conflicts:
#	tests/unit/feature-flags-settings.test.ts
#	tests/unit/server-owned-tool-loop-flag.test.ts
…r behavior

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
@diegosouzapw
diegosouzapw merged commit 03d4cf4 into cheaper-inference:release/v3.8.52 Oct 8, 2026
20 of 41 checks passed
@jacobsparts
jacobsparts deleted the feat/reasoning-replay-toggle branch October 9, 2026 15:00
@diegosouzapw diegosouzapw mentioned this pull request Oct 18, 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.

2 participants