mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-14 03:56:55 +03:00
fix(opencode): hoist Bedrock tool images except Claude, Nova, and Llama 4 (#50272)
This commit is contained in:
committed by
GitHub
Unverified
parent
0e3dfd1769
commit
c10134729d
@@ -148,7 +148,11 @@ export const toModelMessagesEffect = Effect.fnUntraced(function* (
|
||||
if (model.api.npm === "@ai-sdk/anthropic") return true
|
||||
if (model.api.npm === "@ai-sdk/openai") return true
|
||||
if (model.api.npm === "@ai-sdk/amazon-bedrock/mantle") return true
|
||||
if (model.api.npm === "@ai-sdk/amazon-bedrock") return attachment.mime.startsWith("image/")
|
||||
if (model.api.npm === "@ai-sdk/amazon-bedrock") {
|
||||
if (!attachment.mime.startsWith("image/")) return false
|
||||
const id = model.api.id.toLowerCase()
|
||||
return id.includes("anthropic.") || id.includes("nova") || id.includes("llama4") || id.includes("llama-4")
|
||||
}
|
||||
if (model.api.npm === "@ai-sdk/xai") return attachment.mime.startsWith("image/")
|
||||
if (model.api.npm === "@ai-sdk/google-vertex/anthropic") return true
|
||||
if (model.api.npm === "@ai-sdk/google") {
|
||||
|
||||
Reference in New Issue
Block a user