Skip to content

fix: support opt-in JSON validation for Codex tool parameters - #6067

Merged
seratch merged 1 commit into
mainfrom
fix/codex-parameter-validation-mode
Nov 18, 2026
Merged

seratch merged 1 commit into
mainfrom
fix/codex-parameter-validation-mode

Conversation

@seratch

@seratch seratch commented Nov 17, 2026

Copy link
Copy Markdown
Member

This pull request adds parameter_validation_mode="json" to the experimental Codex tool. Strict Pydantic models can accept JSON arrays for tuple fields and strings for enum fields. Existing tools retain Python-mode validation by default.

Fixes #6057

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T22:36:12.011911Z ec2646b PR opened
🔒 Security Review ✅ Completed 2026-11-17T22:36:50.823618Z ec2646b PR opened
ℹ️ 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.

@jbeckwith-oai jbeckwith-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed commit ec2646b6f0567eac183c7156c29b184b1a41bf38. Approved; no actionable findings.

The explicit JSON-validation option uses Pydantic's existing JSON entry point while preserving Python-mode validation by default. Reviewed mapping/dataclass/keyword precedence, construction-time rejection of invalid modes, strict tuple/enum inputs, normalization and thread routing, validation-before-side-effects, single validator invocation, and redacted versus diagnostic error causes/contexts. The new tests exercise successful invocation and rejected input without starting or resuming a thread. Independent static review reached the same conclusion.

Hosted checks at review: {'SUCCESS': 21, 'IN_PROGRESS': 3}. Static review only; no candidate code or local tests executed.

@seratch
seratch added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 54492d1 Nov 18, 2026
26 checks passed
@seratch
seratch deleted the fix/codex-parameter-validation-mode branch November 18, 2026 00:57
@openai-sdks openai-sdks Bot mentioned this pull request Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Experimental Codex tool validates JSON parameters in Python mode, so strict parameters are rejected

2 participants