nothumanallowed 14.1.51 → 14.1.52

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": "nothumanallowed",
3
- "version": "14.1.51",
3
+ "version": "14.1.52",
4
4
  "description": "NotHumanAllowed — 38 AI agents, 80 tools, Studio (visual agentic workflows). Email, calendar, browser automation, screen capture, canvas, cron/heartbeat, Alexandria E2E messaging, GitHub, Notion, Slack, voice chat, free AI (Liara), 28 languages. Zero-dependency CLI.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/constants.mjs CHANGED
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'url';
5
5
  const __filename = fileURLToPath(import.meta.url);
6
6
  const __dirname = path.dirname(__filename);
7
7
 
8
- export const VERSION = '14.1.51';
8
+ export const VERSION = '14.1.52';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -59,7 +59,7 @@ const BOUNDARY_WORDS = new Set([
59
59
  ]);
60
60
 
61
61
  // Single characters commonly produced by BPE fragmentation in Italian/English
62
- const BPE_SINGLE_CHARS = new Set(['a','c','d','e','i','l','m','n','o','p','r','s','t','u','v']);
62
+ const BPE_SINGLE_CHARS = new Set('abcdefghijklmnopqrstuvwxyzàèéìòù'.split(''));
63
63
 
64
64
  /**
65
65
  * Enterprise-grade linguistic scorer for Italian/English word candidates.
@@ -693,8 +693,8 @@ export async function callNHA(apiKey, model, systemPrompt, userMessage, stream =
693
693
  let content = data.choices?.[0]?.message?.content || '';
694
694
  // Strip thinking tags if present
695
695
  content = content.replace(/<think>[\s\S]*?<\/think>/g, '').trim();
696
- // Fix Qwen3 BPE tokenizer artifacts (words fused without spaces)
697
- content = fixQwen3BPE(content);
696
+ // NOTE: Do NOT apply fixQwen3BPE here. With stream:false, vLLM returns
697
+ // correctly-spaced text. The BPE repair regex corrupts normal words.
698
698
  return content;
699
699
  }
700
700
 
@@ -962,13 +962,9 @@ export async function callLLMStream(config, systemPrompt, userMessage, onToken,
962
962
  let fullNhaText = nhaJson.choices?.[0]?.message?.content || '';
963
963
  // Strip <think>...</think> blocks
964
964
  fullNhaText = fullNhaText.replace(/<think>[\s\S]*?<\/think>/g, '').trim();
965
- // Fix Qwen3 BPE tokenizer artifacts: words joined without spaces.
966
- // Qwen3 streaming via vLLM occasionally produces subword tokens that arrive
967
- // concatenated e.g. "lacorrelazione" instead of "la correlazione",
968
- // "ilprezzodell'oro" instead of "il prezzo dell'oro".
969
- // We fix this by inserting spaces before Italian/English articles and
970
- // prepositions that appear fused at word boundaries.
971
- fullNhaText = fixQwen3BPE(fullNhaText);
965
+ // NOTE: Do NOT apply fixQwen3BPE here. With stream:false, vLLM returns
966
+ // correctly-spaced text. The BPE repair regex is too aggressive and
967
+ // corrupts normal Italian words (e.g. "assistente" "ass ist ente").
972
968
  if (onToken) onToken(fullNhaText);
973
969
  return fullNhaText;
974
970
  }
@@ -1233,8 +1229,6 @@ async function streamSSEWithCallback(res, format, onToken) {
1233
1229
  }
1234
1230
  }
1235
1231
 
1236
- // Apply BPE repair to the final accumulated text before returning
1237
- fullText = fixQwen3BPE(fullText);
1238
1232
  return fullText;
1239
1233
  }
1240
1234