@absolutejs/ai 0.2.7 → 0.2.9

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.
@@ -70,18 +70,27 @@ var __decorateElement = (array, flags, name, decorators, target, extra) => {
70
70
 
71
71
  // src/ai/models/catalog.ts
72
72
  var MODEL_METADATA = {
73
+ "anthropic:claude-opus-5-5": {
74
+ input: ["text", "image", "pdf"],
75
+ output: ["text"],
76
+ features: ["reasoning", "tools", "structured-output", "prompt-cache"],
77
+ contextWindow: 1e6,
78
+ sources: [
79
+ "https://platform.claude.com/docs/en/api/models/retrieve",
80
+ "https://platform.claude.com/docs/en/build-with-claude/prompt-caching"
81
+ ],
82
+ reviewedAt: "2026-09-25"
83
+ },
73
84
  "anthropic:claude-fable-5-1": {
74
85
  input: ["text", "image", "pdf"],
75
86
  output: ["text"],
76
87
  features: ["reasoning", "tools", "structured-output", "prompt-cache"],
77
88
  contextWindow: 1e6,
78
89
  sources: [
79
- "https://platform.claude.com/docs/en/models/overview",
80
- "https://platform.claude.com/docs/en/build-with-claude/pdf-support",
81
- "https://platform.claude.com/docs/en/build-with-claude/structured-outputs",
90
+ "https://platform.claude.com/docs/en/api/models/retrieve",
82
91
  "https://platform.claude.com/docs/en/build-with-claude/prompt-caching"
83
92
  ],
84
- reviewedAt: "2026-09-20"
93
+ reviewedAt: "2026-09-25"
85
94
  },
86
95
  "anthropic:claude-opus-5": {
87
96
  input: ["text", "image", "pdf"],
@@ -89,12 +98,10 @@ var MODEL_METADATA = {
89
98
  features: ["reasoning", "tools", "structured-output", "prompt-cache"],
90
99
  contextWindow: 1e6,
91
100
  sources: [
92
- "https://platform.claude.com/docs/en/models/overview",
93
- "https://platform.claude.com/docs/en/build-with-claude/pdf-support",
94
- "https://platform.claude.com/docs/en/build-with-claude/structured-outputs",
101
+ "https://platform.claude.com/docs/en/api/models/retrieve",
95
102
  "https://platform.claude.com/docs/en/build-with-claude/prompt-caching"
96
103
  ],
97
- reviewedAt: "2026-09-20"
104
+ reviewedAt: "2026-09-25"
98
105
  },
99
106
  "anthropic:claude-sonnet-5": {
100
107
  input: ["text", "image", "pdf"],
@@ -102,49 +109,98 @@ var MODEL_METADATA = {
102
109
  features: ["reasoning", "tools", "structured-output", "prompt-cache"],
103
110
  contextWindow: 1e6,
104
111
  sources: [
105
- "https://platform.claude.com/docs/en/models/overview",
106
- "https://platform.claude.com/docs/en/build-with-claude/pdf-support",
107
- "https://platform.claude.com/docs/en/build-with-claude/structured-outputs",
112
+ "https://platform.claude.com/docs/en/api/models/retrieve",
108
113
  "https://platform.claude.com/docs/en/build-with-claude/prompt-caching"
109
114
  ],
110
- reviewedAt: "2026-09-20"
115
+ reviewedAt: "2026-09-25"
111
116
  },
112
- "anthropic:claude-haiku-4-5": {
117
+ "anthropic:claude-fable-5": {
113
118
  input: ["text", "image", "pdf"],
114
119
  output: ["text"],
115
120
  features: ["reasoning", "tools", "structured-output", "prompt-cache"],
116
- contextWindow: 200000,
121
+ contextWindow: 1e6,
117
122
  sources: [
118
- "https://platform.claude.com/docs/en/models/overview",
119
- "https://platform.claude.com/docs/en/build-with-claude/pdf-support",
120
- "https://platform.claude.com/docs/en/build-with-claude/structured-outputs",
123
+ "https://platform.claude.com/docs/en/api/models/retrieve",
121
124
  "https://platform.claude.com/docs/en/build-with-claude/prompt-caching"
122
125
  ],
123
- reviewedAt: "2026-09-20"
126
+ reviewedAt: "2026-09-25"
124
127
  },
125
- "anthropic:claude-opus-4-6": {
128
+ "anthropic:claude-opus-4-8": {
126
129
  input: ["text", "image", "pdf"],
127
130
  output: ["text"],
128
131
  features: ["reasoning", "tools", "structured-output", "prompt-cache"],
132
+ contextWindow: 1e6,
129
133
  sources: [
130
- "https://platform.claude.com/docs/en/models/overview",
131
- "https://platform.claude.com/docs/en/build-with-claude/pdf-support",
132
- "https://platform.claude.com/docs/en/build-with-claude/structured-outputs",
134
+ "https://platform.claude.com/docs/en/api/models/retrieve",
133
135
  "https://platform.claude.com/docs/en/build-with-claude/prompt-caching"
134
136
  ],
135
- reviewedAt: "2026-09-20"
137
+ reviewedAt: "2026-09-25"
138
+ },
139
+ "anthropic:claude-opus-4-7": {
140
+ input: ["text", "image", "pdf"],
141
+ output: ["text"],
142
+ features: ["reasoning", "tools", "structured-output", "prompt-cache"],
143
+ contextWindow: 1e6,
144
+ sources: [
145
+ "https://platform.claude.com/docs/en/api/models/retrieve",
146
+ "https://platform.claude.com/docs/en/build-with-claude/prompt-caching"
147
+ ],
148
+ reviewedAt: "2026-09-25"
136
149
  },
137
150
  "anthropic:claude-sonnet-4-6": {
138
151
  input: ["text", "image", "pdf"],
139
152
  output: ["text"],
140
153
  features: ["reasoning", "tools", "structured-output", "prompt-cache"],
154
+ contextWindow: 1e6,
141
155
  sources: [
142
- "https://platform.claude.com/docs/en/models/overview",
143
- "https://platform.claude.com/docs/en/build-with-claude/pdf-support",
144
- "https://platform.claude.com/docs/en/build-with-claude/structured-outputs",
156
+ "https://platform.claude.com/docs/en/api/models/retrieve",
145
157
  "https://platform.claude.com/docs/en/build-with-claude/prompt-caching"
146
158
  ],
147
- reviewedAt: "2026-09-20"
159
+ reviewedAt: "2026-09-25"
160
+ },
161
+ "anthropic:claude-opus-4-6": {
162
+ input: ["text", "image", "pdf"],
163
+ output: ["text"],
164
+ features: ["reasoning", "tools", "structured-output", "prompt-cache"],
165
+ contextWindow: 1e6,
166
+ sources: [
167
+ "https://platform.claude.com/docs/en/api/models/retrieve",
168
+ "https://platform.claude.com/docs/en/build-with-claude/prompt-caching"
169
+ ],
170
+ reviewedAt: "2026-09-25"
171
+ },
172
+ "anthropic:claude-opus-4-5": {
173
+ input: ["text", "image", "pdf"],
174
+ output: ["text"],
175
+ features: ["reasoning", "tools", "structured-output", "prompt-cache"],
176
+ contextWindow: 200000,
177
+ sources: [
178
+ "https://platform.claude.com/docs/en/api/models/retrieve",
179
+ "https://platform.claude.com/docs/en/build-with-claude/prompt-caching"
180
+ ],
181
+ reviewedAt: "2026-09-25"
182
+ },
183
+ "anthropic:claude-haiku-4-5": {
184
+ input: ["text", "image", "pdf"],
185
+ output: ["text"],
186
+ features: ["reasoning", "tools", "structured-output", "prompt-cache"],
187
+ contextWindow: 200000,
188
+ sources: [
189
+ "https://platform.claude.com/docs/en/api/models/retrieve",
190
+ "https://platform.claude.com/docs/en/build-with-claude/prompt-caching"
191
+ ],
192
+ reviewedAt: "2026-09-25"
193
+ },
194
+ "anthropic:claude-sonnet-4-5": {
195
+ input: ["text", "image", "pdf"],
196
+ output: ["text"],
197
+ features: ["reasoning", "tools", "structured-output", "prompt-cache"],
198
+ contextWindow: 1e6,
199
+ sources: [
200
+ "https://platform.claude.com/docs/en/api/models/retrieve",
201
+ "https://platform.claude.com/docs/en/build-with-claude/prompt-caching"
202
+ ],
203
+ reviewedAt: "2026-09-25"
148
204
  },
149
205
  "openai:gpt-6-astra": {
150
206
  input: ["text", "image", "pdf"],
@@ -360,6 +416,7 @@ var claude46 = {
360
416
  ...claude,
361
417
  efforts: ["low", "medium", "high", "max"]
362
418
  };
419
+ var opus45 = { ...claude, efforts: ["low", "medium", "high"] };
363
420
  var haiku = profile("budget", ["none", "low", "medium", "high"], "Thinking-token budget: Low 2,048; Medium 8,192; High 16,384. Actual usage can be lower.", "https://platform.claude.com/docs/en/build-with-claude/extended-thinking");
364
421
  var gpt = profile("effort", ["none", "low", "medium", "high", "xhigh", "max"], claude.description, "https://developers.openai.com/api/docs/models/gpt-5.6-sol");
365
422
  var gemini = profile("effort", ["low", "medium", "high"], claude.description, "https://ai.google.dev/gemini-api/docs/openai");
@@ -367,12 +424,18 @@ var deepseek = profile("effort", ["none", "low", "high", "max"], claude.descript
367
424
  var mistral = profile("effort", ["none", "high"], "Minimal thinking or full reasoning. This model does not offer intermediate effort levels.", "https://docs.mistral.ai/studio/conversations/reasoning");
368
425
  var qwen = profile("budget", ["none", "low", "medium", "high"], haiku.description, "https://help.aliyun.com/en/model-studio/deep-thinking");
369
426
  var MODEL_REASONING = {
427
+ "anthropic:claude-opus-5-5": claude,
370
428
  "anthropic:claude-fable-5-1": claude,
371
429
  "anthropic:claude-opus-5": claude,
372
430
  "anthropic:claude-sonnet-5": claude,
431
+ "anthropic:claude-fable-5": claude,
432
+ "anthropic:claude-opus-4-8": claude,
433
+ "anthropic:claude-opus-4-7": claude,
373
434
  "anthropic:claude-sonnet-4-6": claude46,
374
435
  "anthropic:claude-opus-4-6": claude46,
436
+ "anthropic:claude-opus-4-5": opus45,
375
437
  "anthropic:claude-haiku-4-5": haiku,
438
+ "anthropic:claude-sonnet-4-5": haiku,
376
439
  "openai:gpt-6-astra": {
377
440
  ...gpt,
378
441
  efforts: ["low", "medium", "high", "xhigh", "max"],
@@ -405,6 +468,252 @@ var reasoningSelectionLabel = (selection, provider) => {
405
468
  return "Extra high";
406
469
  return selection.charAt(0).toUpperCase() + selection.slice(1);
407
470
  };
471
+ // src/ai/models/directory.ts
472
+ var MODEL_PROVIDERS = {
473
+ anthropic: "Anthropic",
474
+ openai: "OpenAI",
475
+ google: "Google",
476
+ xai: "xAI",
477
+ deepseek: "DeepSeek",
478
+ mistral: "Mistral",
479
+ alibaba: "Alibaba",
480
+ moonshot: "Moonshot AI",
481
+ meta: "Meta"
482
+ };
483
+ var MODEL_DIRECTORY = [
484
+ {
485
+ provider: "anthropic",
486
+ id: "claude-opus-5-5",
487
+ name: "Claude Opus 5.5",
488
+ description: "Anthropic’s newest Opus, for the most demanding work.",
489
+ featured: true,
490
+ tier: "frontier"
491
+ },
492
+ {
493
+ provider: "anthropic",
494
+ id: "claude-fable-5-1",
495
+ name: "Claude Fable 5.1",
496
+ description: "Deep reasoning and long-running agentic work."
497
+ },
498
+ {
499
+ provider: "anthropic",
500
+ id: "claude-opus-5",
501
+ name: "Claude Opus 5",
502
+ description: "Complex coding and ambitious projects."
503
+ },
504
+ {
505
+ provider: "anthropic",
506
+ id: "claude-sonnet-5",
507
+ name: "Claude Sonnet 5",
508
+ description: "Balanced speed and intelligence.",
509
+ tier: "balanced"
510
+ },
511
+ {
512
+ provider: "anthropic",
513
+ id: "claude-fable-5",
514
+ name: "Claude Fable 5",
515
+ description: "The earlier Fable release.",
516
+ legacy: true
517
+ },
518
+ {
519
+ provider: "anthropic",
520
+ id: "claude-opus-4-8",
521
+ name: "Claude Opus 4.8",
522
+ description: "The last Opus 4 release.",
523
+ legacy: true
524
+ },
525
+ {
526
+ provider: "anthropic",
527
+ id: "claude-opus-4-7",
528
+ name: "Claude Opus 4.7",
529
+ description: "An earlier Opus 4 release.",
530
+ legacy: true
531
+ },
532
+ {
533
+ provider: "anthropic",
534
+ id: "claude-sonnet-4-6",
535
+ name: "Claude Sonnet 4.6",
536
+ description: "Dependable everyday work."
537
+ },
538
+ {
539
+ provider: "anthropic",
540
+ id: "claude-opus-4-6",
541
+ name: "Claude Opus 4.6",
542
+ description: "Detailed coding and architecture.",
543
+ legacy: true
544
+ },
545
+ {
546
+ provider: "anthropic",
547
+ id: "claude-haiku-4-5",
548
+ name: "Claude Haiku 4.5",
549
+ description: "Quick, focused tasks.",
550
+ tier: "fast"
551
+ },
552
+ {
553
+ provider: "anthropic",
554
+ id: "claude-opus-4-5",
555
+ name: "Claude Opus 4.5",
556
+ description: "Older generation, kept for compatibility.",
557
+ legacy: true
558
+ },
559
+ {
560
+ provider: "anthropic",
561
+ id: "claude-sonnet-4-5",
562
+ name: "Claude Sonnet 4.5",
563
+ description: "Older generation, kept for compatibility.",
564
+ legacy: true
565
+ },
566
+ {
567
+ provider: "openai",
568
+ id: "gpt-6-astra",
569
+ name: "GPT-6 Astra",
570
+ description: "Frontier reasoning for demanding work.",
571
+ featured: true,
572
+ tier: "frontier"
573
+ },
574
+ {
575
+ provider: "openai",
576
+ id: "gpt-5.6-sol",
577
+ name: "GPT-5.6 Sol",
578
+ description: "Complex professional and coding work."
579
+ },
580
+ {
581
+ provider: "openai",
582
+ id: "gpt-5.6-terra",
583
+ name: "GPT-5.6 Terra",
584
+ description: "Balances capability and efficiency.",
585
+ tier: "balanced"
586
+ },
587
+ {
588
+ provider: "openai",
589
+ id: "gpt-5.6-luna",
590
+ name: "GPT-5.6 Luna",
591
+ description: "Fast, economical everyday work.",
592
+ tier: "fast"
593
+ },
594
+ {
595
+ provider: "google",
596
+ id: "gemini-3.8-flash",
597
+ name: "Gemini 3.8 Flash",
598
+ description: "Fast reasoning and long-horizon software work.",
599
+ featured: true
600
+ },
601
+ {
602
+ provider: "google",
603
+ id: "gemini-3.1-pro-preview",
604
+ name: "Gemini 3.1 Pro",
605
+ description: "Complex reasoning with multimodal context."
606
+ },
607
+ {
608
+ provider: "google",
609
+ id: "gemini-2.5-flash",
610
+ name: "Gemini 2.5 Flash",
611
+ description: "Efficient, low-latency assistance.",
612
+ legacy: true
613
+ },
614
+ {
615
+ provider: "xai",
616
+ id: "grok-4.6",
617
+ name: "Grok 4.6",
618
+ description: "Reasoning, code, and agentic tool use.",
619
+ featured: true
620
+ },
621
+ {
622
+ provider: "deepseek",
623
+ id: "deepseek-flash",
624
+ name: "DeepSeek V4.1 Flash",
625
+ description: "Efficient reasoning with a large context window.",
626
+ featured: true
627
+ },
628
+ {
629
+ provider: "deepseek",
630
+ id: "deepseek-v4-pro",
631
+ name: "DeepSeek V4 Pro",
632
+ description: "Detailed reasoning and code generation."
633
+ },
634
+ {
635
+ provider: "mistral",
636
+ id: "mistral-medium-3-5",
637
+ name: "Mistral Medium 3.5",
638
+ description: "Agentic coding and multimodal work.",
639
+ featured: true
640
+ },
641
+ {
642
+ provider: "mistral",
643
+ id: "mistral-small-latest",
644
+ name: "Mistral Small",
645
+ description: "Compact, efficient assistance."
646
+ },
647
+ {
648
+ provider: "alibaba",
649
+ id: "qwen3.8-max",
650
+ name: "Qwen3.8 Max",
651
+ description: "Advanced reasoning from the Qwen family.",
652
+ featured: true
653
+ },
654
+ {
655
+ provider: "alibaba",
656
+ id: "qwen3.7-plus",
657
+ name: "Qwen3.7 Plus",
658
+ description: "Balanced reasoning and everyday work."
659
+ },
660
+ {
661
+ provider: "moonshot",
662
+ id: "kimi-k3",
663
+ name: "Kimi K3",
664
+ description: "Long-horizon coding and agentic tasks.",
665
+ featured: true
666
+ },
667
+ {
668
+ provider: "moonshot",
669
+ id: "kimi-k2.7-code",
670
+ name: "Kimi K2.7 Code",
671
+ description: "Focused coding assistance."
672
+ },
673
+ {
674
+ provider: "meta",
675
+ id: "Llama-4-Maverick-17B-128E-Instruct-FP8",
676
+ name: "Llama 4 Maverick",
677
+ description: "Hosted multimodal reasoning from Meta.",
678
+ featured: true
679
+ }
680
+ ];
681
+ var modelKey = (model) => `${model.provider}:${model.id}`;
682
+ var listModels = (options = {}) => MODEL_DIRECTORY.filter((entry) => (!options.providers || options.providers.includes(entry.provider)) && (options.includeLegacy || !entry.legacy)).map((entry) => {
683
+ const metadata = getModelMetadata(entry.provider, entry.id);
684
+ return {
685
+ ...entry,
686
+ key: modelKey(entry),
687
+ providerName: MODEL_PROVIDERS[entry.provider] ?? entry.provider,
688
+ capabilities: modelCapabilities(metadata),
689
+ contextWindow: metadata?.contextWindow ?? null,
690
+ reasoningEfforts: getModelReasoning(entry.provider, entry.id)?.efforts ?? []
691
+ };
692
+ });
693
+ var findModel = (provider, id) => MODEL_DIRECTORY.find((entry) => entry.provider === provider && entry.id === id);
694
+ var DEEP_WORK = /\b(architect(ure)?|design|strategy|plan (the|a|an)|refactor|migrat(e|ion)|security|audit|investigate|root cause|debug|analy[sz]e|compare|trade-?offs?|proposal|roadmap)\b/i;
695
+ var SUBSTANTIAL_WORK = /\b(auth|authentication|login|sign-?in|payment|database|api|backend|integration|workflow|implement|build|and then|also)\b/i;
696
+ var SMALL_EDIT = /^(please\s+)?(change|rename|replace|remove|update|fix|reword|shorten)\b.{0,100}\b(label|heading|title|text|copy|wording|typo|name|date|color|colour)\b/i;
697
+ var SIMPLE_QUESTION = /^(what|where|which|who|when|explain|show|find|list|summari[sz]e)\b/i;
698
+ var SMALL_REQUEST = 240;
699
+ var LARGE_REQUEST = 2000;
700
+ var recommendTier = (input) => {
701
+ const message = input.message.trim();
702
+ if (input.depth === "deep" || message.length > LARGE_REQUEST || DEEP_WORK.test(message))
703
+ return "frontier";
704
+ if (message.length <= SMALL_REQUEST && !SUBSTANTIAL_WORK.test(message) && (SMALL_EDIT.test(message) || SIMPLE_QUESTION.test(message)))
705
+ return "fast";
706
+ return "balanced";
707
+ };
708
+ var recommendModel = (input) => {
709
+ const tier = recommendTier(input);
710
+ for (const provider of input.providers) {
711
+ const match = MODEL_DIRECTORY.find((entry) => entry.provider === provider && entry.tier === tier && !entry.legacy);
712
+ if (match)
713
+ return { ...match, tier };
714
+ }
715
+ return;
716
+ };
408
717
 
409
718
  // src/ai/models/index.ts
410
719
  var MODEL_CAPABILITY_DESCRIPTIONS = {
@@ -463,16 +772,23 @@ var modelCapabilities = (metadata) => {
463
772
  };
464
773
  export {
465
774
  MODEL_CAPABILITY_DESCRIPTIONS,
775
+ MODEL_DIRECTORY,
466
776
  MODEL_METADATA,
777
+ MODEL_PROVIDERS,
467
778
  MODEL_REASONING,
468
779
  REASONING_EFFORTS,
780
+ findModel,
469
781
  getModelMetadata,
470
782
  getModelReasoning,
471
783
  isReasoningSelection,
784
+ listModels,
472
785
  modelCapabilities,
786
+ modelKey,
473
787
  reasoningSelectionLabel,
788
+ recommendModel,
789
+ recommendTier,
474
790
  supportsReasoningSelection
475
791
  };
476
792
 
477
- //# debugId=FE98AA17F4CDF80C64756E2164756E21
793
+ //# debugId=B00BA05FE5829EFA64756E2164756E21
478
794
  //# sourceMappingURL=index.js.map