mirror of
https://github.com/openai/codex.git
synced 2026-11-14 21:40:39 +00:00
Skip attribution for direct MCP tool calls (#58938)
## Why `CodexThread::call_mcp_tool` returns only the tool result, so computing attribution and creating a cached runtime binding for these calls is unnecessary. ## What changed Add `McpRuntime::latest_call_tool_without_attribution` and use it for direct thread calls. Validate the call, wait for server startup, and dispatch through the latest connections without capturing an attribution binding. ## Testing Extend the runtime binding cache test to verify that a successful call without attribution leaves the cached binding empty. Update the test server to return a successful tool result. GitOrigin-RevId: 898e655d9a0174ddaf71c390757d6fc9a5a61780
This commit is contained in:
@@ -1369,12 +1369,8 @@ impl CodexThread {
|
||||
self.session
|
||||
.services
|
||||
.mcp_runtime
|
||||
.latest_call_tool(
|
||||
server, tool, /*environment_id*/ None, arguments, meta,
|
||||
/*requested_timeout*/ None, /*wait_for_server*/ true,
|
||||
)
|
||||
.latest_call_tool_without_attribution(server, tool, arguments, meta)
|
||||
.await
|
||||
.map(|call| call.result)
|
||||
}
|
||||
|
||||
pub fn enabled(&self, feature: Feature) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user