Skip to content

Commit 06acd70

Browse files
committed
tweak: transform
1 parent c285304 commit 06acd70

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/opencode/src/provider/transform.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ export namespace ProviderTransform {
2222
if (model.api.npm === "@ai-sdk/anthropic") {
2323
msgs = msgs
2424
.map((msg) => {
25-
if (typeof msg.content === "string") return msg
25+
if (typeof msg.content === "string") {
26+
if (msg.content === "") return undefined
27+
return msg
28+
}
2629
if (!Array.isArray(msg.content)) return msg
2730
const filtered = msg.content.filter((part) => {
2831
if (part.type === "text" || part.type === "reasoning") {

0 commit comments

Comments
 (0)