Repository navigation
[apply_patch] freeform apply_patch tool - #2576
Conversation
|
Summary
Review
Overall, looks solid and thoughtfully modularized. Please ensure |
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
Reply with @codex fix comments to fix any unresolved comments.
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".
| SandboxPolicy::ReadOnly, | ||
| true, | ||
| model_family.uses_apply_patch_tool, | ||
| false, |
There was a problem hiding this comment.
In a follow up, perhaps ToolsConfig::new() should take a struct instead of these args because it's not self-documenting this way.
There was a problem hiding this comment.
Agreed - I have a separate branch in progress that simplifies this so we don't end up with an infinite list of tool booleans floating around our config
| Ok(()) | ||
| } | ||
|
|
||
| #[cfg(not(target_os = "windows"))] |
There was a problem hiding this comment.
Why doesn't this test work on Windows?
There was a problem hiding this comment.
These tests seem to hang indefinitely on windows for reasons I can't quite figure out. But none of our apply_patch tool logic actually changes this package, the tests just exist in here for convenience (being able to actually invoke the apply_patch binary trick). We should fix but haven't had a chance to investigate deeply yet.
25999c1 to
3264e8a
Compare
3264e8a to
f775e83
Compare
Summary
GPT-5 introduced the concept of custom tools, which allow the model to send a raw string result back, simplifying json-escape issues. We are migrating gpt-5 to use this by default.
However, gpt-oss models do not support custom tools, only normal functions. So we keep both tool definitions, and provide whichever one the model family supports.
Testing