diff options
| author | Aiden Cline <[email protected]> | 2026-01-05 01:21:27 -0600 |
|---|---|---|
| committer | Aiden Cline <[email protected]> | 2026-01-05 01:40:15 -0600 |
| commit | 06acd70670b9724d712f5b70f1449c47531fbca1 (patch) | |
| tree | b0e03f56c7ef48430087c64a22b1760f4bc039ec | |
| parent | c285304acf50ab9465a2e23cbf6efc1e5b3a3cf4 (diff) | |
| download | opencode-06acd70670b9724d712f5b70f1449c47531fbca1.tar.gz opencode-06acd70670b9724d712f5b70f1449c47531fbca1.zip | |
tweak: transform
| -rw-r--r-- | packages/opencode/src/provider/transform.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/opencode/src/provider/transform.ts b/packages/opencode/src/provider/transform.ts index ae236285c..832e8c91e 100644 --- a/packages/opencode/src/provider/transform.ts +++ b/packages/opencode/src/provider/transform.ts @@ -22,7 +22,10 @@ export namespace ProviderTransform { if (model.api.npm === "@ai-sdk/anthropic") { msgs = msgs .map((msg) => { - if (typeof msg.content === "string") return msg + if (typeof msg.content === "string") { + if (msg.content === "") return undefined + return msg + } if (!Array.isArray(msg.content)) return msg const filtered = msg.content.filter((part) => { if (part.type === "text" || part.type === "reasoning") { |
