@contentgrowth/llm-service 0.7.3 → 0.7.5

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentgrowth/llm-service",
3
- "version": "0.7.3",
3
+ "version": "0.7.5",
4
4
  "description": "Unified LLM Service for Content Growth",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -132,7 +132,7 @@ export class DefaultConfigProvider extends BaseConfigProvider {
132
132
  apiKey,
133
133
  models,
134
134
  temperature: parseFloat(env.DEFAULT_TEMPERATURE || '0.7'),
135
- maxTokens: parseInt(env.DEFAULT_MAX_TOKENS || '4096'),
135
+ maxTokens: parseInt(env.DEFAULT_MAX_TOKENS || '16384'),
136
136
  };
137
137
  }
138
138
  }
@@ -174,7 +174,7 @@ export class LLMService {
174
174
  options
175
175
  );
176
176
 
177
- let { content, tool_calls, parsedContent, finishReason } = initialResponse;
177
+ let { content, tool_calls, parsedContent, finishReason, _rawFinishReason } = initialResponse;
178
178
 
179
179
  // Tool execution loop with safety limit
180
180
  while (tool_calls && iteration < MAX_ITERATIONS) {
@@ -197,6 +197,7 @@ export class LLMService {
197
197
  tool_calls = nextResponse.tool_calls;
198
198
  parsedContent = nextResponse.parsedContent; // Preserve parsedContent from final response
199
199
  finishReason = nextResponse.finishReason; // Preserve finishReason from final response
200
+ _rawFinishReason = nextResponse._rawFinishReason; // Preserve raw finish reason for debugging
200
201
  }
201
202
 
202
203
  if (iteration >= MAX_ITERATIONS) {
@@ -204,7 +205,7 @@ export class LLMService {
204
205
  }
205
206
 
206
207
  // Return both content and parsedContent (if available)
207
- return { content, parsedContent, toolCalls: tool_calls, finishReason };
208
+ return { content, parsedContent, toolCalls: tool_calls, finishReason, _rawFinishReason };
208
209
  }
209
210
 
210
211
  /**