mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Encapsulate executed tool call metadata recording (#44002)
## What changed Introduce `ExecutedToolCalls` to own optional shared recorder state and centralize feature checks, call recording, and accepted result source lookup. Update session, tool runtime, MCP, and Code Mode callers to use this interface. Move prompt attachment, retry handling, and metadata budgeting into the `request_metadata` module, preserving existing recording and request behavior. ## Testing Add coverage for all session and turn feature combinations, lazy result source lookup, and unchanged prompts when recording is disabled. Retain the existing metadata budget and cell completeness tests in the new module. GitOrigin-RevId: bc19f34317232b6599c7ec71c15db4a80123ff6f
This commit is contained in:
1 parent
b831057106
commit
0d46c252b3
16 files changed
+450
-299
No files matched your search
@@ -14,7 +14,7 @@ use crate::exec_policy::ExecPolicyManager;
|
||||
use crate::guardian::GuardianRejectionCircuitBreaker;
|
||||
use crate::mcp::McpManager;
|
||||
use crate::mcp_tool_exposure::McpHandlerCache;
|
||||
use crate::tools::ExecutedToolCallRecorder;
|
||||
use crate::tools::ExecutedToolCalls;
|
||||
use crate::tools::code_mode::CodeModeService;
|
||||
use crate::tools::handlers::ToolSearchHandlerCache;
|
||||
use crate::tools::network_approval::NetworkApprovalService;
|
||||
@@ -95,7 +95,7 @@ pub(crate) struct SessionServices {
|
||||
pub(crate) time_provider: Arc<dyn TimeProvider>,
|
||||
/// Session-scoped model client shared across turns.
|
||||
pub(crate) model_client: ModelClient,
|
||||
pub(crate) executed_tool_calls: Option<Arc<ExecutedToolCallRecorder>>,
|
||||
pub(crate) executed_tool_calls: ExecutedToolCalls,
|
||||
pub(crate) code_mode_service: CodeModeService,
|
||||
pub(crate) tool_search_handler_cache: ToolSearchHandlerCache,
|
||||
pub(crate) turn_environments: Arc<ThreadEnvironments>,
|
||||
|
||||
Reference in new issue
Block a user