mirror of
https://github.com/openai/codex.git
synced 2026-05-03 10:56:37 +00:00
[tool_suggest] Improve tool_suggest triggering conditions. (#20091)
## Summary - Tighten `tool_suggest` guidance so it prefers explicit plugin install requests, while still allowing a connector install when the relevant plugin is already installed and a needed connector from that plugin is missing. - Tell the model not to call `tool_suggest` in parallel with other tools. ## Testing - `cargo test -p codex-tools tool_suggest` - `cargo test -p codex-core tool_suggest`
This commit is contained in:
@@ -131,12 +131,13 @@ async fn tool_suggest_is_available_without_search_tool_after_discovery_attempts(
|
||||
|
||||
let description =
|
||||
function_tool_description(&body, TOOL_SUGGEST_TOOL_NAME).expect("description");
|
||||
assert!(
|
||||
description.contains(
|
||||
"You've already tried to find a matching available tool for the user's request"
|
||||
)
|
||||
);
|
||||
assert!(description.contains("This includes `tool_search` (if available) and other means."));
|
||||
assert!(description.contains(
|
||||
"Use this tool only to ask the user to install one known plugin or connector from the list below"
|
||||
));
|
||||
assert!(description.contains(
|
||||
"`tool_search` is not available, or it has already been called and did not find or make the requested tool callable."
|
||||
));
|
||||
assert!(description.contains("IMPORTANT: DO NOT call this tool in parallel with other tools."));
|
||||
assert!(!description.contains("tool_search fails to find a good match"));
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user