Skip to main content

with_tool_call_id

Function with_tool_call_id 

Source
pub async fn with_tool_call_id<F>(id: String, fut: F) -> F::Output
where F: Future,
Expand description

Runs fut with current_tool_call_id set to id for its duration.

run_turn_with already scopes this around each tool execution; this helper is exposed for callers/tests that need to drive a tool body as if it were executing tool call id (e.g. the harness payment-proxy tool’s tests).