When the Anthropic API returns multiple tool_use blocks, tool_result blocks
must appear in the same order. The existing validateAndFixToolResultIds()
already handled missing/duplicate results but did not reorder them.
This adds a reorderToolResults() helper that sorts tool_result blocks by
their corresponding tool_use index while keeping non-tool-result blocks
(text, image) in their original positions.
Revert to pre-AI-SDK state (commit 67e568f6b)
This commit reverts the codebase to the state before AI SDK migration work began.
Target commit: 67e568f6b - refactor: replace fetch_instructions with skill tool and built-in skills (#10913)
Date: January 29, 2026
This removes approximately 152 commits of AI SDK migration work.
A follow-up PR will add back bug fixes and features that are unrelated to AI SDK.
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>