utilitas 2001.1.154 → 2001.1.155

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
@@ -48,17 +48,17 @@ const UPSCALE_PROMPT = "Upscale this image/photo to the highest quality. Note th
48
48
  const _NEED = ['OpenAI', '@google/genai'];
49
49
 
50
50
  const [
51
- OPENAI, GOOGLE, OLLAMA, NOVA, MD_CODE, CLOUD_OPUS_47, AUDIO, WAV,
51
+ OPENAI, GOOGLE, OLLAMA, NOVA, MD_CODE, CLOUD_OPUS_48, AUDIO, WAV,
52
52
  OPENAI_VOICE, GPT_REASONING_EFFORT, THINK, THINK_STR, THINK_END, TOOLS_STR,
53
53
  TOOLS_END, TOOLS, TEXT, OK, FUNC, GPT_55, GPT_IMAGE_2, GEMMA_4_31B,
54
54
  ANTHROPIC, ais, MAX_TOOL_RECURSION, LOG, name, user, system, assistant,
55
55
  JSON_OBJECT, PROMPT_IS_REQUIRED, k, trimTailing, trimBeginning,
56
56
  GEMINI_30_PRO_IMAGE, IMAGE, OPENROUTER_API, OPENROUTER, TOOL, ONLINE,
57
- GEMINI_31_PRO, GEMINI_30_FLASH, VEO_31, ERROR_GENERATING, GEMINI_25_PRO_TTS,
57
+ GEMINI_31_PRO, GEMINI_35_FLASH, VEO_31, ERROR_GENERATING, GEMINI_25_PRO_TTS,
58
58
  GPT_AUDIO, ELLIPSIS, TOP_LIMIT, ATTACHMENT, PROCESSING, CURSOR, LN1, LN2,
59
59
  TOP, DEEP_RESEARCH_MAX, MD_CODE_ESCAPED, LYRIA_3, GPT_54_MINI,
60
60
  ] = [
61
- 'OpenAI', 'Google', 'Ollama', 'nova', '```', 'claude-opus-4.7', 'audio',
61
+ 'OpenAI', 'Google', 'Ollama', 'nova', '```', 'claude-opus-4.8', 'audio',
62
62
  'wav', 'OPENAI_VOICE', 'medium', 'think', '<think>', '</think>',
63
63
  '<tools>', '</tools>', 'tools', 'text', 'OK', 'function', 'gpt-5.5',
64
64
  'gpt-5.4-image-2', 'gemma4:31b', 'Anthropic', [], 30, { log: true },
@@ -67,7 +67,7 @@ const [
67
67
  x => x.replace(/[\.\s]*$/, ''), x => x.replace(/^[\.\s]*/, ''),
68
68
  'gemini-3-pro-image-preview', 'image', 'https://openrouter.ai/api/v1',
69
69
  'OpenRouter', 'tool', ':online', 'gemini-3.1-pro-preview',
70
- 'gemini-3-flash-preview', 'veo-3.1-generate-preview',
70
+ 'gemini-3.5-flash', 'veo-3.1-generate-preview',
71
71
  'Error generating content.', 'gemini-2.5-pro-preview-tts', 'gpt-audio',
72
72
  '...', 3, 'ATTACHMENT', { processing: true }, ' █', '\n\n', '\n\n\n',
73
73
  'top', 'deep-research-max-preview-04-2026', '\`\`\`',
@@ -154,11 +154,11 @@ const DEFAULT_MODELS = {
154
154
  // GPT: strong
155
155
  GPT_55,
156
156
  // Gemini: fast
157
- GEMINI_30_FLASH,
157
+ GEMINI_35_FLASH,
158
158
  // Gemini: strong
159
159
  GEMINI_31_PRO,
160
160
  // Claude: Opus
161
- CLOUD_OPUS_47,
161
+ CLOUD_OPUS_48,
162
162
  // Multimedia generation models
163
163
  GEMINI_30_PRO_IMAGE,
164
164
  LYRIA_3,
@@ -211,10 +211,7 @@ const adaptOpenRouterModels = async () => {
211
211
  if (model.outputModalities.includes('audio')) {
212
212
  model.audio = true;
213
213
  }
214
- // https://gemini.google.com/app/c680748b3307790b
215
- // issue with json output via OpenRouter
216
- model.structured = !!(model.supported_parameters?.includes('structured_outputs')
217
- && ![GEMINI_30_FLASH].includes(model.name));
214
+ model.structured = !!model.supported_parameters?.includes('structured_outputs');
218
215
  model.tools = (!!(model.supported_parameters?.includes('tools')
219
216
  || model.supported_parameters?.includes('tool_choice')))
220
217
  && ![GEMINI_30_PRO_IMAGE].includes(model.name);
@@ -424,7 +421,10 @@ const init = async (options = {}) => {
424
421
  const modelsByName = Object.fromEntries(
425
422
  Object.values(MODELS).map(x => [x.name.toLowerCase(), x])
426
423
  );
427
- models = ensureArray(DEFAULT_MODELS[provider]).map(x => modelsByName[x]);
424
+ models = ensureArray(DEFAULT_MODELS[provider]).map(x => {
425
+ assert(modelsByName[x], `Model '${x}' not found for provider ${provider}.`);
426
+ return modelsByName[x];
427
+ });
428
428
  } else if (options.modelConfig) {
429
429
  models = ensureArray(options.modelConfig);
430
430
  }
@@ -1517,12 +1517,12 @@ export default init;
1517
1517
  export {
1518
1518
  _NEED,
1519
1519
  _NO_RENDER,
1520
- CLOUD_OPUS_47,
1520
+ CLOUD_OPUS_48,
1521
1521
  CODE_INTERPRETER,
1522
1522
  DEFAULT_MODELS,
1523
1523
  FEATURE_ICONS,
1524
1524
  FUNCTION,
1525
- GEMINI_30_FLASH,
1525
+ GEMINI_35_FLASH,
1526
1526
  GEMINI_25_PRO_TTS,
1527
1527
  GEMINI_30_PRO_IMAGE,
1528
1528
  GEMINI_31_PRO,
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": "2001.1.154",
4
+ "version": "2001.1.155",
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": "2001.1.154",
4
+ "version": "2001.1.155",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",