Include tool namespace inventory in turn metadata (#37492)

## What changed

- Add opt-in `tool_namespaces_info` metadata for Responses Lite turns when
  `tool_registry.turn_metadata_includes_tool_info` is enabled.
- Describe each model-visible function's namespace, direct and deferred
  exposure, Code Mode name, and harness or MCP ownership.
- Reject visible namespaces shared by different owners when strict collision
  checking and tool inventory metadata are enabled.
- Keep tool inventories out of compatibility headers and metadata sent to MCP
  servers.

## Testing

- Cover opt-in behavior, MCP exposure details, namespace ownership collisions,
  reserved metadata handling, and Responses Lite request serialization.

GitOrigin-RevId: 6a6965d2ba98e29444fdfbb4ccec6aafcf0391e6
This commit is contained in:
rka-oai authored and copyberry committed 2026-08-07 19:32:15 +00:00
1 parent ba94150c2a
commit 2b1811e562
10 files changed
+504 -7

No files matched your search

+4
View File
@@ -232,6 +232,10 @@ impl CoreToolRuntime for McpHandler {
}))
}
fn mcp_server_name(&self) -> Option<&str> {
Some(&self.tool_info.server_name)
}
fn telemetry_tags(&self, _invocation: &ToolInvocation) -> ToolTelemetryTags {
let mut tags = vec![("mcp_server", self.tool_info.server_name.clone())];
if let Some(origin) = &self.tool_info.server_origin {