Skip to content

Commit cdd5499

Browse files
committed
Fix
1 parent c9f0dca commit cdd5499

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

apps/sim/providers/anthropic/core.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ export async function executeAnthropicProviderRequest(
233233
const content = buildAnthropicMessageContent(msg.content, msg.files, config.providerId)
234234
messages.push({
235235
role: msg.role === 'assistant' ? 'assistant' : 'user',
236+
// double-cast-allowed: shared attachment builder returns Anthropic-compatible content blocks but avoids importing SDK-only union types
236237
content: content as unknown as Anthropic.Messages.ContentBlockParam[],
237238
})
238239
}

apps/sim/providers/bedrock/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,11 @@ export const bedrockProvider: ProviderConfig = {
179179
}
180180
} else {
181181
const role: ConversationRole = msg.role === 'assistant' ? 'assistant' : 'user'
182+
const content = buildBedrockMessageContent(msg.content, msg.files, 'bedrock')
182183
messages.push({
183184
role,
184-
content: buildBedrockMessageContent(
185-
msg.content,
186-
msg.files,
187-
'bedrock'
188-
) as unknown as ContentBlock[],
185+
// double-cast-allowed: shared attachment builder emits Bedrock Converse content blocks while keeping provider-neutral attachment types
186+
content: content as unknown as ContentBlock[],
189187
})
190188
}
191189
}

0 commit comments

Comments
 (0)