Skip to content

fix(tool): support Codex web search GPT-5.6 Responses-Lite models#5288

Open
roboomp wants to merge 1 commit into
mainfrom
farm/81a2f99a/codex-web-search-gpt-5-6-lite
Open

fix(tool): support Codex web search GPT-5.6 Responses-Lite models#5288
roboomp wants to merge 1 commit into
mainfrom
farm/81a2f99a/codex-web-search-gpt-5-6-lite

Conversation

@roboomp

@roboomp roboomp commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Repro

With PI_CODEX_WEB_SEARCH_MODEL=gpt-5.6-luna, a mocked searchCodex call against packages/coding-agent/src/web/search/providers/codex.ts captured a /backend-api/codex/responses request that still had top-level tools, tool_choice, and instructions, began input with the user message, and omitted x-openai-internal-codex-responses-lite: true. The default model preference chain also started at gpt-5.5, so default Codex web search never tried Luna, Terra, or Sol first.

Cause

packages/coding-agent/src/web/search/providers/codex.ts hard-coded DEFAULT_MODEL_PREFERENCES to GPT-5.5-and-older models and built one classic Responses request body in callCodexSearch for every model. The provider never consulted bundled Codex model metadata, so useResponsesLite: true on the GPT-5.6 catalog entries could not affect request encoding.

Fix

  • Added GPT-5.6 Luna, Terra, and Sol to the Codex web-search default preference chain before GPT-5.5.
  • Resolved bundled Codex model metadata for default and explicit PI_CODEX_WEB_SEARCH_MODEL requests, including validated <model>:<effort> suffixes.
  • Switched only useResponsesLite models to developer additional_tools, developer instructions, Responses-Lite headers, Codex compatibility metadata, and reasoning.context=all_turns; classic models keep the existing top-level tools, tool_choice, and instructions shape.
  • Added focused regression coverage for GPT-5.6 default ordering, default fallback, explicit override behavior, Responses-Lite encoding, effort suffixes, and classic GPT-5.4 shape preservation.
  • Added a packages/coding-agent/CHANGELOG.md entry for the fix.

Verification

bun test packages/coding-agent/test/tools/web-search-codex.test.ts passed: 14 pass, 0 fail, 54 expect() calls. bun run check:ts passed across the TypeScript workspaces. bun check fails on main for an unrelated Rust formatting diff in crates/pi-ast/src/ops.rs; git diff --name-only origin/main..HEAD -- crates/pi-ast/src/ops.rs is empty, so the pre-publish gate was skipped. Fixes #5286

- Added GPT-5.6 Luna, Terra, and Sol to the Codex web-search default model preference chain.
- Encoded catalogued Responses-Lite Codex web-search requests with developer additional_tools, compatibility metadata, and the lite header while keeping classic models on the existing shape.
- Covered default fallback, explicit override, Responses-Lite shape, and reasoning-effort suffix behavior.

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

Labels

vouched Passed the vouch gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codex web search omits GPT-5.6 defaults and Responses-Lite request handling

1 participant