@jsonstudio/llms 0.6.1397 → 0.6.1399

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.
@@ -93,10 +93,8 @@ function coerceFollowupPayloadStream(payload, stream) {
93
93
  if (!payload || typeof payload !== 'object') {
94
94
  return payload;
95
95
  }
96
- // ServerTool followup requests must be non-streaming to keep parsing deterministic and avoid
97
- // provider-side SSE wrappers leaking into internal reenter calls.
98
- if (stream === false) {
99
- payload.stream = false;
96
+ if (typeof stream === 'boolean') {
97
+ payload.stream = stream;
100
98
  }
101
99
  return payload;
102
100
  }
@@ -440,7 +438,6 @@ export async function runServerToolOrchestration(options) {
440
438
  };
441
439
  }
442
440
  const metadata = {
443
- stream: false,
444
441
  ...(engineResult.execution.followup.metadata ?? {})
445
442
  };
446
443
  const rt = ensureRuntimeMetadata(metadata);
@@ -476,7 +473,10 @@ export async function runServerToolOrchestration(options) {
476
473
  const retryEmptyFollowupOnce = isStopMessageFlow || isGeminiEmptyReplyContinue;
477
474
  const maxAttempts = retryEmptyFollowupOnce ? 2 : 1;
478
475
  const followupRequestId = buildFollowupRequestId(options.requestId, engineResult.execution.followup.requestIdSuffix);
479
- let followupPayload = coerceFollowupPayloadStream(followupSeedPayload, metadata.stream === true);
476
+ const followupStream = typeof metadata.stream === 'boolean'
477
+ ? (metadata.stream)
478
+ : undefined;
479
+ let followupPayload = coerceFollowupPayloadStream(followupSeedPayload, followupStream);
480
480
  if (isGeminiEmptyReplyContinue) {
481
481
  // For gemini_empty_reply_continue, the goal is to recover text output from an empty/malformed reply.
482
482
  // Force the followup to be non-tool-calling to avoid repeated MALFORMED_FUNCTION_CALL loops.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsonstudio/llms",
3
- "version": "0.6.1397",
3
+ "version": "0.6.1399",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",