Files
codex/codex-rs
rhan-oai 5be57bedd0 Add scoped host metadata hooks for MCP tool requests (#58395)
## What changed

Expose `McpToolRequestMetaHook` and `McpToolRequestMetaProvider` so hosts can supply a per-invocation `_meta` value using the thread, turn, and call IDs. Apply the hook before dispatch only when the tool, server name, source, and full transport configuration match the selected local MCP registration.

Reject metadata key collisions and propagate provider errors to the tool caller without dispatching the call.

## Testing

Add integration coverage for matching registrations, different contributors and routing headers, unrelated tools and servers, provider failures, and existing metadata keys.

GitOrigin-RevId: 2bf51c375a04617d61b24ca1cbbcaa810fb06720
2026-10-30 17:32:09 +00:00
..
…
…
…
…