mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-26 15:40:18 +00:00
The worker (both agent/worker.rs and worker/runtime.rs) was passing the literal string "tool_call_id" to ChatMessage::tool_result instead of the actual tool call ID from the LLM response. This breaks OpenAI-compatible providers that match tool results to their corresponding calls by ID. - Add tool_call_id field to ToolSelection struct - Propagate ToolCall.id through select_tools() into ToolSelection - Replace all hardcoded "tool_call_id" usages with selection.tool_call_id - Generate unique IDs for plan-based synthetic selections - Add test verifying tool_call_id is preserved Co-authored-by: Yi LIU <[email protected]> Co-authored-by: Illia Polosukhin <[email protected]>