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

+5
View File
@@ -66,6 +66,11 @@ pub(crate) trait CoreToolRuntime: ToolExecutor<ToolInvocation> {
None
}
/// Returns the owning server only for MCP-backed tool runtimes.
fn mcp_server_name(&self) -> Option<&str> {
None
}
fn matches_kind(&self, payload: &ToolPayload) -> bool {
matches!(
payload,