@opencode-ai/ai 0.0.0-dev-18660 → 0.0.0-dev-18661

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.
@@ -846,15 +846,15 @@ const step = (state, event) => Effect.gen(function* () {
846
846
  lifecycle = Lifecycle.stepStart(lifecycle, events);
847
847
  events.push(...result.events);
848
848
  }
849
- const contentFiltered = finishReason?.normalized === "content-filter";
849
+ const incompleteTools = finishReason?.normalized === "content-filter" || finishReason?.normalized === "length";
850
850
  if (finishReason !== undefined &&
851
- !contentFiltered &&
851
+ !incompleteTools &&
852
852
  state.finishReason === undefined &&
853
853
  Object.keys(pendingTools).length)
854
854
  return yield* ProviderShared.eventError(ADAPTER, "OpenAI Chat tool call delta is missing id or name", ProviderShared.encodeJson(event));
855
- // A content filter terminates the response without confirming pending tool calls.
855
+ // Filtering or truncation terminates the response without confirming pending tool calls.
856
856
  const finished = finishReason !== undefined &&
857
- !contentFiltered &&
857
+ !incompleteTools &&
858
858
  state.finishReason === undefined &&
859
859
  Object.keys(tools).length > 0
860
860
  ? yield* ToolStream.finishAll(ADAPTER, tools)
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-18660",
3
+ "version": "0.0.0-dev-18661",
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.112",
33
- "@opencode-ai/http-recorder": "0.0.0-dev-18660",
33
+ "@opencode-ai/http-recorder": "0.0.0-dev-18661",
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-18660",
42
+ "@opencode-ai/schema": "0.0.0-dev-18661",
43
43
  "aws4fetch": "1.0.20",
44
44
  "effect": "4.0.0-rc.112",
45
45
  "google-auth-library": "10.5.0"