utilitas 2000.3.9 → 2000.3.13

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/lib/alan.mjs CHANGED
@@ -172,7 +172,7 @@ const MODELS = {
172
172
  },
173
173
  // best local model
174
174
  [GEMMA_3_27B]: {
175
- label: '❇️', contextWindow: kT(128), maxOutputTokens: k(8),
175
+ icon: '❇️', contextWindow: kT(128), maxOutputTokens: k(8),
176
176
  imageCostTokens: 256, maxImageSize: 896 * 896,
177
177
  supportedMimeTypes: [MIME_PNG, MIME_JPEG, MIME_GIF],
178
178
  fast: true, json: true, vision: true,
@@ -602,13 +602,13 @@ const packResp = async (resp, options) => {
602
602
  if (options?.raw) { return resp; }
603
603
  let [
604
604
  txt, audio, images, annotations, simpleText, annotationsMarkdown, end,
605
- json, audioMimeType,
605
+ json, audioMimeType, catched,
606
606
  ] = [
607
607
  resp.text || '', // ChatGPT / Claude / Gemini / Ollama
608
608
  resp?.audio?.data, // ChatGPT audio mode
609
609
  resp?.images || [], // Gemini images via Openrouter
610
610
  resp?.references, // Gemini references
611
- '', '', '', null, MIME_PCM16
611
+ '', '', '', null, MIME_PCM16, new Set(),
612
612
  ];
613
613
  simpleText = txt;
614
614
  while ((end = getInfoEnd(simpleText))) {
@@ -697,7 +697,12 @@ const packResp = async (resp, options) => {
697
697
  model: [
698
698
  options.provider, options?.router?.provider,
699
699
  options?.router?.model || options?.model,
700
- ].filter(x => x).join('/'),
700
+ ].join('/').split('/').map(x => {
701
+ const key = ensureString(x, { case: 'UP' });
702
+ if (catched.has(key)) { return null; }
703
+ catched.add(key);
704
+ return x;
705
+ }).filter(x => x).join('/'),
701
706
  };
702
707
  };
703
708
 
package/lib/manifest.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  const manifest = {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "2000.3.9",
4
+ "version": "2000.3.13",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "2000.3.9",
4
+ "version": "2000.3.13",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",