mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
850c74e4b8
The middleware strips FE tool calls so the backend ToolNode only executes its own calls, then restores them. Restoration now rebuilds the intercepted calls with synthetic ToolMessage results scoped to the restored model history (providers that require a result per tool_call stay valid) and preserves the original AI message's name, additional_kwargs, and response_metadata. Tracks original_tool_calls in private state so the original call set is restored exactly. Closes #4759 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
15 KiB
15 KiB