@serii84/vertex-partner-provider 1.0.24 → 1.0.25

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.
Files changed (2) hide show
  1. package/index.js +5 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Vertex Partner Provider for OpenCode
3
- * v1.0.24 - Debug: write to file instead of console
3
+ * v1.0.25 - Skip all empty choices chunks (including usage-only)
4
4
  */
5
5
 
6
6
  const fs = require('fs');
@@ -134,9 +134,10 @@ function transformStream(response) {
134
134
 
135
135
  const cleaned = cleanResponse(parsed);
136
136
 
137
- // Skip chunks that have no useful data after cleaning
138
- if ((!cleaned.choices || cleaned.choices.length === 0) && !cleaned.usage) {
139
- debugLog('Skipping empty chunk');
137
+ // Skip chunks with empty choices (including usage-only chunks)
138
+ // The AI SDK may not handle empty choices arrays correctly
139
+ if (!cleaned.choices || cleaned.choices.length === 0) {
140
+ debugLog('Skipping chunk with empty choices');
140
141
  continue;
141
142
  }
142
143
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serii84/vertex-partner-provider",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "Vertex AI partner models (GLM, Kimi, DeepSeek) for OpenCode",
5
5
  "main": "index.js",
6
6
  "scripts": {