mirror of
https://github.com/openai/codex.git
synced 2026-11-22 15:15:18 +00:00
Rename the tool registry metadata setting (#37400)
## What changed Rename `features.tool_registry.include_tool_namespaces_info` to `features.tool_registry.include_tool_metadata` across configuration parsing, schema generation, resolved configuration locking, and tests. Update its description to cover authoritative tool information in request metadata. GitOrigin-RevId: 93b404483b71fed04031d767a41ac2bb70b836b2
This commit is contained in:
1 parent
4ee41929ea
commit
c87a218bd3
7 files changed
+22
-22
No files matched your search
@@ -574,7 +574,7 @@ disable_in_process_fallback = true
|
||||
async fn load_config_resolves_tool_registry_config() -> std::io::Result<()> {
|
||||
let codex_home = tempdir()?;
|
||||
|
||||
for (config_toml, error_on_tool_collisions, include_tool_namespaces_info) in [
|
||||
for (config_toml, error_on_tool_collisions, include_tool_metadata) in [
|
||||
("", false, false),
|
||||
(
|
||||
"[features.tool_registry]\nerror_on_tool_collisions = true\n",
|
||||
@@ -582,7 +582,7 @@ async fn load_config_resolves_tool_registry_config() -> std::io::Result<()> {
|
||||
false,
|
||||
),
|
||||
(
|
||||
"[features.tool_registry]\ninclude_tool_namespaces_info = true\n",
|
||||
"[features.tool_registry]\ninclude_tool_metadata = true\n",
|
||||
false,
|
||||
true,
|
||||
),
|
||||
@@ -601,8 +601,8 @@ async fn load_config_resolves_tool_registry_config() -> std::io::Result<()> {
|
||||
error_on_tool_collisions
|
||||
);
|
||||
assert_eq!(
|
||||
config.tool_registry.include_tool_namespaces_info,
|
||||
include_tool_namespaces_info
|
||||
config.tool_registry.include_tool_metadata,
|
||||
include_tool_metadata
|
||||
);
|
||||
assert!(!config.features.enabled(Feature::CodeMode));
|
||||
}
|
||||
|
||||
@@ -1115,8 +1115,8 @@ pub struct Config {
|
||||
pub struct ToolRegistryConfig {
|
||||
/// Fail the turn when multiple tools share the same effective name.
|
||||
pub error_on_tool_collisions: bool,
|
||||
/// Include the resolved tool namespace inventory in per-turn request metadata.
|
||||
pub include_tool_namespaces_info: bool,
|
||||
/// Include authoritative tool information in request metadata.
|
||||
pub include_tool_metadata: bool,
|
||||
}
|
||||
|
||||
const DEFAULT_CODE_MODE_EXEC_YIELD_TIME_MS: u64 = 30_000;
|
||||
@@ -3719,11 +3719,11 @@ impl Config {
|
||||
.and_then(|features| features.tool_registry.as_ref())
|
||||
.and_then(|config| config.error_on_tool_collisions)
|
||||
.unwrap_or_default(),
|
||||
include_tool_namespaces_info: cfg
|
||||
include_tool_metadata: cfg
|
||||
.features
|
||||
.as_ref()
|
||||
.and_then(|features| features.tool_registry.as_ref())
|
||||
.and_then(|config| config.include_tool_namespaces_info)
|
||||
.and_then(|config| config.include_tool_metadata)
|
||||
.unwrap_or_default(),
|
||||
};
|
||||
let code_mode = resolve_code_mode_config(&cfg);
|
||||
|
||||
Reference in new issue
Block a user