@opencode-ai/ai 0.0.0-dev-18437 → 0.0.0-dev-18447

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -285,6 +285,13 @@ const lowerMessages = Effect.fn("BedrockConverse.lowerMessages")(function* (requ
285
285
  content.push({ reasoningContent: { redactedContent: redactedData } });
286
286
  continue;
287
287
  }
288
+ if (signature === undefined || signature.trim().length === 0) {
289
+ // Interrupted streams and model switches can leave unsigned reasoning.
290
+ // Preserve readable history as text rather than replay invalid reasoningContent.
291
+ if (part.text.trim().length > 0)
292
+ content.push(...textWithCache(breakpoints, part.text, part.cache));
293
+ continue;
294
+ }
288
295
  content.push({ reasoningContent: { reasoningText: { text: part.text, signature } } });
289
296
  continue;
290
297
  }
@@ -293,7 +300,8 @@ const lowerMessages = Effect.fn("BedrockConverse.lowerMessages")(function* (requ
293
300
  continue;
294
301
  }
295
302
  }
296
- messages.push({ role: "assistant", content });
303
+ if (content.length > 0)
304
+ messages.push({ role: "assistant", content });
297
305
  continue;
298
306
  }
299
307
  const content = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "0.0.0-dev-18437",
3
+ "version": "0.0.0-dev-18447",
4
4
  "name": "@opencode-ai/ai",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -30,7 +30,7 @@
30
30
  "devDependencies": {
31
31
  "@clack/prompts": "1.0.0-alpha.1",
32
32
  "@effect/platform-node": "4.0.0-rc.111",
33
- "@opencode-ai/http-recorder": "0.0.0-dev-18437",
33
+ "@opencode-ai/http-recorder": "0.0.0-dev-18447",
34
34
  "@tsconfig/bun": "1.0.9",
35
35
  "@types/bun": "1.3.13",
36
36
  "@typescript/native-preview": "7.0.0-dev.20251207.1",
@@ -39,7 +39,7 @@
39
39
  "dependencies": {
40
40
  "@smithy/eventstream-codec": "4.2.14",
41
41
  "@smithy/util-utf8": "4.2.2",
42
- "@opencode-ai/schema": "0.0.0-dev-18437",
42
+ "@opencode-ai/schema": "0.0.0-dev-18447",
43
43
  "aws4fetch": "1.0.20",
44
44
  "effect": "4.0.0-rc.111",
45
45
  "google-auth-library": "10.5.0"