Skip to content

fix(responses): strip Google item metadata from native OpenAI requests - #7131

Merged
lidge-jun merged 3 commits into
devfrom
fix/7111-native-responses-item-extensions
Oct 15, 2026
Merged

lidge-jun merged 3 commits into
devfrom
fix/7111-native-responses-item-extensions

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Fix cross-provider tool history replay failing with Unknown parameter: input[N].extra_content when a Google turn falls back to native Codex. The Responses JSON/SSE bridge deliberately emits extra_content.google.thought_signature for Google replay, but the native outbound projection was forwarding that extension unchanged.
  • Remove the known item-level extra_content extension at the shared Responses passthrough builder for OpenAI-operated destinations (canonical ChatGPT Codex and official OpenAI Responses). HTTP, WebSocket creates, HTTP fallback, and concrete combo children share the projection. The direct native /responses/compact send applies the same projection.
  • Keep caller-owned history, Google signature replay, tool arguments/results, other item fields, and arbitrary gateway extensions intact. A general item allowlist would drop new upstream fields and supported gateway extensions; this change targets the demonstrated incompatibility.

Closes #7111

Verification

Independent review round 1 checked the linked issue, all changed files, the destination predicate, HTTP/WS/fallback/combo callers, and the separate native compact send. The latter bypassed the adapter and still forwarded Google metadata on both OpenAI-operated backends; commit 67f28cd5a adds the shared projection there, two handler-level regressions, both layout registrations, and owner/public docs.

  • bun install --frozen-lockfile — passed; no dependency or lockfile changes.
  • bun run typecheck — passed.
  • bun test tests/responses/openai-responses-passthrough.test.ts tests/responses/responses-compaction.test.ts tests/responses/responses-compaction-routing.test.ts tests/responses/responses-native-item-extensions.test.ts tests/responses/responses-native-item-extensions-compact.test.ts tests/adapters/google/google-provider-metadata-roundtrip.test.ts tests/adapters/google/google-signature-history-roundtrip.test.ts — 395 passed, 0 failed.
  • Red/green proof: reverted both original adapter source changes locally to merge base 7640a942b35044c974e534b84d5a8049f4a8ae9a, temporarily omitted only the new helper's import/unit case so the behavior tests could load, and ran bun test tests/responses/responses-native-item-extensions.test.ts: 5 failed / 5 passed, exposing native HTTP/WS and combo leakage. Restored all files afterward. The two new direct-compact regressions also failed on the original PR head and passed with 67f28cd5a; final combined run is the 395-pass command above.
  • bun run structure:check — passed; owner docs remain within their budgets.
  • bun run privacy:scan — passed. No body/key logging or authentication, credential, dependency, or workflow behavior changes.
  • bun test tests/test-layout.test.ts tests/test-layout-tooling.test.ts tests/ci-workflows/file-size-ratchet.test.ts tests/lab/core-lab-boundary.test.ts — 61 passed, 0 failed; includes both layout registrations, file-size ratchet, and core/Lab import and synchronous-activation guards.
  • In docs-site/: bun install --frozen-lockfile and bun run build — passed; 577 pages and 81,200 internal links checked.
  • Upstream contracts checked against Google's thinking guide and OpenAI's published OpenAPI: Google describes signatures as replay metadata; OpenAI uses the same input-item schema for Responses and compact and does not define item-level extra_content. The concrete private Codex rejection evidence remains the error reported in [Provider compatibility] Google extra_content from tool history leaks into native Codex response.create and causes 400 #7111; no claim of a public private-backend specification or live inference probe.
  • Review round 1 did not run bun run test or bun run test:changed, as requested because this machine is shared. Focused adapter/compaction/Google tests are the local scope; broad Ubuntu suites remain for exact-head CI. No macOS/Windows workflows dispatched. Earlier queued test:changed work is not counted as passing evidence.
  • Lane follow-up on original head d4161f6fb4938c1c3b5c2c1010669728e7ddfd1a: the initial bun run test:changed executed no tests because it timed out after 2,700 seconds waiting for the shared test lock. OCX_TEST_NO_QUEUE=1 bun run test:changed --parallel=1 then finished in 802 seconds with 17,670 passed, 35 skipped, 5 failed, 3 errors across 746 files. All 11 new Responses metadata regressions passed. The failures were one CLI export timeout, one headless integration-toggle request assertion, and three live-audio timeouts with three follow-on errors. This run is not passing evidence and does not cover the later compact commit.
  • Failure isolation: bun test tests/cli/cli-headless-parity.test.ts tests/cli/cli-export-command.test.ts tests/cli/cli-access-audio-live.test.ts — 168 passed, 0 failed. The same files through OCX_TEST_NO_QUEUE=1 bun run test --parallel=1 --timeout=60000 tests/cli/cli-headless-parity.test.ts tests/cli/cli-export-command.test.ts tests/cli/cli-access-audio-live.test.ts — 168 passed, 0 failed in 15.8 seconds. The wrapper always sets OCX_TEST_FULL_SUITE=1, raising the audio test's readiness budget to 5,000 ms, equal to Bun's default test timeout; the explicit 60-second timeout gives that existing budget room to finish. The two other broad-run failures did not reproduce in focused wrapper execution; their broader-run cause remains unresolved. These CLI sources, test files and timing helpers are unchanged from the branch merge base. No unrelated harness/source changes or full-suite rerun were made.
  • All signatures and credentials in the fixtures are synthetic. The PR remains draft. Required exact-head CI must finish successfully before merge.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. No authentication, credential, provider-config, dependency, or workflow behavior changed.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the bug Something isn't working label Oct 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@lidge-jun

Copy link
Copy Markdown
Owner Author

Maintainer integration into dev (MAINTAINERS.md dev maintainer-integration policy; batch integration authorized by @lidge-jun on 2026-10-15).

  • Head: 7ea3b67011370eb3a6b548a511e5f097893e7d08 (tree 5ced6b9fac4b9d9b5cb1bae9d888518a85ce119a) = this branch merged with origin/dev ccb9191498.
  • Exact-head evidence: GitHub-hosted Actions for this account have not been assigning runners since 2026-10-15 13:30 UTC, so by owner decision the evidence is a full bun run test (Bun 1.4.3 test runner, root and GUI dependencies installed, GUI built) of this exact tree on a maintainer host (Linux x86_64): exit 1, 7 min, 31 failing test(s), each also failing in the same host's baseline run of dev 60bf4c7 (environment-only): Codex shim install readiness > a refused install exits unsuccessfully and preserves its re, Codex shim install readiness > keeps install advisory when the Codex config cannot be read, Codex shim install readiness > the install command surfaces readiness warnings without lea, GUI pairing client > sends one bodyless origin-bound capability and redacts rejected bodie, Node launcher PATH fallback activation > broken bundle reaches validated PATH Bun, Node launcher PATH fallback activation > inspection bundle reaches validated PATH Bun, Node launcher PATH fallback activation > missing bundle reaches validated PATH Bun, a secondary ensure parent preserves shared Grok, Codex and Claude agent bytes, ….
  • Local gates on the same tree: bun run typecheck, file-size ratchet, test-layout and structure:check.
  • Hosted CI checks for this head may still be queued; they are not claimed as evidence.

@lidge-jun
lidge-jun marked this pull request as ready for review October 15, 2026 18:06
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner October 15, 2026 18:06
@lidge-jun
lidge-jun merged commit 93133af into dev Oct 15, 2026
3 of 4 checks passed
@lidge-jun
lidge-jun deleted the fix/7111-native-responses-item-extensions branch October 15, 2026 18:06
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T18:08:56.366353Z 7ea3b67 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant