@blockrun/clawrouter 0.5.3 → 0.5.4

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/dist/index.js CHANGED
@@ -2996,7 +2996,8 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
2996
2996
  id: rsp.id ?? `chatcmpl-${Date.now()}`,
2997
2997
  object: "chat.completion.chunk",
2998
2998
  created: rsp.created ?? Math.floor(Date.now() / 1e3),
2999
- model: rsp.model ?? "unknown"
2999
+ model: rsp.model ?? "unknown",
3000
+ system_fingerprint: null
3000
3001
  };
3001
3002
  if (rsp.choices && Array.isArray(rsp.choices)) {
3002
3003
  for (const choice of rsp.choices) {
@@ -3006,7 +3007,7 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
3006
3007
  const index = choice.index ?? 0;
3007
3008
  const roleChunk = {
3008
3009
  ...baseChunk,
3009
- choices: [{ index, delta: { role }, finish_reason: null }]
3010
+ choices: [{ index, delta: { role }, logprobs: null, finish_reason: null }]
3010
3011
  };
3011
3012
  const roleData = `data: ${JSON.stringify(roleChunk)}
3012
3013
 
@@ -3016,7 +3017,7 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
3016
3017
  if (content) {
3017
3018
  const contentChunk = {
3018
3019
  ...baseChunk,
3019
- choices: [{ index, delta: { content }, finish_reason: null }]
3020
+ choices: [{ index, delta: { content }, logprobs: null, finish_reason: null }]
3020
3021
  };
3021
3022
  const contentData = `data: ${JSON.stringify(contentChunk)}
3022
3023
 
@@ -3028,7 +3029,7 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
3028
3029
  if (toolCalls && toolCalls.length > 0) {
3029
3030
  const toolCallChunk = {
3030
3031
  ...baseChunk,
3031
- choices: [{ index, delta: { tool_calls: toolCalls }, finish_reason: null }]
3032
+ choices: [{ index, delta: { tool_calls: toolCalls }, logprobs: null, finish_reason: null }]
3032
3033
  };
3033
3034
  const toolCallData = `data: ${JSON.stringify(toolCallChunk)}
3034
3035
 
@@ -3038,7 +3039,7 @@ async function proxyRequest(req, res, apiBase, payFetch, options, routerOpts, de
3038
3039
  }
3039
3040
  const finishChunk = {
3040
3041
  ...baseChunk,
3041
- choices: [{ index, delta: {}, finish_reason: choice.finish_reason ?? "stop" }]
3042
+ choices: [{ index, delta: {}, logprobs: null, finish_reason: choice.finish_reason ?? "stop" }]
3042
3043
  };
3043
3044
  const finishData = `data: ${JSON.stringify(finishChunk)}
3044
3045