feat: add beta_supported_tools (#4669)

Gate the new read_file tool behind a new `beta_supported_tools` flag and
only enable it for `gpt-5-codex`
This commit is contained in:
jif-oai
2025-10-03 17:58:03 +01:00
committed by GitHub
parent 153338c20f
commit e0b38bd7a2
3 changed files with 57 additions and 27 deletions

View File

@@ -111,14 +111,21 @@ async fn model_selects_expected_tools() {
let codex_tools = collect_tool_identifiers_for_model("codex-mini-latest").await;
assert_eq!(
codex_tools,
vec!["local_shell".to_string(), "read_file".to_string()],
vec!["local_shell".to_string()],
"codex-mini-latest should expose the local shell tool",
);
let o3_tools = collect_tool_identifiers_for_model("o3").await;
assert_eq!(
o3_tools,
vec!["shell".to_string(), "read_file".to_string()],
vec!["shell".to_string()],
"o3 should expose the generic shell tool",
);
let gpt5_codex_tools = collect_tool_identifiers_for_model("gpt-5-codex").await;
assert_eq!(
gpt5_codex_tools,
vec!["shell".to_string(), "read_file".to_string()],
"gpt-5-codex should expose the beta read_file tool",
);
}