@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
|
-
|
|
97
|
-
|
|
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
|
-
|
|
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.
|