File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments