@blockrun/clawrouter 0.12.82 → 0.12.84

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/cli.js CHANGED
@@ -49744,6 +49744,19 @@ data: [DONE]
49744
49744
  }
49745
49745
  }
49746
49746
  let responseBody = Buffer.concat(bodyParts);
49747
+ if (responseBody.length > 0) {
49748
+ try {
49749
+ const parsed = JSON.parse(responseBody.toString());
49750
+ if (parsed.choices?.[0]?.message?.content) {
49751
+ const stripped = stripThinkingTokens(parsed.choices[0].message.content);
49752
+ if (stripped !== parsed.choices[0].message.content) {
49753
+ parsed.choices[0].message.content = stripped;
49754
+ responseBody = Buffer.from(JSON.stringify(parsed));
49755
+ }
49756
+ }
49757
+ } catch {
49758
+ }
49759
+ }
49747
49760
  if (balanceFallbackNotice && responseBody.length > 0) {
49748
49761
  try {
49749
49762
  const parsed = JSON.parse(responseBody.toString());