mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:38:45 +00:00
Record attempted tool calls in response metadata (#36181)
## What changed - Add the opt-in `executed_tool_call_metadata` feature to record model-attempted direct and code-mode tool calls. - Attach recorded names and arguments to the matching tool output in the next Responses request, preserving the metadata across sampling retries. - Bound pending calls and argument sizes, and emit truncation metadata when limits are exceeded. ## Testing - Cover disabled-by-default behavior, namespaced and nested calls, blocked or failed attempts, retry handling, and recorder limits. GitOrigin-RevId: 5ce917b73e797b0f6904d46477b9d2cf8ea71bf2
This commit is contained in:
@@ -4,6 +4,7 @@ mod service;
|
||||
mod session;
|
||||
mod turn;
|
||||
|
||||
pub(crate) use crate::tools::ExecutedToolCallRecorder;
|
||||
pub(crate) use additional_context::AdditionalContextStore;
|
||||
pub(crate) use auto_compact_window::AutoCompactWindowIds;
|
||||
pub(crate) use auto_compact_window::AutoCompactWindowSnapshot;
|
||||
|
||||
@@ -15,6 +15,7 @@ use crate::environment_selection::ThreadEnvironments;
|
||||
use crate::exec_policy::ExecPolicyManager;
|
||||
use crate::guardian::GuardianRejectionCircuitBreaker;
|
||||
use crate::mcp::McpManager;
|
||||
use crate::tools::ExecutedToolCallRecorder;
|
||||
use crate::tools::code_mode::CodeModeService;
|
||||
use crate::tools::handlers::ToolSearchHandlerCache;
|
||||
use crate::tools::network_approval::NetworkApprovalService;
|
||||
@@ -88,6 +89,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) code_mode_service: CodeModeService,
|
||||
pub(crate) tool_search_handler_cache: ToolSearchHandlerCache,
|
||||
pub(crate) turn_environments: Arc<ThreadEnvironments>,
|
||||
|
||||
Reference in New Issue
Block a user