@opencode/ai 0.0.0-dev-20058 → 0.0.0-dev-20059

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.
@@ -136,9 +136,9 @@ export declare const toolResultText: (part: ToolResultPart) => string;
136
136
  export declare const errorText: (error: unknown) => string;
137
137
  /**
138
138
  * `framing` step for Server-Sent Events. Decodes UTF-8, runs the SSE channel
139
- * decoder, optionally filters named events, and drops empty and bare `null`
140
- * events. `[DONE]` is dropped by default or retained for protocols that use it
141
- * as their stream boundary. Retry control events are ignored without
139
+ * decoder, optionally filters named events, and drops empty events and known
140
+ * keepalives that proxies send as data. `[DONE]` is dropped by default or
141
+ * retained for protocols that use it as their stream boundary. Retry control events are ignored without
142
142
  * interrupting the stream. Decoder failures become provider output errors so
143
143
  * the public error channel stays `AIError`.
144
144
  */
@@ -191,9 +191,9 @@ export const errorText = (error) => {
191
191
  };
192
192
  /**
193
193
  * `framing` step for Server-Sent Events. Decodes UTF-8, runs the SSE channel
194
- * decoder, optionally filters named events, and drops empty and bare `null`
195
- * events. `[DONE]` is dropped by default or retained for protocols that use it
196
- * as their stream boundary. Retry control events are ignored without
194
+ * decoder, optionally filters named events, and drops empty events and known
195
+ * keepalives that proxies send as data. `[DONE]` is dropped by default or
196
+ * retained for protocols that use it as their stream boundary. Retry control events are ignored without
197
197
  * interrupting the stream. Decoder failures become provider output errors so
198
198
  * the public error channel stays `AIError`.
199
199
  */
@@ -217,6 +217,9 @@ export const sseFraming = (bytes, events, includeDone = false) => bytes.pipe(Str
217
217
  // `data: null`, between events or after `[DONE]`. No protocol has a
218
218
  // null event, so it carries nothing and must not abort the stream.
219
219
  event.data !== "null" &&
220
+ // Vertex AI partner models (e.g. `xai/grok-4.6`) send their SSE
221
+ // keepalive comment as `data: : keepalive` while reasoning.
222
+ event.data !== ": keepalive" &&
220
223
  (event.data !== "[DONE]" || includeDone || (events !== undefined && event.event !== "message"))), Stream.map((event) => event.data));
221
224
  /**
222
225
  * Canonical invalid-request constructor shared by protocol lowering.
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-20058",
3
+ "version": "0.0.0-dev-20059",
4
4
  "name": "@opencode/ai",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -34,7 +34,7 @@
34
34
  "devDependencies": {
35
35
  "@clack/prompts": "1.0.0-alpha.1",
36
36
  "@effect/platform-node": "4.0.0-rc.112",
37
- "@opencode/http-recorder": "0.0.0-dev-20058",
37
+ "@opencode/http-recorder": "0.0.0-dev-20059",
38
38
  "@tsconfig/bun": "1.0.9",
39
39
  "@types/bun": "1.4.0",
40
40
  "@typescript/native-preview": "7.0.0-dev.20251207.1",
@@ -44,7 +44,7 @@
44
44
  "@aws-sdk/credential-providers": "3.1057.0",
45
45
  "@smithy/eventstream-codec": "4.2.14",
46
46
  "@smithy/util-utf8": "4.2.2",
47
- "@opencode/schema": "0.0.0-dev-20058",
47
+ "@opencode/schema": "0.0.0-dev-20059",
48
48
  "aws4fetch": "1.0.20",
49
49
  "effect": "4.0.0-rc.112",
50
50
  "google-auth-library": "10.5.0"