@opencode-ai/ai
Advanced tools
@@ -849,7 +849,13 @@ import { Effect, Schema } from "effect"; | ||
| } | ||
| if (finishReason !== undefined && state.finishReason === undefined && Object.keys(pendingTools).length > 0) | ||
| const contentFiltered = finishReason?.normalized === "content-filter"; | ||
| if (finishReason !== undefined && | ||
| !contentFiltered && | ||
| state.finishReason === undefined && | ||
| Object.keys(pendingTools).length) | ||
| return yield* ProviderShared.eventError(ADAPTER, "OpenAI Chat tool call delta is missing id or name", ProviderShared.encodeJson(event)); | ||
| // Finalize accumulated tool inputs eagerly when finish_reason arrives so | ||
| // valid calls and malformed local calls settle independently. | ||
| const finished = finishReason !== undefined && state.finishReason === undefined && Object.keys(tools).length > 0 | ||
| // A content filter terminates the response without confirming pending tool calls. | ||
| const finished = finishReason !== undefined && | ||
| !contentFiltered && | ||
| state.finishReason === undefined && | ||
| Object.keys(tools).length > 0 | ||
| ? yield* ToolStream.finishAll(ADAPTER, tools) | ||
@@ -856,0 +862,0 @@ : undefined; |
+3
-3
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "version": "0.0.0-dev-18650", | ||
| "version": "0.0.0-dev-18652", | ||
| "name": "@opencode-ai/ai", | ||
@@ -33,3 +33,3 @@ "type": "module", | ||
| "@effect/platform-node": "4.0.0-rc.112", | ||
| "@opencode-ai/http-recorder": "0.0.0-dev-18650", | ||
| "@opencode-ai/http-recorder": "0.0.0-dev-18652", | ||
| "@tsconfig/bun": "1.0.9", | ||
@@ -43,3 +43,3 @@ "@types/bun": "1.3.13", | ||
| "@smithy/util-utf8": "4.2.2", | ||
| "@opencode-ai/schema": "0.0.0-dev-18650", | ||
| "@opencode-ai/schema": "0.0.0-dev-18652", | ||
| "aws4fetch": "1.0.20", | ||
@@ -46,0 +46,0 @@ "effect": "4.0.0-rc.112", |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
1479704
0.01%34076
0.02%+ Added
- Removed