@aeye/models 0.3.8 → 0.3.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.
- package/aeye-models.md +265 -0
- package/dist/scripts/_regen.d.ts +2 -0
- package/dist/scripts/_regen.d.ts.map +1 -0
- package/dist/scripts/_regen.js +13 -0
- package/dist/scripts/_regen.js.map +1 -0
- package/dist/scripts/codegen.d.ts.map +1 -1
- package/dist/scripts/codegen.js +5 -1
- package/dist/scripts/codegen.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/models/openrouter.d.ts.map +1 -1
- package/dist/src/models/openrouter.js +4148 -5232
- package/dist/src/models/openrouter.js.map +1 -1
- package/dist/src/strict-support.d.ts +44 -0
- package/dist/src/strict-support.d.ts.map +1 -0
- package/dist/src/strict-support.js +107 -0
- package/dist/src/strict-support.js.map +1 -0
- package/package.json +5 -5
- package/scripts/codegen.ts +5 -2
- package/src/index.ts +13 -12
- package/src/models/openrouter.ts +8990 -10074
- package/src/strict-support.ts +111 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Curated strict-mode support table.
|
|
3
|
+
*
|
|
4
|
+
* HUMAN-CURATED. NOT auto-generated. Edit by hand as new models ship or
|
|
5
|
+
* provider docs change. The auto-generated model files (`openai.ts`,
|
|
6
|
+
* `aws.ts`, etc.) are scraped from provider listings and don't track
|
|
7
|
+
* strict-mode capability on their own — strict support is a separate axis
|
|
8
|
+
* sourced here.
|
|
9
|
+
*
|
|
10
|
+
* Splat into your `AI` config:
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { models, strictSupport } from '@aeye/models';
|
|
14
|
+
*
|
|
15
|
+
* const ai = new AI({
|
|
16
|
+
* providers: { ... },
|
|
17
|
+
* models,
|
|
18
|
+
* modelOverrides: [...strictSupport, ...myOwnOverrides],
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* Setting `strictFormat: '<family>'` does two things:
|
|
23
|
+
* 1. Auto-derives the `'toolsStrict'` capability for selection.
|
|
24
|
+
* 2. Pins the JSON-Schema dialect that providers will emit.
|
|
25
|
+
*
|
|
26
|
+
* The dialect could often be left implicit and resolved via
|
|
27
|
+
* `resolveStrictFormat(model)`'s fallback chain (provider name → `[family]/`
|
|
28
|
+
* id prefix), but we set it explicitly here so the curated table is
|
|
29
|
+
* self-documenting and so the provider doesn't have to recompute it for
|
|
30
|
+
* every request.
|
|
31
|
+
*
|
|
32
|
+
* `strictFormat: 'none'` is a hard opt-out — used when an upstream source
|
|
33
|
+
* (a scraper, a future provider plug-in) has incorrectly marked a model
|
|
34
|
+
* strict-capable.
|
|
35
|
+
*
|
|
36
|
+
* References:
|
|
37
|
+
* - https://platform.openai.com/docs/guides/structured-outputs
|
|
38
|
+
* - https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use
|
|
39
|
+
* - https://platform.claude.com/docs/en/build-with-claude/structured-outputs
|
|
40
|
+
* - https://ai.google.dev/gemini-api/docs/structured-output
|
|
41
|
+
*/
|
|
42
|
+
import type { ModelOverride } from '@aeye/ai';
|
|
43
|
+
export declare const strictSupport: ModelOverride[];
|
|
44
|
+
//# sourceMappingURL=strict-support.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strict-support.d.ts","sourceRoot":"","sources":["../../src/strict-support.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,eAAO,MAAM,aAAa,EAAE,aAAa,EAkExC,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Curated strict-mode support table.
|
|
3
|
+
*
|
|
4
|
+
* HUMAN-CURATED. NOT auto-generated. Edit by hand as new models ship or
|
|
5
|
+
* provider docs change. The auto-generated model files (`openai.ts`,
|
|
6
|
+
* `aws.ts`, etc.) are scraped from provider listings and don't track
|
|
7
|
+
* strict-mode capability on their own — strict support is a separate axis
|
|
8
|
+
* sourced here.
|
|
9
|
+
*
|
|
10
|
+
* Splat into your `AI` config:
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { models, strictSupport } from '@aeye/models';
|
|
14
|
+
*
|
|
15
|
+
* const ai = new AI({
|
|
16
|
+
* providers: { ... },
|
|
17
|
+
* models,
|
|
18
|
+
* modelOverrides: [...strictSupport, ...myOwnOverrides],
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* Setting `strictFormat: '<family>'` does two things:
|
|
23
|
+
* 1. Auto-derives the `'toolsStrict'` capability for selection.
|
|
24
|
+
* 2. Pins the JSON-Schema dialect that providers will emit.
|
|
25
|
+
*
|
|
26
|
+
* The dialect could often be left implicit and resolved via
|
|
27
|
+
* `resolveStrictFormat(model)`'s fallback chain (provider name → `[family]/`
|
|
28
|
+
* id prefix), but we set it explicitly here so the curated table is
|
|
29
|
+
* self-documenting and so the provider doesn't have to recompute it for
|
|
30
|
+
* every request.
|
|
31
|
+
*
|
|
32
|
+
* `strictFormat: 'none'` is a hard opt-out — used when an upstream source
|
|
33
|
+
* (a scraper, a future provider plug-in) has incorrectly marked a model
|
|
34
|
+
* strict-capable.
|
|
35
|
+
*
|
|
36
|
+
* References:
|
|
37
|
+
* - https://platform.openai.com/docs/guides/structured-outputs
|
|
38
|
+
* - https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use
|
|
39
|
+
* - https://platform.claude.com/docs/en/build-with-claude/structured-outputs
|
|
40
|
+
* - https://ai.google.dev/gemini-api/docs/structured-output
|
|
41
|
+
*/
|
|
42
|
+
export const strictSupport = [
|
|
43
|
+
// ---------------------------------------------------------------------------
|
|
44
|
+
// OpenAI direct — gpt-4o, gpt-4.1, gpt-5, o-series support strict tools +
|
|
45
|
+
// outputs. gpt-realtime supports function calling (no documented support
|
|
46
|
+
// for structured output, gated by the `'structured'` capability — which
|
|
47
|
+
// the scraper doesn't add for realtime models). Legacy gpt-4 / gpt-3.5
|
|
48
|
+
// are not listed: they don't get the cap, so they stay lenient.
|
|
49
|
+
// ---------------------------------------------------------------------------
|
|
50
|
+
{
|
|
51
|
+
provider: 'openai',
|
|
52
|
+
modelPattern: /^gpt-4o(\b|[-_])/,
|
|
53
|
+
overrides: { strictFormat: 'openai' },
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
provider: 'openai',
|
|
57
|
+
modelPattern: /^gpt-4\.1(\b|[-_])/,
|
|
58
|
+
overrides: { strictFormat: 'openai' },
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
provider: 'openai',
|
|
62
|
+
modelPattern: /^gpt-5(\b|[-_])/,
|
|
63
|
+
overrides: { strictFormat: 'openai' },
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
provider: 'openai',
|
|
67
|
+
modelPattern: /^o[1-9](-mini|-preview|-pro)?(\b|[-_])/,
|
|
68
|
+
overrides: { strictFormat: 'openai' },
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
provider: 'openai',
|
|
72
|
+
modelPattern: /^gpt-realtime/,
|
|
73
|
+
overrides: { strictFormat: 'openai' },
|
|
74
|
+
},
|
|
75
|
+
// ---------------------------------------------------------------------------
|
|
76
|
+
// AWS Bedrock — Anthropic-family Claude 4.5+ only. provider='aws' doesn't
|
|
77
|
+
// resolve and the id uses '.' separators rather than '/', so the dialect
|
|
78
|
+
// must be set explicitly here. Earlier Claude versions (3.5/3.7) don't
|
|
79
|
+
// support strict per Anthropic docs and are deliberately not listed.
|
|
80
|
+
// ---------------------------------------------------------------------------
|
|
81
|
+
{
|
|
82
|
+
provider: 'aws',
|
|
83
|
+
modelPattern: /anthropic\.claude-(opus-4|sonnet-4|haiku-4)/,
|
|
84
|
+
overrides: { strictFormat: 'anthropic' },
|
|
85
|
+
},
|
|
86
|
+
// ---------------------------------------------------------------------------
|
|
87
|
+
// OpenRouter — keyed off the `[family]/...` id prefix. Listed here both
|
|
88
|
+
// to add the `'toolsStrict'` capability (which the OpenRouter scraper
|
|
89
|
+
// doesn't currently set) and to pin the dialect explicitly.
|
|
90
|
+
// ---------------------------------------------------------------------------
|
|
91
|
+
{
|
|
92
|
+
provider: 'openrouter',
|
|
93
|
+
modelPattern: /^openai\/(gpt-4o|gpt-4\.1|gpt-5|o[1-9])/,
|
|
94
|
+
overrides: { strictFormat: 'openai' },
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
provider: 'openrouter',
|
|
98
|
+
modelPattern: /^anthropic\/claude-(opus-4|sonnet-4|haiku-4|4)/,
|
|
99
|
+
overrides: { strictFormat: 'anthropic' },
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
provider: 'openrouter',
|
|
103
|
+
modelPattern: /^google\/gemini-(2\.0|2\.5|3|3\.1)/,
|
|
104
|
+
overrides: { strictFormat: 'google' },
|
|
105
|
+
},
|
|
106
|
+
];
|
|
107
|
+
//# sourceMappingURL=strict-support.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strict-support.js","sourceRoot":"","sources":["../../src/strict-support.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAIH,MAAM,CAAC,MAAM,aAAa,GAAoB;IAC5C,8EAA8E;IAC9E,0EAA0E;IAC1E,yEAAyE;IACzE,wEAAwE;IACxE,uEAAuE;IACvE,gEAAgE;IAChE,8EAA8E;IAC9E;QACE,QAAQ,EAAE,QAAQ;QAClB,YAAY,EAAE,kBAAkB;QAChC,SAAS,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE;KACtC;IACD;QACE,QAAQ,EAAE,QAAQ;QAClB,YAAY,EAAE,oBAAoB;QAClC,SAAS,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE;KACtC;IACD;QACE,QAAQ,EAAE,QAAQ;QAClB,YAAY,EAAE,iBAAiB;QAC/B,SAAS,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE;KACtC;IACD;QACE,QAAQ,EAAE,QAAQ;QAClB,YAAY,EAAE,wCAAwC;QACtD,SAAS,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE;KACtC;IACD;QACE,QAAQ,EAAE,QAAQ;QAClB,YAAY,EAAE,eAAe;QAC7B,SAAS,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE;KACtC;IAED,8EAA8E;IAC9E,0EAA0E;IAC1E,yEAAyE;IACzE,uEAAuE;IACvE,qEAAqE;IACrE,8EAA8E;IAC9E;QACE,QAAQ,EAAE,KAAK;QACf,YAAY,EAAE,6CAA6C;QAC3D,SAAS,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE;KACzC;IAED,8EAA8E;IAC9E,wEAAwE;IACxE,sEAAsE;IACtE,4DAA4D;IAC5D,8EAA8E;IAC9E;QACE,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,yCAAyC;QACvD,SAAS,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE;KACtC;IACD;QACE,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,gDAAgD;QAC9D,SAAS,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE;KACzC;IACD;QACE,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,oCAAoC;QAClD,SAAS,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE;KACtC;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeye/models",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"description": "Static model information scraped from OpenAI, OpenRouter, Replicate, and AWS Bedrock",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"directory": "packages/models"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@aeye/ai": "0.3.
|
|
54
|
-
"@aeye/aws": "0.3.
|
|
55
|
-
"@aeye/openrouter": "0.3.
|
|
56
|
-
"@aeye/replicate": "0.3.
|
|
53
|
+
"@aeye/ai": "0.3.9",
|
|
54
|
+
"@aeye/aws": "0.3.9",
|
|
55
|
+
"@aeye/openrouter": "0.3.9",
|
|
56
|
+
"@aeye/replicate": "0.3.9"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@aws-sdk/client-bedrock": "^3.709.0",
|
package/scripts/codegen.ts
CHANGED
|
@@ -6,8 +6,11 @@ import * as fs from 'fs/promises';
|
|
|
6
6
|
import * as path from 'path';
|
|
7
7
|
import type { ModelInfo, ModelParameter } from '@aeye/ai';
|
|
8
8
|
|
|
9
|
-
export const stringify = (x: any, space?: number | string | undefined) =>
|
|
10
|
-
|
|
9
|
+
export const stringify = (x: any, space?: number | string | undefined) =>
|
|
10
|
+
// Drop `null` and non-finite numbers (NaN/Infinity) anywhere in the object so a
|
|
11
|
+
// stray scraped value can't emit an un-typecheckable field (e.g. `metrics: {
|
|
12
|
+
// timeToFirstToken: null }` against `number | undefined`).
|
|
13
|
+
(JSON.stringify(x, (_k, v) => (v === null || (typeof v === 'number' && !Number.isFinite(v)) ? undefined : v), space) || '')
|
|
11
14
|
.replace(/"([^"]+)":/g, '$1:')
|
|
12
15
|
.replace(/\n/g, '\n ')
|
|
13
16
|
.trim() || undefined;
|
package/src/index.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated main index
|
|
3
|
-
*
|
|
4
|
-
* This file is auto-generated by the scraper scripts.
|
|
5
|
-
* Do not edit manually - your changes will be overwritten.
|
|
6
|
-
*
|
|
7
|
-
* To regenerate, run: npm run scrape
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
export { models, openaiModels, openrouterModels, replicateModels, awsModels } from './models';
|
|
11
|
-
export { transformers } from './transformers';
|
|
12
|
-
export { replicateTransformers } from './transformers/replicate';
|
|
1
|
+
/**
|
|
2
|
+
* Generated main index
|
|
3
|
+
*
|
|
4
|
+
* This file is auto-generated by the scraper scripts.
|
|
5
|
+
* Do not edit manually - your changes will be overwritten.
|
|
6
|
+
*
|
|
7
|
+
* To regenerate, run: npm run scrape
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export { models, openaiModels, openrouterModels, replicateModels, awsModels } from './models';
|
|
11
|
+
export { transformers } from './transformers';
|
|
12
|
+
export { replicateTransformers } from './transformers/replicate';
|
|
13
|
+
export { strictSupport } from './strict-support';
|