@steve31415/baselib 3.18.0 → 3.19.0

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.
@@ -154,6 +154,7 @@ export const anthropicProvider = {
154
154
  const cacheReadTokens = data.usage?.cache_read_input_tokens ?? undefined;
155
155
  const cacheCreationTokens = data.usage?.cache_creation_input_tokens ?? undefined;
156
156
  const finishReason = data.stop_reason ?? undefined;
157
+ const stopCategory = data.stop_details?.category ?? undefined;
157
158
  let text;
158
159
  let json;
159
160
  if (useOutputFormat) {
@@ -178,6 +179,7 @@ export const anthropicProvider = {
178
179
  request.logger?.info('llm.response', {
179
180
  provider: 'anthropic', model: request.apiModelId,
180
181
  status: response.status, latencyMs, tokensUsed, outputTokens, finishReason,
182
+ ...(stopCategory ? { stopCategory } : {}),
181
183
  ...(cacheReadTokens !== undefined ? { cacheReadTokens } : {}),
182
184
  ...(cacheCreationTokens !== undefined ? { cacheCreationTokens } : {}),
183
185
  ...(request.callSite ? { callSite: request.callSite } : {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steve31415/baselib",
3
- "version": "3.18.0",
3
+ "version": "3.19.0",
4
4
  "description": "Plasticine new-world shared platform library: logging, auth, service-to-service auth, db, HTTP, sync, app updates",
5
5
  "type": "module",
6
6
  "license": "MIT",