mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-26 08:12:13 +00:00
fix: anthropic msg transform
This commit is contained in:
parent
96c1c0363d
commit
b726e9b59e
1 changed files with 1 additions and 1 deletions
|
|
@ -53,7 +53,7 @@ export namespace ProviderTransform {
|
|||
): ModelMessage[] {
|
||||
// Anthropic rejects messages with empty content - filter out empty string messages
|
||||
// and remove empty text/reasoning parts from array content
|
||||
if (model.api.npm === "@ai-sdk/anthropic" || model.api.npm === "@ai-sdk/amazon-bedrock") {
|
||||
if (model.api.npm === "@ai-sdk/amazon-bedrock") {
|
||||
msgs = msgs
|
||||
.map((msg) => {
|
||||
if (typeof msg.content === "string") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue