mirror of
https://github.com/openai/codex.git
synced 2026-11-08 00:36:31 +00:00
Stop filtering model tools in js_repl_tools_only mode (#12069)
## Summary This change removes tool-list filtering in `js_repl_tools_only` mode and relies on the normal model tool descriptions, while still enforcing that tool execution must go through `js_repl` + `codex.tool(...)`. ## Motivation The previous `js_repl_tools_only` filtering hid most tools from the model request, which diverged from standard tool-list behavior and made signatures less discoverable. I tested that this filtering is not needed, and the model can follow the prompt to only call tools via `js_repl`. ## What Changed - `filter_tools_for_model(...)` in `core/src/tools/spec.rs` is now a pass-through (no filtering when `js_repl_tools_only` is enabled). - Updated tests to assert that model tools are not filtered in `js_repl_tools_only` mode. - Updated dynamic-tool test to assert dynamic tools remain visible in model tool specs. - Removed obsolete test helper used only by the old filtering assertions. ## Safety / Behavior - This commit does **not** relax execution policy. - Direct model tool calls remain blocked in `js_repl_tools_only` mode (except internal `js_repl` tools), and callers are instructed to use `js_repl` + `codex.tool(...)`. ## Testing - `cargo test -p codex-core js_repl_tools_only` - Manual rollout validation showed the model can follow the `js_repl` routing instructions without needing filtered tool lists. #### [git stack](https://github.com/magus/git-stack-cli) - 👉 `1` https://github.com/openai/codex/pull/12069 - ⏳ `2` https://github.com/openai/codex/pull/10673 - ⏳ `3` https://github.com/openai/codex/pull/10670
This commit is contained in:
1 parent
cc3bbd7852
commit
491b4946ae
2 files changed
+1
-105
No files matched your search
@@ -4869,8 +4869,7 @@ async fn run_sampling_request(
|
||||
|
||||
let model_supports_parallel = turn_context.model_info.supports_parallel_tool_calls;
|
||||
|
||||
let tools =
|
||||
crate::tools::spec::filter_tools_for_model(router.specs(), &turn_context.tools_config);
|
||||
let tools = router.specs();
|
||||
let base_instructions = sess.get_base_instructions().await;
|
||||
|
||||
let prompt = Prompt {
|
||||
|
||||
Reference in new issue
Block a user