@absolutejs/ai 0.2.1 → 0.2.3

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/CHANGELOG.md CHANGED
@@ -6,6 +6,18 @@ This file is generated by `absolute-changelog` from the entries in
6
6
  `changelog/`. Edit an entry, not this file — and add new ones under
7
7
  `changelog/unreleased/`.
8
8
 
9
+ ## 0.2.3 — 2026-09-20
10
+
11
+ ### Internal
12
+
13
+ - **Republish the capability catalog using npm packaging after the 0.2.2 registry artifact remained unavailable**
14
+
15
+ ## 0.2.2 — 2026-09-20
16
+
17
+ ### Added
18
+
19
+ - **Add browser-safe typed model capability metadata with verified provider sources, separate input and output modalities, context windows, and capability descriptions** (`ModelModality`, `ModelFeature`, `ModelMetadata`, `ModelCapability`, `MODEL_CAPABILITY_DESCRIPTIONS`, `MODEL_METADATA`, `modelCapabilities`, `getModelMetadata`)
20
+
9
21
  ## 0.2.1 — 2026-09-16
10
22
 
11
23
  ### Fixed
package/README.md CHANGED
@@ -514,3 +514,17 @@ const provider = createAIProviderRouter({
514
514
  `streamAIWithTools` includes each completed turn's provider response `metadata`
515
515
  on its `turn` event. Price that turn using the returned `serviceTier`, when
516
516
  available, rather than assuming that the requested processing tier was served.
517
+
518
+ ## Model capability metadata
519
+
520
+ `@absolutejs/ai/models` is a browser-safe, dependency-free catalog.
521
+ Use `getModelMetadata(provider, id)` and `modelCapabilities(metadata)` to build
522
+ model selectors. Metadata separates input modalities, output modalities, and
523
+ provider features, with source URLs and a review date. Unknown IDs return
524
+ `undefined`; absence of a badge is not evidence of unsupported functionality.
525
+
526
+ These are provider capabilities, not application enablement or account entitlement.
527
+ Consumers must separately explain whether attachments, hosted search, structured
528
+ output, and media generation are enabled in their UI and endpoint. Context windows
529
+ are documented provider limits, not a substitute for runtime token budgeting.
530
+ Regional features are omitted when they are not consistently supported.
package/changelog.json CHANGED
@@ -2,6 +2,36 @@
2
2
  "contract": 1,
3
3
  "name": "@absolutejs/ai",
4
4
  "releases": [
5
+ {
6
+ "changes": [
7
+ {
8
+ "kind": "internal",
9
+ "summary": "Republish the capability catalog using npm packaging after the 0.2.2 registry artifact remained unavailable"
10
+ }
11
+ ],
12
+ "date": "2026-09-20",
13
+ "version": "0.2.3"
14
+ },
15
+ {
16
+ "changes": [
17
+ {
18
+ "kind": "added",
19
+ "summary": "Add browser-safe typed model capability metadata with verified provider sources, separate input and output modalities, context windows, and capability descriptions",
20
+ "symbols": [
21
+ "ModelModality",
22
+ "ModelFeature",
23
+ "ModelMetadata",
24
+ "ModelCapability",
25
+ "MODEL_CAPABILITY_DESCRIPTIONS",
26
+ "MODEL_METADATA",
27
+ "modelCapabilities",
28
+ "getModelMetadata"
29
+ ]
30
+ }
31
+ ],
32
+ "date": "2026-09-20",
33
+ "version": "0.2.2"
34
+ },
5
35
  {
6
36
  "changes": [
7
37
  {
@@ -0,0 +1,410 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __name = (target, name) => {
5
+ Object.defineProperty(target, "name", {
6
+ value: name,
7
+ enumerable: false,
8
+ configurable: true
9
+ });
10
+ return target;
11
+ };
12
+ var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
13
+ var __typeError = (msg) => {
14
+ throw TypeError(msg);
15
+ };
16
+ var __defNormalProp = (obj, key, value) => (key in obj) ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
18
+ var __privateIn = (member, obj) => Object(obj) !== obj ? __typeError('Cannot use the "in" operator on this value') : member.has(obj);
19
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
20
+ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
21
+ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
22
+ var __decoratorStart = (base) => [, , , __create(base?.[__knownSymbol("metadata")] ?? null)];
23
+ var __decoratorStrings = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"];
24
+ var __expectFn = (fn) => fn !== undefined && typeof fn !== "function" ? __typeError("Function expected") : fn;
25
+ var __decoratorContext = (kind, name, done, metadata, fns) => ({
26
+ kind: __decoratorStrings[kind],
27
+ name,
28
+ metadata,
29
+ addInitializer: (fn) => done._ ? __typeError("Already initialized") : fns.push(__expectFn(fn || null))
30
+ });
31
+ var __decoratorMetadata = (array, target) => __defNormalProp(target, __knownSymbol("metadata"), array[3]);
32
+ var __runInitializers = (array, flags, self, value) => {
33
+ for (var i = 0, fns = array[flags >> 1], n = fns && fns.length;i < n; i++)
34
+ flags & 1 ? fns[i].call(self) : value = fns[i].call(self, value);
35
+ return value;
36
+ };
37
+ var __decorateElement = (array, flags, name, decorators, target, extra) => {
38
+ var fn, it, done, ctx, access, k = flags & 7, s = !!(flags & 8), p = !!(flags & 16);
39
+ var j = k > 3 ? array.length + 1 : k ? s ? 1 : 2 : 0, key = __decoratorStrings[k + 5];
40
+ var initializers = k > 3 && (array[j - 1] = []), extraInitializers = array[j] || (array[j] = []);
41
+ var desc = k && (!p && !s && (target = target.prototype), k < 5 && (k > 3 || !p) && __getOwnPropDesc(k < 4 ? target : {
42
+ get [name]() {
43
+ return __privateGet(this, extra);
44
+ },
45
+ set [name](x) {
46
+ __privateSet(this, extra, x);
47
+ }
48
+ }, name));
49
+ k ? p && k < 4 && __name(extra, (k > 2 ? "set " : k > 1 ? "get " : "") + name) : __name(target, name);
50
+ for (var i = decorators.length - 1;i >= 0; i--) {
51
+ ctx = __decoratorContext(k, name, done = {}, array[3], extraInitializers);
52
+ if (k) {
53
+ ctx.static = s, ctx.private = p, access = ctx.access = { has: p ? (x) => __privateIn(target, x) : (x) => (name in x) };
54
+ if (k ^ 3)
55
+ access.get = p ? (x) => (k ^ 1 ? __privateGet : __privateMethod)(x, target, k ^ 4 ? extra : desc.get) : (x) => x[name];
56
+ if (k > 2)
57
+ access.set = p ? (x, y) => __privateSet(x, target, y, k ^ 4 ? extra : desc.set) : (x, y) => x[name] = y;
58
+ }
59
+ it = (0, decorators[i])(k ? k < 4 ? p ? extra : desc[key] : k > 4 ? undefined : { get: desc.get, set: desc.set } : target, ctx);
60
+ done._ = 1;
61
+ if (k ^ 4 || it === undefined)
62
+ __expectFn(it) && (k > 4 ? initializers.unshift(it) : k ? p ? extra = it : desc[key] = it : target = it);
63
+ else if (typeof it !== "object" || it === null)
64
+ __typeError("Object expected");
65
+ else
66
+ __expectFn(fn = it.get) && (desc.get = fn), __expectFn(fn = it.set) && (desc.set = fn), __expectFn(fn = it.init) && initializers.unshift(fn);
67
+ }
68
+ return k || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p ? k ^ 4 ? extra : desc : target;
69
+ };
70
+
71
+ // src/ai/models/catalog.ts
72
+ var MODEL_METADATA = {
73
+ "anthropic:claude-fable-5-1": {
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/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",
82
+ "https://platform.claude.com/docs/en/build-with-claude/prompt-caching"
83
+ ],
84
+ reviewedAt: "2026-09-20"
85
+ },
86
+ "anthropic:claude-opus-5": {
87
+ input: ["text", "image", "pdf"],
88
+ output: ["text"],
89
+ features: ["reasoning", "tools", "structured-output", "prompt-cache"],
90
+ contextWindow: 1e6,
91
+ 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",
95
+ "https://platform.claude.com/docs/en/build-with-claude/prompt-caching"
96
+ ],
97
+ reviewedAt: "2026-09-20"
98
+ },
99
+ "anthropic:claude-sonnet-5": {
100
+ input: ["text", "image", "pdf"],
101
+ output: ["text"],
102
+ features: ["reasoning", "tools", "structured-output", "prompt-cache"],
103
+ contextWindow: 1e6,
104
+ 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",
108
+ "https://platform.claude.com/docs/en/build-with-claude/prompt-caching"
109
+ ],
110
+ reviewedAt: "2026-09-20"
111
+ },
112
+ "anthropic:claude-haiku-4-5": {
113
+ input: ["text", "image", "pdf"],
114
+ output: ["text"],
115
+ features: ["reasoning", "tools", "structured-output", "prompt-cache"],
116
+ contextWindow: 200000,
117
+ 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",
121
+ "https://platform.claude.com/docs/en/build-with-claude/prompt-caching"
122
+ ],
123
+ reviewedAt: "2026-09-20"
124
+ },
125
+ "anthropic:claude-opus-4-6": {
126
+ input: ["text", "image", "pdf"],
127
+ output: ["text"],
128
+ features: ["reasoning", "tools", "structured-output", "prompt-cache"],
129
+ 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",
133
+ "https://platform.claude.com/docs/en/build-with-claude/prompt-caching"
134
+ ],
135
+ reviewedAt: "2026-09-20"
136
+ },
137
+ "anthropic:claude-sonnet-4-6": {
138
+ input: ["text", "image", "pdf"],
139
+ output: ["text"],
140
+ features: ["reasoning", "tools", "structured-output", "prompt-cache"],
141
+ 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",
145
+ "https://platform.claude.com/docs/en/build-with-claude/prompt-caching"
146
+ ],
147
+ reviewedAt: "2026-09-20"
148
+ },
149
+ "openai:gpt-6-astra": {
150
+ input: ["text", "image", "pdf"],
151
+ output: ["text"],
152
+ features: [
153
+ "reasoning",
154
+ "tools",
155
+ "structured-output",
156
+ "prompt-cache",
157
+ "web-search"
158
+ ],
159
+ contextWindow: 1050000,
160
+ sources: [
161
+ "https://developers.openai.com/api/docs/models/gpt-6-astra",
162
+ "https://developers.openai.com/api/docs/guides/pdf-files"
163
+ ],
164
+ reviewedAt: "2026-09-20"
165
+ },
166
+ "openai:gpt-5.6-sol": {
167
+ input: ["text", "image", "pdf"],
168
+ output: ["text"],
169
+ features: [
170
+ "reasoning",
171
+ "tools",
172
+ "structured-output",
173
+ "prompt-cache",
174
+ "web-search"
175
+ ],
176
+ contextWindow: 1050000,
177
+ sources: [
178
+ "https://developers.openai.com/api/docs/models/gpt-5.6-sol",
179
+ "https://developers.openai.com/api/docs/guides/pdf-files"
180
+ ],
181
+ reviewedAt: "2026-09-20"
182
+ },
183
+ "openai:gpt-5.6-terra": {
184
+ input: ["text", "image", "pdf"],
185
+ output: ["text"],
186
+ features: [
187
+ "reasoning",
188
+ "tools",
189
+ "structured-output",
190
+ "prompt-cache",
191
+ "web-search"
192
+ ],
193
+ contextWindow: 1050000,
194
+ sources: [
195
+ "https://developers.openai.com/api/docs/models/gpt-5.6-terra",
196
+ "https://developers.openai.com/api/docs/guides/pdf-files"
197
+ ],
198
+ reviewedAt: "2026-09-20"
199
+ },
200
+ "openai:gpt-5.6-luna": {
201
+ input: ["text", "image", "pdf"],
202
+ output: ["text"],
203
+ features: [
204
+ "reasoning",
205
+ "tools",
206
+ "structured-output",
207
+ "prompt-cache",
208
+ "web-search"
209
+ ],
210
+ contextWindow: 1050000,
211
+ sources: [
212
+ "https://developers.openai.com/api/docs/models/gpt-5.6-luna",
213
+ "https://developers.openai.com/api/docs/guides/pdf-files"
214
+ ],
215
+ reviewedAt: "2026-09-20"
216
+ },
217
+ "google:gemini-3.8-flash": {
218
+ input: ["text", "image", "pdf", "audio", "video"],
219
+ output: ["text"],
220
+ features: [
221
+ "reasoning",
222
+ "tools",
223
+ "structured-output",
224
+ "prompt-cache",
225
+ "web-search"
226
+ ],
227
+ contextWindow: 1048576,
228
+ sources: ["https://ai.google.dev/gemini-api/docs/models/gemini-3.8-flash"],
229
+ reviewedAt: "2026-09-20"
230
+ },
231
+ "google:gemini-3.1-pro-preview": {
232
+ input: ["text", "image", "pdf", "audio", "video"],
233
+ output: ["text"],
234
+ features: [
235
+ "reasoning",
236
+ "tools",
237
+ "structured-output",
238
+ "prompt-cache",
239
+ "web-search"
240
+ ],
241
+ contextWindow: 1048576,
242
+ sources: [
243
+ "https://ai.google.dev/gemini-api/docs/models/gemini-3.1-pro-preview"
244
+ ],
245
+ reviewedAt: "2026-09-20"
246
+ },
247
+ "google:gemini-2.5-flash": {
248
+ input: ["text", "image", "pdf", "audio", "video"],
249
+ output: ["text"],
250
+ features: [
251
+ "reasoning",
252
+ "tools",
253
+ "structured-output",
254
+ "prompt-cache",
255
+ "web-search"
256
+ ],
257
+ contextWindow: 1048576,
258
+ sources: ["https://ai.google.dev/gemini-api/docs/models/gemini-2.5-flash"],
259
+ reviewedAt: "2026-09-20"
260
+ },
261
+ "xai:grok-4.6": {
262
+ input: ["text", "image"],
263
+ output: ["text"],
264
+ features: [
265
+ "reasoning",
266
+ "tools",
267
+ "structured-output",
268
+ "prompt-cache",
269
+ "web-search"
270
+ ],
271
+ contextWindow: 500000,
272
+ sources: [
273
+ "https://docs.x.ai/developers/grok-4-6",
274
+ "https://docs.x.ai/developers/model-capabilities/text/structured-outputs"
275
+ ],
276
+ reviewedAt: "2026-09-20"
277
+ },
278
+ "deepseek:deepseek-flash": {
279
+ input: ["text", "image"],
280
+ output: ["text"],
281
+ features: ["reasoning", "tools", "prompt-cache"],
282
+ contextWindow: 1e6,
283
+ sources: ["https://api-docs.deepseek.com/quick_start/pricing/"],
284
+ reviewedAt: "2026-09-20"
285
+ },
286
+ "deepseek:deepseek-v4-pro": {
287
+ input: ["text"],
288
+ output: ["text"],
289
+ features: ["reasoning", "tools", "prompt-cache"],
290
+ contextWindow: 1e6,
291
+ sources: ["https://api-docs.deepseek.com/quick_start/pricing/"],
292
+ reviewedAt: "2026-09-20"
293
+ },
294
+ "mistral:mistral-medium-3-5": {
295
+ input: ["text", "image", "pdf"],
296
+ output: ["text"],
297
+ features: ["reasoning", "tools", "structured-output"],
298
+ contextWindow: 256000,
299
+ sources: ["https://docs.mistral.ai/models/mistral-medium-3-5-26-04"],
300
+ reviewedAt: "2026-09-20"
301
+ },
302
+ "moonshot:kimi-k3": {
303
+ input: ["text", "image", "video"],
304
+ output: ["text"],
305
+ features: ["reasoning", "tools", "prompt-cache"],
306
+ contextWindow: 1e6,
307
+ sources: ["https://platform.kimi.ai/docs/guide/kimi-k3-quickstart"],
308
+ reviewedAt: "2026-09-20"
309
+ },
310
+ "moonshot:kimi-k2.7-code": {
311
+ input: ["text", "image", "video"],
312
+ output: ["text"],
313
+ features: ["reasoning", "tools", "prompt-cache"],
314
+ contextWindow: 262144,
315
+ sources: ["https://www.kimi.ai/resources/kimi-k2-7-code"],
316
+ reviewedAt: "2026-09-20"
317
+ },
318
+ "meta:Llama-4-Maverick-17B-128E-Instruct-FP8": {
319
+ input: ["text", "image"],
320
+ output: ["text"],
321
+ features: ["tools"],
322
+ contextWindow: 1e6,
323
+ sources: [
324
+ "https://github.com/meta-llama/llama-models/blob/main/models/llama4/MODEL_CARD.md"
325
+ ],
326
+ reviewedAt: "2026-09-20"
327
+ },
328
+ "alibaba:qwen3.8-max": {
329
+ input: ["text", "image", "video"],
330
+ output: ["text"],
331
+ features: ["reasoning", "tools", "prompt-cache"],
332
+ contextWindow: 1e6,
333
+ sources: ["https://help.aliyun.com/en/model-studio/qwen3-8-max"],
334
+ reviewedAt: "2026-09-20"
335
+ },
336
+ "alibaba:qwen3.7-plus": {
337
+ input: ["text", "image", "video"],
338
+ output: ["text"],
339
+ features: ["reasoning", "tools", "prompt-cache"],
340
+ contextWindow: 1e6,
341
+ sources: ["https://help.aliyun.com/en/model-studio/qwen3-7-plus"],
342
+ reviewedAt: "2026-09-20"
343
+ }
344
+ };
345
+ var getModelMetadata = (provider, id) => MODEL_METADATA[`${provider}:${id}`];
346
+
347
+ // src/ai/models/index.ts
348
+ var MODEL_CAPABILITY_DESCRIPTIONS = {
349
+ Fast: "Suited to quick edits and lightweight tasks; actual speed varies with the request.",
350
+ Reasoning: "Can spend extra thinking time on complex problems.",
351
+ Tools: "Supports function calls for actions such as inspecting and editing code.",
352
+ Vision: "Understands images. This does not mean it generates images.",
353
+ PDF: "Accepts PDF documents, including their text and visual content.",
354
+ Audio: "Understands audio input. This does not mean it generates speech.",
355
+ Video: "Understands video input. This does not mean it generates videos.",
356
+ "Image generation": "Produces images as model output.",
357
+ "Speech generation": "Produces audio as model output.",
358
+ "Video generation": "Produces video as model output.",
359
+ Structured: "Supports schema-constrained output for reliable structured data.",
360
+ Caching: "The provider can reuse matching prompt content to reduce repeated processing. Cache hits are not guaranteed.",
361
+ Search: "Supports a provider-hosted web-search tool when enabled by the application.",
362
+ "Long context": "A documented context window of at least 200,000 tokens. Application and request limits may be lower."
363
+ };
364
+ var INPUT_BADGES = {
365
+ image: "Vision",
366
+ pdf: "PDF",
367
+ audio: "Audio",
368
+ video: "Video"
369
+ };
370
+ var OUTPUT_BADGES = {
371
+ image: "Image generation",
372
+ audio: "Speech generation",
373
+ video: "Video generation"
374
+ };
375
+ var FEATURE_BADGES = {
376
+ reasoning: "Reasoning",
377
+ tools: "Tools",
378
+ "structured-output": "Structured",
379
+ "prompt-cache": "Caching",
380
+ "web-search": "Search"
381
+ };
382
+ var modelCapabilities = (metadata) => {
383
+ if (!metadata)
384
+ return [];
385
+ const badges = new Set;
386
+ for (const feature of metadata.features)
387
+ badges.add(FEATURE_BADGES[feature]);
388
+ for (const input of metadata.input) {
389
+ const badge = INPUT_BADGES[input];
390
+ if (badge)
391
+ badges.add(badge);
392
+ }
393
+ for (const output of metadata.output) {
394
+ const badge = OUTPUT_BADGES[output];
395
+ if (badge)
396
+ badges.add(badge);
397
+ }
398
+ if (metadata.contextWindow && metadata.contextWindow >= 200000)
399
+ badges.add("Long context");
400
+ return [...badges];
401
+ };
402
+ export {
403
+ MODEL_CAPABILITY_DESCRIPTIONS,
404
+ MODEL_METADATA,
405
+ getModelMetadata,
406
+ modelCapabilities
407
+ };
408
+
409
+ //# debugId=8A59BA8BD41CFA0464756E2164756E21
410
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/ai/models/catalog.ts", "../src/ai/models/index.ts"],
4
+ "sourcesContent": [
5
+ "import type { ModelMetadata } from \"./index\";\n\n/** Reviewed provider support, independent of application feature availability. */\nexport const MODEL_METADATA: Readonly<Record<string, ModelMetadata>> = {\n \"anthropic:claude-fable-5-1\": {\n input: [\"text\", \"image\", \"pdf\"],\n output: [\"text\"],\n features: [\"reasoning\", \"tools\", \"structured-output\", \"prompt-cache\"],\n contextWindow: 1000000,\n sources: [\n \"https://platform.claude.com/docs/en/models/overview\",\n \"https://platform.claude.com/docs/en/build-with-claude/pdf-support\",\n \"https://platform.claude.com/docs/en/build-with-claude/structured-outputs\",\n \"https://platform.claude.com/docs/en/build-with-claude/prompt-caching\",\n ],\n reviewedAt: \"2026-09-20\",\n },\n \"anthropic:claude-opus-5\": {\n input: [\"text\", \"image\", \"pdf\"],\n output: [\"text\"],\n features: [\"reasoning\", \"tools\", \"structured-output\", \"prompt-cache\"],\n contextWindow: 1000000,\n sources: [\n \"https://platform.claude.com/docs/en/models/overview\",\n \"https://platform.claude.com/docs/en/build-with-claude/pdf-support\",\n \"https://platform.claude.com/docs/en/build-with-claude/structured-outputs\",\n \"https://platform.claude.com/docs/en/build-with-claude/prompt-caching\",\n ],\n reviewedAt: \"2026-09-20\",\n },\n \"anthropic:claude-sonnet-5\": {\n input: [\"text\", \"image\", \"pdf\"],\n output: [\"text\"],\n features: [\"reasoning\", \"tools\", \"structured-output\", \"prompt-cache\"],\n contextWindow: 1000000,\n sources: [\n \"https://platform.claude.com/docs/en/models/overview\",\n \"https://platform.claude.com/docs/en/build-with-claude/pdf-support\",\n \"https://platform.claude.com/docs/en/build-with-claude/structured-outputs\",\n \"https://platform.claude.com/docs/en/build-with-claude/prompt-caching\",\n ],\n reviewedAt: \"2026-09-20\",\n },\n \"anthropic:claude-haiku-4-5\": {\n input: [\"text\", \"image\", \"pdf\"],\n output: [\"text\"],\n features: [\"reasoning\", \"tools\", \"structured-output\", \"prompt-cache\"],\n contextWindow: 200000,\n sources: [\n \"https://platform.claude.com/docs/en/models/overview\",\n \"https://platform.claude.com/docs/en/build-with-claude/pdf-support\",\n \"https://platform.claude.com/docs/en/build-with-claude/structured-outputs\",\n \"https://platform.claude.com/docs/en/build-with-claude/prompt-caching\",\n ],\n reviewedAt: \"2026-09-20\",\n },\n \"anthropic:claude-opus-4-6\": {\n input: [\"text\", \"image\", \"pdf\"],\n output: [\"text\"],\n features: [\"reasoning\", \"tools\", \"structured-output\", \"prompt-cache\"],\n sources: [\n \"https://platform.claude.com/docs/en/models/overview\",\n \"https://platform.claude.com/docs/en/build-with-claude/pdf-support\",\n \"https://platform.claude.com/docs/en/build-with-claude/structured-outputs\",\n \"https://platform.claude.com/docs/en/build-with-claude/prompt-caching\",\n ],\n reviewedAt: \"2026-09-20\",\n },\n \"anthropic:claude-sonnet-4-6\": {\n input: [\"text\", \"image\", \"pdf\"],\n output: [\"text\"],\n features: [\"reasoning\", \"tools\", \"structured-output\", \"prompt-cache\"],\n sources: [\n \"https://platform.claude.com/docs/en/models/overview\",\n \"https://platform.claude.com/docs/en/build-with-claude/pdf-support\",\n \"https://platform.claude.com/docs/en/build-with-claude/structured-outputs\",\n \"https://platform.claude.com/docs/en/build-with-claude/prompt-caching\",\n ],\n reviewedAt: \"2026-09-20\",\n },\n \"openai:gpt-6-astra\": {\n input: [\"text\", \"image\", \"pdf\"],\n output: [\"text\"],\n features: [\n \"reasoning\",\n \"tools\",\n \"structured-output\",\n \"prompt-cache\",\n \"web-search\",\n ],\n contextWindow: 1050000,\n sources: [\n \"https://developers.openai.com/api/docs/models/gpt-6-astra\",\n \"https://developers.openai.com/api/docs/guides/pdf-files\",\n ],\n reviewedAt: \"2026-09-20\",\n },\n \"openai:gpt-5.6-sol\": {\n input: [\"text\", \"image\", \"pdf\"],\n output: [\"text\"],\n features: [\n \"reasoning\",\n \"tools\",\n \"structured-output\",\n \"prompt-cache\",\n \"web-search\",\n ],\n contextWindow: 1050000,\n sources: [\n \"https://developers.openai.com/api/docs/models/gpt-5.6-sol\",\n \"https://developers.openai.com/api/docs/guides/pdf-files\",\n ],\n reviewedAt: \"2026-09-20\",\n },\n \"openai:gpt-5.6-terra\": {\n input: [\"text\", \"image\", \"pdf\"],\n output: [\"text\"],\n features: [\n \"reasoning\",\n \"tools\",\n \"structured-output\",\n \"prompt-cache\",\n \"web-search\",\n ],\n contextWindow: 1050000,\n sources: [\n \"https://developers.openai.com/api/docs/models/gpt-5.6-terra\",\n \"https://developers.openai.com/api/docs/guides/pdf-files\",\n ],\n reviewedAt: \"2026-09-20\",\n },\n \"openai:gpt-5.6-luna\": {\n input: [\"text\", \"image\", \"pdf\"],\n output: [\"text\"],\n features: [\n \"reasoning\",\n \"tools\",\n \"structured-output\",\n \"prompt-cache\",\n \"web-search\",\n ],\n contextWindow: 1050000,\n sources: [\n \"https://developers.openai.com/api/docs/models/gpt-5.6-luna\",\n \"https://developers.openai.com/api/docs/guides/pdf-files\",\n ],\n reviewedAt: \"2026-09-20\",\n },\n \"google:gemini-3.8-flash\": {\n input: [\"text\", \"image\", \"pdf\", \"audio\", \"video\"],\n output: [\"text\"],\n features: [\n \"reasoning\",\n \"tools\",\n \"structured-output\",\n \"prompt-cache\",\n \"web-search\",\n ],\n contextWindow: 1048576,\n sources: [\"https://ai.google.dev/gemini-api/docs/models/gemini-3.8-flash\"],\n reviewedAt: \"2026-09-20\",\n },\n \"google:gemini-3.1-pro-preview\": {\n input: [\"text\", \"image\", \"pdf\", \"audio\", \"video\"],\n output: [\"text\"],\n features: [\n \"reasoning\",\n \"tools\",\n \"structured-output\",\n \"prompt-cache\",\n \"web-search\",\n ],\n contextWindow: 1048576,\n sources: [\n \"https://ai.google.dev/gemini-api/docs/models/gemini-3.1-pro-preview\",\n ],\n reviewedAt: \"2026-09-20\",\n },\n \"google:gemini-2.5-flash\": {\n input: [\"text\", \"image\", \"pdf\", \"audio\", \"video\"],\n output: [\"text\"],\n features: [\n \"reasoning\",\n \"tools\",\n \"structured-output\",\n \"prompt-cache\",\n \"web-search\",\n ],\n contextWindow: 1048576,\n sources: [\"https://ai.google.dev/gemini-api/docs/models/gemini-2.5-flash\"],\n reviewedAt: \"2026-09-20\",\n },\n \"xai:grok-4.6\": {\n input: [\"text\", \"image\"],\n output: [\"text\"],\n features: [\n \"reasoning\",\n \"tools\",\n \"structured-output\",\n \"prompt-cache\",\n \"web-search\",\n ],\n contextWindow: 500000,\n sources: [\n \"https://docs.x.ai/developers/grok-4-6\",\n \"https://docs.x.ai/developers/model-capabilities/text/structured-outputs\",\n ],\n reviewedAt: \"2026-09-20\",\n },\n \"deepseek:deepseek-flash\": {\n input: [\"text\", \"image\"],\n output: [\"text\"],\n features: [\"reasoning\", \"tools\", \"prompt-cache\"],\n contextWindow: 1000000,\n sources: [\"https://api-docs.deepseek.com/quick_start/pricing/\"],\n reviewedAt: \"2026-09-20\",\n },\n \"deepseek:deepseek-v4-pro\": {\n input: [\"text\"],\n output: [\"text\"],\n features: [\"reasoning\", \"tools\", \"prompt-cache\"],\n contextWindow: 1000000,\n sources: [\"https://api-docs.deepseek.com/quick_start/pricing/\"],\n reviewedAt: \"2026-09-20\",\n },\n \"mistral:mistral-medium-3-5\": {\n input: [\"text\", \"image\", \"pdf\"],\n output: [\"text\"],\n features: [\"reasoning\", \"tools\", \"structured-output\"],\n contextWindow: 256000,\n sources: [\"https://docs.mistral.ai/models/mistral-medium-3-5-26-04\"],\n reviewedAt: \"2026-09-20\",\n },\n \"moonshot:kimi-k3\": {\n input: [\"text\", \"image\", \"video\"],\n output: [\"text\"],\n features: [\"reasoning\", \"tools\", \"prompt-cache\"],\n contextWindow: 1000000,\n sources: [\"https://platform.kimi.ai/docs/guide/kimi-k3-quickstart\"],\n reviewedAt: \"2026-09-20\",\n },\n \"moonshot:kimi-k2.7-code\": {\n input: [\"text\", \"image\", \"video\"],\n output: [\"text\"],\n features: [\"reasoning\", \"tools\", \"prompt-cache\"],\n contextWindow: 262144,\n sources: [\"https://www.kimi.ai/resources/kimi-k2-7-code\"],\n reviewedAt: \"2026-09-20\",\n },\n \"meta:Llama-4-Maverick-17B-128E-Instruct-FP8\": {\n input: [\"text\", \"image\"],\n output: [\"text\"],\n features: [\"tools\"],\n contextWindow: 1000000,\n sources: [\n \"https://github.com/meta-llama/llama-models/blob/main/models/llama4/MODEL_CARD.md\",\n ],\n reviewedAt: \"2026-09-20\",\n },\n \"alibaba:qwen3.8-max\": {\n input: [\"text\", \"image\", \"video\"],\n output: [\"text\"],\n features: [\"reasoning\", \"tools\", \"prompt-cache\"],\n contextWindow: 1000000,\n sources: [\"https://help.aliyun.com/en/model-studio/qwen3-8-max\"],\n reviewedAt: \"2026-09-20\",\n },\n \"alibaba:qwen3.7-plus\": {\n input: [\"text\", \"image\", \"video\"],\n output: [\"text\"],\n features: [\"reasoning\", \"tools\", \"prompt-cache\"],\n contextWindow: 1000000,\n sources: [\"https://help.aliyun.com/en/model-studio/qwen3-7-plus\"],\n reviewedAt: \"2026-09-20\",\n },\n};\n\nexport const getModelMetadata = (\n provider: string,\n id: string,\n): ModelMetadata | undefined => MODEL_METADATA[`${provider}:${id}`];\n",
6
+ "/** Client-safe model discovery. Missing metadata means unknown, never unsupported. */\nexport type ModelModality = \"text\" | \"image\" | \"pdf\" | \"audio\" | \"video\";\nexport type ModelFeature =\n | \"reasoning\"\n | \"tools\"\n | \"structured-output\"\n | \"prompt-cache\"\n | \"web-search\";\nexport type ModelMetadata = {\n input: readonly ModelModality[];\n output: readonly ModelModality[];\n features: readonly ModelFeature[];\n contextWindow?: number;\n sources: readonly string[];\n reviewedAt: string;\n};\nexport const MODEL_CAPABILITY_DESCRIPTIONS = {\n Fast: \"Suited to quick edits and lightweight tasks; actual speed varies with the request.\",\n Reasoning: \"Can spend extra thinking time on complex problems.\",\n Tools:\n \"Supports function calls for actions such as inspecting and editing code.\",\n Vision: \"Understands images. This does not mean it generates images.\",\n PDF: \"Accepts PDF documents, including their text and visual content.\",\n Audio: \"Understands audio input. This does not mean it generates speech.\",\n Video: \"Understands video input. This does not mean it generates videos.\",\n \"Image generation\": \"Produces images as model output.\",\n \"Speech generation\": \"Produces audio as model output.\",\n \"Video generation\": \"Produces video as model output.\",\n Structured:\n \"Supports schema-constrained output for reliable structured data.\",\n Caching:\n \"The provider can reuse matching prompt content to reduce repeated processing. Cache hits are not guaranteed.\",\n Search:\n \"Supports a provider-hosted web-search tool when enabled by the application.\",\n \"Long context\":\n \"A documented context window of at least 200,000 tokens. Application and request limits may be lower.\",\n} as const;\nexport type ModelCapability = keyof typeof MODEL_CAPABILITY_DESCRIPTIONS;\nconst INPUT_BADGES: Partial<Record<ModelModality, ModelCapability>> = {\n image: \"Vision\",\n pdf: \"PDF\",\n audio: \"Audio\",\n video: \"Video\",\n};\nconst OUTPUT_BADGES: Partial<Record<ModelModality, ModelCapability>> = {\n image: \"Image generation\",\n audio: \"Speech generation\",\n video: \"Video generation\",\n};\nconst FEATURE_BADGES: Record<ModelFeature, ModelCapability> = {\n reasoning: \"Reasoning\",\n tools: \"Tools\",\n \"structured-output\": \"Structured\",\n \"prompt-cache\": \"Caching\",\n \"web-search\": \"Search\",\n};\n/** Derive badges from explicit evidence; do not infer support from model names. */\nexport const modelCapabilities = (\n metadata?: ModelMetadata,\n): ModelCapability[] => {\n if (!metadata) return [];\n const badges = new Set<ModelCapability>();\n for (const feature of metadata.features) badges.add(FEATURE_BADGES[feature]);\n for (const input of metadata.input) {\n const badge = INPUT_BADGES[input];\n if (badge) badges.add(badge);\n }\n for (const output of metadata.output) {\n const badge = OUTPUT_BADGES[output];\n if (badge) badges.add(badge);\n }\n if (metadata.contextWindow && metadata.contextWindow >= 200_000)\n badges.add(\"Long context\");\n return [...badges];\n};\nexport { MODEL_METADATA, getModelMetadata } from \"./catalog\";\n"
7
+ ],
8
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,IAAM,iBAA0D;AAAA,EACrE,8BAA8B;AAAA,IAC5B,OAAO,CAAC,QAAQ,SAAS,KAAK;AAAA,IAC9B,QAAQ,CAAC,MAAM;AAAA,IACf,UAAU,CAAC,aAAa,SAAS,qBAAqB,cAAc;AAAA,IACpE,eAAe;AAAA,IACf,SAAS;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,YAAY;AAAA,EACd;AAAA,EACA,2BAA2B;AAAA,IACzB,OAAO,CAAC,QAAQ,SAAS,KAAK;AAAA,IAC9B,QAAQ,CAAC,MAAM;AAAA,IACf,UAAU,CAAC,aAAa,SAAS,qBAAqB,cAAc;AAAA,IACpE,eAAe;AAAA,IACf,SAAS;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,YAAY;AAAA,EACd;AAAA,EACA,6BAA6B;AAAA,IAC3B,OAAO,CAAC,QAAQ,SAAS,KAAK;AAAA,IAC9B,QAAQ,CAAC,MAAM;AAAA,IACf,UAAU,CAAC,aAAa,SAAS,qBAAqB,cAAc;AAAA,IACpE,eAAe;AAAA,IACf,SAAS;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,YAAY;AAAA,EACd;AAAA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,IAAM,eAAgE;AAAA,EACpE,OAAO;AAAA,EACP,KAAK;AAAA,EACL,OAAO;AAAA,EACP,OAAO;AACT;AACA,IAAM,gBAAiE;AAAA,EACrE,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACT;AACA,IAAM,iBAAwD;AAAA,EAC5D,WAAW;AAAA,EACX,OAAO;AAAA,EACP,qBAAqB;AAAA,EACrB,gBAAgB;AAAA,EAChB,cAAc;AAChB;AAEO,IAAM,oBAAoB,CAC/B,aACsB;AAAA,EACtB,IAAI,CAAC;AAAA,IAAU,OAAO,CAAC;AAAA,EACvB,MAAM,SAAS,IAAI;AAAA,EACnB,WAAW,WAAW,SAAS;AAAA,IAAU,OAAO,IAAI,eAAe,QAAQ;AAAA,EAC3E,WAAW,SAAS,SAAS,OAAO;AAAA,IAClC,MAAM,QAAQ,aAAa;AAAA,IAC3B,IAAI;AAAA,MAAO,OAAO,IAAI,KAAK;AAAA,EAC7B;AAAA,EACA,WAAW,UAAU,SAAS,QAAQ;AAAA,IACpC,MAAM,QAAQ,cAAc;AAAA,IAC5B,IAAI;AAAA,MAAO,OAAO,IAAI,KAAK;AAAA,EAC7B;AAAA,EACA,IAAI,SAAS,iBAAiB,SAAS,iBAAiB;AAAA,IACtD,OAAO,IAAI,cAAc;AAAA,EAC3B,OAAO,CAAC,GAAG,MAAM;AAAA;",
9
+ "debugId": "8A59BA8BD41CFA0464756E2164756E21",
10
+ "names": []
11
+ }
@@ -0,0 +1,4 @@
1
+ import type { ModelMetadata } from "./index";
2
+ /** Reviewed provider support, independent of application feature availability. */
3
+ export declare const MODEL_METADATA: Readonly<Record<string, ModelMetadata>>;
4
+ export declare const getModelMetadata: (provider: string, id: string) => ModelMetadata | undefined;
@@ -0,0 +1,31 @@
1
+ /** Client-safe model discovery. Missing metadata means unknown, never unsupported. */
2
+ export type ModelModality = "text" | "image" | "pdf" | "audio" | "video";
3
+ export type ModelFeature = "reasoning" | "tools" | "structured-output" | "prompt-cache" | "web-search";
4
+ export type ModelMetadata = {
5
+ input: readonly ModelModality[];
6
+ output: readonly ModelModality[];
7
+ features: readonly ModelFeature[];
8
+ contextWindow?: number;
9
+ sources: readonly string[];
10
+ reviewedAt: string;
11
+ };
12
+ export declare const MODEL_CAPABILITY_DESCRIPTIONS: {
13
+ readonly Fast: "Suited to quick edits and lightweight tasks; actual speed varies with the request.";
14
+ readonly Reasoning: "Can spend extra thinking time on complex problems.";
15
+ readonly Tools: "Supports function calls for actions such as inspecting and editing code.";
16
+ readonly Vision: "Understands images. This does not mean it generates images.";
17
+ readonly PDF: "Accepts PDF documents, including their text and visual content.";
18
+ readonly Audio: "Understands audio input. This does not mean it generates speech.";
19
+ readonly Video: "Understands video input. This does not mean it generates videos.";
20
+ readonly "Image generation": "Produces images as model output.";
21
+ readonly "Speech generation": "Produces audio as model output.";
22
+ readonly "Video generation": "Produces video as model output.";
23
+ readonly Structured: "Supports schema-constrained output for reliable structured data.";
24
+ readonly Caching: "The provider can reuse matching prompt content to reduce repeated processing. Cache hits are not guaranteed.";
25
+ readonly Search: "Supports a provider-hosted web-search tool when enabled by the application.";
26
+ readonly "Long context": "A documented context window of at least 200,000 tokens. Application and request limits may be lower.";
27
+ };
28
+ export type ModelCapability = keyof typeof MODEL_CAPABILITY_DESCRIPTIONS;
29
+ /** Derive badges from explicit evidence; do not infer support from model names. */
30
+ export declare const modelCapabilities: (metadata?: ModelMetadata) => ModelCapability[];
31
+ export { MODEL_METADATA, getModelMetadata } from "./catalog";
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/ai",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "homepage": "https://github.com/absolutejs/ai",
5
5
  "bugs": {
6
6
  "url": "https://github.com/absolutejs/ai/issues"
@@ -88,6 +88,10 @@
88
88
  "./ui": {
89
89
  "import": "./dist/ai/ui/index.js",
90
90
  "types": "./dist/src/ai/ui/index.d.ts"
91
+ },
92
+ "./models": {
93
+ "import": "./dist/ai/models/index.js",
94
+ "types": "./dist/src/ai/models/index.d.ts"
91
95
  }
92
96
  },
93
97
  "dependencies": {
@@ -201,6 +205,9 @@
201
205
  ],
202
206
  "providers": [
203
207
  "dist/src/ai/providers/openaiCompatible.d.ts"
208
+ ],
209
+ "models": [
210
+ "dist/src/ai/models/index.d.ts"
204
211
  ]
205
212
  }
206
213
  }