feat(tools): collapse const-union enums in tool schemas (#10577)

Co-authored-by: Filip Kujawa <filip.j.kujawa@gmail.com>
This commit is contained in:
Michael Neale
2026-07-30 02:13:53 +10:00
committed by GitHub
parent 13e9dbef2f
commit ca6ba6c448
3 changed files with 1076 additions and 0 deletions
@@ -1438,6 +1438,13 @@ impl ExtensionManager {
tool.name = public_name.into();
tool.meta = Some(rmcp::model::Meta(meta_map));
let mut schema = (*tool.input_schema).clone();
if super::tool_schema_normalize::normalize_input_schema(
&mut schema,
) {
tool.input_schema = Arc::new(schema);
}
tools.push(tool);
}
}
+1
View File
@@ -19,6 +19,7 @@ pub(crate) mod subagent_handler;
pub(crate) mod subagent_task_config;
mod tool_confirmation_router;
mod tool_execution;
mod tool_schema_normalize;
pub mod types;
pub mod validate_extensions;
File diff suppressed because it is too large Load Diff