fix: defer inlineData parts to end of array for parallel tool calls (#91)
When multiple tool_results contain images, the inlineData parts were being interleaved between functionResponse parts, breaking Claude's API requirement that functionResponse parts be consecutive. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -95,8 +95,7 @@ export function convertAnthropicToGoogle(anthropicRequest) {
|
||||
}
|
||||
|
||||
// Convert messages to contents, then filter unsigned thinking blocks
|
||||
for (let i = 0; i < processedMessages.length; i++) {
|
||||
const msg = processedMessages[i];
|
||||
for (const msg of processedMessages) {
|
||||
let msgContent = msg.content;
|
||||
|
||||
// For assistant messages, process thinking blocks and reorder content
|
||||
|
||||
Reference in New Issue
Block a user