mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +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:
@@ -10,9 +10,9 @@ pub struct ToolRegistryConfigToml {
|
||||
/// Fail the turn when multiple tools share the same effective name.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub error_on_tool_collisions: Option<bool>,
|
||||
/// Include the resolved tool namespace inventory in per-turn request metadata.
|
||||
/// Include authoritative tool information in request metadata.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub include_tool_namespaces_info: Option<bool>,
|
||||
pub include_tool_metadata: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, Default, PartialEq, Eq, JsonSchema)]
|
||||
|
||||
@@ -30,7 +30,7 @@ fn under_development_features_are_disabled_by_default() {
|
||||
#[test]
|
||||
fn tool_registry_config_is_not_a_feature_toggle() {
|
||||
let features: FeaturesToml = toml::from_str(
|
||||
"[tool_registry]\nerror_on_tool_collisions = true\ninclude_tool_namespaces_info = true\n",
|
||||
"[tool_registry]\nerror_on_tool_collisions = true\ninclude_tool_metadata = true\n",
|
||||
)
|
||||
.expect("tool registry settings should deserialize");
|
||||
|
||||
@@ -38,7 +38,7 @@ fn tool_registry_config_is_not_a_feature_toggle() {
|
||||
features.tool_registry,
|
||||
Some(crate::ToolRegistryConfigToml {
|
||||
error_on_tool_collisions: Some(true),
|
||||
include_tool_namespaces_info: Some(true),
|
||||
include_tool_metadata: Some(true),
|
||||
})
|
||||
);
|
||||
assert!(features.entries().is_empty());
|
||||
@@ -554,7 +554,7 @@ fn materialize_resolved_enabled_writes_all_features_and_preserves_custom_config(
|
||||
let mut features_toml = FeaturesToml {
|
||||
tool_registry: Some(crate::ToolRegistryConfigToml {
|
||||
error_on_tool_collisions: Some(true),
|
||||
include_tool_namespaces_info: Some(true),
|
||||
include_tool_metadata: Some(true),
|
||||
}),
|
||||
code_mode_host: Some(FeatureToml::Config(crate::CodeModeHostConfigToml {
|
||||
enabled: Some(false),
|
||||
@@ -587,7 +587,7 @@ fn materialize_resolved_enabled_writes_all_features_and_preserves_custom_config(
|
||||
features_toml.tool_registry,
|
||||
Some(crate::ToolRegistryConfigToml {
|
||||
error_on_tool_collisions: Some(true),
|
||||
include_tool_namespaces_info: Some(true),
|
||||
include_tool_metadata: Some(true),
|
||||
})
|
||||
);
|
||||
let entries = features_toml.entries();
|
||||
|
||||
Reference in New Issue
Block a user