@contentgrowth/llm-service 0.8.0 → 0.8.1
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.
package/package.json
CHANGED
|
@@ -119,7 +119,7 @@ export class GeminiProvider extends BaseLLMProvider {
|
|
|
119
119
|
functionCall: { name: tc.function.name, args: tc.function.arguments || tc.function.args }
|
|
120
120
|
};
|
|
121
121
|
if (tc.thought_signature) {
|
|
122
|
-
part.
|
|
122
|
+
part.thoughtSignature = tc.thought_signature; // camelCase for SDK
|
|
123
123
|
}
|
|
124
124
|
return part;
|
|
125
125
|
});
|
|
@@ -218,8 +218,10 @@ export class GeminiProvider extends BaseLLMProvider {
|
|
|
218
218
|
if (part.functionCall) {
|
|
219
219
|
if (!toolCalls) toolCalls = [];
|
|
220
220
|
// Preserve thought_signature if present (Gemini 3 requirement)
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
// Check both snake_case (API) and camelCase (SDK convention)
|
|
222
|
+
const sig = part.thought_signature || part.thoughtSignature;
|
|
223
|
+
if (sig) {
|
|
224
|
+
part.functionCall.thought_signature = sig;
|
|
223
225
|
}
|
|
224
226
|
toolCalls.push(part.functionCall);
|
|
225
227
|
}
|
|
@@ -238,6 +240,9 @@ export class GeminiProvider extends BaseLLMProvider {
|
|
|
238
240
|
);
|
|
239
241
|
}
|
|
240
242
|
|
|
243
|
+
// Detailed logging as requested
|
|
244
|
+
// console.log('[GeminiProvider] generateContent response candidate:', JSON.stringify(candidate, null, 2));
|
|
245
|
+
|
|
241
246
|
// console.log('Gemini returns:', textContent);
|
|
242
247
|
// Return with parsed JSON if applicable
|
|
243
248
|
// Normalize the finish reason to standard value for consistent handling
|