Skip to content

Add exec output-schema parameter#4079

Merged
pakrym-oai merged 10 commits intomainfrom
pakrym/add-exec-output-schema-parameter
Sep 23, 2025
Merged

Add exec output-schema parameter#4079
pakrym-oai merged 10 commits intomainfrom
pakrym/add-exec-output-schema-parameter

Conversation

@pakrym-oai
Copy link
Copy Markdown
Collaborator

Adds structured output to exec via the --structured-output parameter.

Base automatically changed from pakrym/add-notifier-tests to main September 23, 2025 14:25
@aibrahim-oai
Copy link
Copy Markdown
Collaborator

@codex review this

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. 👍

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, or 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 fix this CI failure" or "@codex address that feedback".

Copy link
Copy Markdown
Collaborator

@aibrahim-oai aibrahim-oai left a comment

Choose a reason for hiding this comment

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

There are some unrelated changes that would be best in a different PR. Some comments about the test assertion. Beside this, awesome work!

Some(&serde_json::Value::String("json_schema".into()))
);
assert_eq!(format.get("strict"), Some(&serde_json::Value::Bool(true)));
assert_eq!(format.get("schema"), Some(&schema));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

wdut about serializing it and having one assert_eq function.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'd rather have detailed asserts here. Will assert the entire thing in exec tests.

Comment thread codex-rs/core/src/codex.rs
Comment thread codex-rs/core/src/codex.rs Outdated
Comment thread codex-rs/core/tests/suite/json_result.rs
Comment thread codex-rs/core/tests/suite/prompt_caching.rs
Comment thread codex-rs/exec/tests/suite/output_schema.rs Outdated
…schema-parameter

# Conflicts:
#	codex-rs/core/src/codex/compact.rs
exec/tests/suite/output_schema.rs: refactor to build schema with serde_json, write as pretty json, and assert full format object equality
@pakrym-oai pakrym-oai merged commit fdb8dad into main Sep 23, 2025
19 checks passed
@pakrym-oai pakrym-oai deleted the pakrym/add-exec-output-schema-parameter branch September 23, 2025 20:59
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants