Skip to content

🤖 feat: default Grok Responses to store=false for ZDR parity - #3807

Merged
ammario merged 6 commits into
mainfrom
grok-zdr-1147
Aug 6, 2026
Merged

🤖 feat: default Grok Responses to store=false for ZDR parity#3807
ammario merged 6 commits into
mainfrom
grok-zdr-1147

Conversation

@ammar-agent

@ammar-agent ammar-agent commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Make Grok 4.5 ZDR-safe by default (store: false on Responses) so ZDR and non-ZDR orgs share one code path and quality bar—without expanding settings surface. Keep encrypted reasoning round-trip so multi-turn tool use stays coherent without server storage.

Background

xAI Grok 4.5 Responses defaults to store: true. ZDR orgs reject that unless store: false is sent. Mux already resends full history explicitly and can persist encrypted reasoning client-side, so server storage is unnecessary for quality.

A separate xAI “Response storage” toggle would work but expands config surface and invites ZDR/non-ZDR quality divergence. Prefer one hard-coded path.

Implementation

  • Default store: false for Grok 4.5 in buildProviderOptions and factory request injection (explicit override still allowed for tests/escapes).
  • No xAI store settings UI/config field — removed the toggle and providers.jsonc schema field.
  • Encrypted reasoning persistence (from prior commits) remains: stream start/delta/end metadata (itemId + reasoningEncryptedContent) is stored on reasoning parts for replay under store=false.
  • OpenAI store toggle unchanged (still optional ZDR config for OpenAI).

Validation

  • make typecheck / make static-check
  • Unit: provider options defaults, factory outbound body asserts store: false + include: reasoning.encrypted_content
  • Integration (CI / TEST_INTEGRATION=1 + XAI_API_KEY): multi-turn Grok test asserts encrypted reasoning in history after turn 1 and successful continuity on turn 2 under store: false

Risks

  • Low: Grok 4.5 no longer relies on xAI server-side response storage. Quality depends on encrypted-reasoning persistence (covered by unit + real-API multi-turn test). Legacy non-Grok-4.5 xAI chat models are unchanged.

Generated with mux • Model: xai:grok-4.5 • Thinking: high • Cost: $8.62

Wire store=false through xAI provider config/options/UI and preserve
encrypted reasoning metadata so multi-turn Grok quality matches non-ZDR.
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ce9c040e42

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/features/Settings/Sections/ProvidersSection.tsx Outdated
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed the P1: xAI (and OpenAI) response-storage toggles now persist via setProviderConfig before optimistic UI update, with refresh on failure — same pattern as xAI processing mode.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 14c0d355e4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

ZDR and non-ZDR share one Grok Responses path (store=false + encrypted
reasoning). Drop the xAI store toggle and add multi-turn real-API coverage.
@ammar-agent ammar-agent changed the title 🤖 feat: support xAI Grok ZDR with encrypted reasoning parity 🤖 feat: default Grok Responses to store=false for ZDR parity Aug 5, 2026
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Follow-up:

  1. Removed xAI store settings surface entirely.
  2. Grok 4.5 always uses store=false (ZDR/non-ZDR same path).
  3. Added real-API multi-turn integration test that asserts encrypted reasoning is persisted and second turn continues under store=false.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e1c865444d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/node/services/providerModelFactory.ts
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

Addressed P1: extracted injectGrok45StoreDefault and apply it for both direct xAI and gateway-routed xai/* Grok 4.5 models so headless callers without providerOptions stay ZDR-safe.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 431938eac7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ammario
ammario merged commit dd9cd5f into main Aug 6, 2026
21 of 22 checks passed
@ammario
ammario deleted the grok-zdr-1147 branch August 6, 2026 02:35
@ammar-agent

Copy link
Copy Markdown
Collaborator Author

Pixel review investigation

Looked into the pending Pixel / Review status on this PR:

  1. Not caused by product UI from this PR. The only browser change here was OpenAI store-toggle save sequencing. ProvidersSection stories are explicitly PIXEL_DISABLED, so they are not snapshotted.
  2. Systemic pending reviews. Many open PRs currently show 2–109 snapshots awaiting review; main’s latest Pixel build is clean (368 snapshots approved via auto-review).
  3. This PR head build (🤖 fix: improve web_fetch HTTP error reporting with body parsing #747) is pre-merge. The PR is already on main; lingering pending status is historical on the PR head SHA.
  4. Auth wall. Pixel UI requires GitHub org sign-in, so the exact 5 story names could not be scraped non-interactively.

Follow-up hardening (stories only, no product UI): #3810

@mux-bot mux-bot Bot mentioned this pull request Aug 6, 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