Merge pull request #161 from auriti/fix/block-update-for-3p-providers

fix: block update command for 3P providers, align thinking block handling
This commit is contained in:
Kevin Codex
2026-04-03 01:52:54 +08:00
committed by GitHub
2 changed files with 16 additions and 1 deletions

View File

@@ -264,7 +264,8 @@ export function convertAnthropicMessagesToResponsesInput(
if (role === 'assistant') {
const textBlocks = Array.isArray(content)
? content.filter((block: { type?: string }) => block.type !== 'tool_use')
? content.filter((block: { type?: string }) =>
block.type !== 'tool_use' && block.type !== 'thinking')
: content
const parts = convertContentBlocksToResponsesParts(textBlocks, 'assistant')
if (parts.length > 0) {