@aeye/models 0.3.9 → 0.4.0

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.
Files changed (62) hide show
  1. package/aeye-models.md +272 -265
  2. package/dist/scripts/codegen.d.ts +4 -0
  3. package/dist/scripts/codegen.d.ts.map +1 -1
  4. package/dist/scripts/codegen.js +11 -0
  5. package/dist/scripts/codegen.js.map +1 -1
  6. package/dist/scripts/scrape.d.ts +2 -1
  7. package/dist/scripts/scrape.d.ts.map +1 -1
  8. package/dist/scripts/scrape.js +8 -4
  9. package/dist/scripts/scrape.js.map +1 -1
  10. package/dist/scripts/scrapers/aws.d.ts +5 -1
  11. package/dist/scripts/scrapers/aws.d.ts.map +1 -1
  12. package/dist/scripts/scrapers/aws.js +211 -57
  13. package/dist/scripts/scrapers/aws.js.map +1 -1
  14. package/dist/scripts/scrapers/docs.d.ts +43 -0
  15. package/dist/scripts/scrapers/docs.d.ts.map +1 -0
  16. package/dist/scripts/scrapers/docs.js +91 -0
  17. package/dist/scripts/scrapers/docs.js.map +1 -0
  18. package/dist/scripts/scrapers/openai.d.ts +4 -1
  19. package/dist/scripts/scrapers/openai.d.ts.map +1 -1
  20. package/dist/scripts/scrapers/openai.js +183 -445
  21. package/dist/scripts/scrapers/openai.js.map +1 -1
  22. package/dist/scripts/scrapers/openrouter.d.ts +1 -1
  23. package/dist/scripts/scrapers/openrouter.d.ts.map +1 -1
  24. package/dist/scripts/scrapers/openrouter.js +20 -79
  25. package/dist/scripts/scrapers/openrouter.js.map +1 -1
  26. package/dist/src/models/aws.d.ts.map +1 -1
  27. package/dist/src/models/aws.js +2180 -1033
  28. package/dist/src/models/aws.js.map +1 -1
  29. package/dist/src/models/openai.d.ts.map +1 -1
  30. package/dist/src/models/openai.js +1925 -1370
  31. package/dist/src/models/openai.js.map +1 -1
  32. package/dist/src/models/openrouter.d.ts.map +1 -1
  33. package/dist/src/models/openrouter.js +15699 -4981
  34. package/dist/src/models/openrouter.js.map +1 -1
  35. package/dist/src/strict-support.d.ts +2 -1
  36. package/dist/src/strict-support.d.ts.map +1 -1
  37. package/dist/src/strict-support.js +38 -16
  38. package/dist/src/strict-support.js.map +1 -1
  39. package/dist/src/transformers/replicate/black-forest-labs-flux-1-1-pro.js +1 -1
  40. package/dist/src/transformers/replicate/black-forest-labs-flux-1-1-pro.js.map +1 -1
  41. package/dist/src/transformers/replicate/black-forest-labs-flux-pro.js +1 -1
  42. package/dist/src/transformers/replicate/black-forest-labs-flux-pro.js.map +1 -1
  43. package/dist/src/transformers/replicate/openai-gpt-image-1.js +1 -1
  44. package/dist/src/transformers/replicate/openai-gpt-image-1.js.map +1 -1
  45. package/package.json +78 -79
  46. package/scripts/codegen.ts +12 -0
  47. package/scripts/scrape.ts +13 -5
  48. package/scripts/scrapers/aws.ts +245 -76
  49. package/scripts/scrapers/docs.ts +101 -0
  50. package/scripts/scrapers/openai.ts +185 -552
  51. package/scripts/scrapers/openrouter.ts +20 -106
  52. package/src/models/aws.ts +2569 -1422
  53. package/src/models/openai.ts +2764 -2209
  54. package/src/models/openrouter.ts +15699 -4981
  55. package/src/strict-support.ts +134 -111
  56. package/src/transformers/replicate/black-forest-labs-flux-1-1-pro.ts +1 -1
  57. package/src/transformers/replicate/black-forest-labs-flux-pro.ts +1 -1
  58. package/src/transformers/replicate/openai-gpt-image-1.ts +1 -1
  59. package/dist/scripts/_regen.d.ts +0 -2
  60. package/dist/scripts/_regen.d.ts.map +0 -1
  61. package/dist/scripts/_regen.js +0 -13
  62. package/dist/scripts/_regen.js.map +0 -1
@@ -34,10 +34,11 @@
34
34
  * strict-capable.
35
35
  *
36
36
  * References:
37
- * - https://platform.openai.com/docs/guides/structured-outputs
37
+ * - https://developers.openai.com/api/docs/guides/structured-outputs
38
38
  * - https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use
39
39
  * - https://platform.claude.com/docs/en/build-with-claude/structured-outputs
40
40
  * - https://ai.google.dev/gemini-api/docs/structured-output
41
+ * - https://docs.x.ai/docs/guides/structured-outputs
41
42
  */
42
43
  import type { ModelOverride } from '@aeye/ai';
43
44
  export declare const strictSupport: ModelOverride[];
@@ -1 +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"}
1
+ {"version":3,"file":"strict-support.d.ts","sourceRoot":"","sources":["../../src/strict-support.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,eAAO,MAAM,aAAa,EAAE,aAAa,EAwFxC,CAAC"}
@@ -34,18 +34,20 @@
34
34
  * strict-capable.
35
35
  *
36
36
  * References:
37
- * - https://platform.openai.com/docs/guides/structured-outputs
37
+ * - https://developers.openai.com/api/docs/guides/structured-outputs
38
38
  * - https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use
39
39
  * - https://platform.claude.com/docs/en/build-with-claude/structured-outputs
40
40
  * - https://ai.google.dev/gemini-api/docs/structured-output
41
+ * - https://docs.x.ai/docs/guides/structured-outputs
41
42
  */
42
43
  export const strictSupport = [
43
44
  // ---------------------------------------------------------------------------
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.
45
+ // OpenAI direct — gpt-4o, gpt-4.1, gpt-5 and later (gpt-5.x, gpt-6.x), and
46
+ // the o-series support strict tools + outputs. gpt-realtime supports
47
+ // function calling (no documented support for structured output, gated by
48
+ // the `'structured'` capability — which the scraper doesn't add for realtime
49
+ // models). Legacy gpt-4 / gpt-3.5 are not listed: they don't get the cap, so
50
+ // they stay lenient.
49
51
  // ---------------------------------------------------------------------------
50
52
  {
51
53
  provider: 'openai',
@@ -59,7 +61,7 @@ export const strictSupport = [
59
61
  },
60
62
  {
61
63
  provider: 'openai',
62
- modelPattern: /^gpt-5(\b|[-_])/,
64
+ modelPattern: /^(gpt-([5-9]|\d{2,})(\b|[-_.])|chat-latest$)/,
63
65
  overrides: { strictFormat: 'openai' },
64
66
  },
65
67
  {
@@ -75,33 +77,53 @@ export const strictSupport = [
75
77
  // ---------------------------------------------------------------------------
76
78
  // AWS Bedrock — Anthropic-family Claude 4.5+ only. provider='aws' doesn't
77
79
  // 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
+ // must be set explicitly here. Claude 3.x, 4, and 4.1 don't support strict
81
+ // per Anthropic docs and are deliberately not matched.
80
82
  // ---------------------------------------------------------------------------
81
83
  {
82
84
  provider: 'aws',
83
- modelPattern: /anthropic\.claude-(opus-4|sonnet-4|haiku-4)/,
85
+ modelPattern: /anthropic\.claude-((opus|sonnet|haiku)-4-[5-9]|(opus|sonnet|haiku|fable|mythos)-[5-9])/,
84
86
  overrides: { strictFormat: 'anthropic' },
85
87
  },
86
88
  // ---------------------------------------------------------------------------
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.
89
+ // OpenRouter — keyed off the `[family]/...` id prefix (and the `~` of
90
+ // floating `-latest` aliases). Listed here both to add the `'toolsStrict'`
91
+ // capability (which the OpenRouter scraper doesn't currently set) and to pin
92
+ // the dialect explicitly. xAI's prefix is `x-ai`, which no family resolves
93
+ // on its own. Floating aliases (`~openai/gpt-luna-latest`,
94
+ // `openai/gpt-chat-latest`) name the same models.
90
95
  // ---------------------------------------------------------------------------
91
96
  {
92
97
  provider: 'openrouter',
93
- modelPattern: /^openai\/(gpt-4o|gpt-4\.1|gpt-5|o[1-9])/,
98
+ modelPattern: /^~?openai\/(gpt-4o|gpt-4\.1|gpt-([5-9]|\d{2,}|[a-z]+-latest)|o[1-9])/,
94
99
  overrides: { strictFormat: 'openai' },
95
100
  },
96
101
  {
97
102
  provider: 'openrouter',
98
- modelPattern: /^anthropic\/claude-(opus-4|sonnet-4|haiku-4|4)/,
103
+ modelPattern: /^~?anthropic\/claude-((opus|sonnet|haiku)-4\.[5-9]|(opus|sonnet|haiku|fable|mythos)-([5-9]|latest))/,
99
104
  overrides: { strictFormat: 'anthropic' },
100
105
  },
101
106
  {
102
107
  provider: 'openrouter',
103
- modelPattern: /^google\/gemini-(2\.0|2\.5|3|3\.1)/,
108
+ modelPattern: /^~?google\/gemini-([2-9]|flash|pro)/,
104
109
  overrides: { strictFormat: 'google' },
105
110
  },
111
+ {
112
+ provider: 'openrouter',
113
+ modelPattern: /^~?x-ai\/grok-([4-9]|latest)/,
114
+ overrides: { strictFormat: 'xai' },
115
+ },
116
+ // ---------------------------------------------------------------------------
117
+ // Open-weight models under a vendor prefix. `openai/gpt-oss-*` and
118
+ // `google/gemma-*` would otherwise resolve to the OpenAI / Gemini dialect by
119
+ // id prefix, but OpenRouter serves them from third-party hosts (Groq,
120
+ // Cerebras, DeepInfra, ...) whose json_schema support is their own — see
121
+ // docs/plans/schema-dialects-2026.md § 6.
122
+ // ---------------------------------------------------------------------------
123
+ {
124
+ provider: 'openrouter',
125
+ modelPattern: /^~?(openai\/gpt-oss|google\/gemma)/,
126
+ overrides: { strictFormat: 'none' },
127
+ },
106
128
  ];
107
129
  //# sourceMappingURL=strict-support.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"strict-support.js","sourceRoot":"","sources":["../../src/strict-support.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;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AC3E,6EAA6E;IAC7E,2EAA2E;IAC3E,2DAA2D;IAC3D,kDAAkD;IAClD,8EAA8E;IAC9E;QACE,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,sEAAsE;QACpF,SAAS,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE;KACtC;IACD;QACE,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,qGAAqG;QACnH,SAAS,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE;KACzC;IACD;QACE,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,qCAAqC;QACnD,SAAS,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE;KACtC;IACD;QACE,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,8BAA8B;QAC5C,SAAS,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE;KACnC;IAED,8EAA8E;IAC9E,mEAAmE;IACnE,6EAA6E;IAC7E,sEAAsE;IACtE,yEAAyE;IACzE,0CAA0C;IAC1C,8EAA8E;IAC9E;QACE,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,oCAAoC;QAClD,SAAS,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE;KACpC;CACF,CAAC"}
@@ -18,7 +18,7 @@ export default {
18
18
  }
19
19
  }
20
20
  if (request.quality) {
21
- const qualityMap = { low: 60, medium: 80, high: 100 };
21
+ const qualityMap = { auto: 80, low: 60, medium: 80, high: 100, xhigh: 100, max: 100 };
22
22
  input.output_quality = qualityMap[request.quality] || 80;
23
23
  }
24
24
  if (request.extra?.image_prompt) {
@@ -1 +1 @@
1
- {"version":3,"file":"black-forest-labs-flux-1-1-pro.js","sourceRoot":"","sources":["../../../../src/transformers/replicate/black-forest-labs-flux-1-1-pro.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAqBnC,eAAe;IACb,gCAAgC,EAAE,CAAC,GAAG,EAAE;QACtC,MAAM,WAAW,GAAyB;YACxC,aAAa,E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AAC;gBACJ,CAAC;aACF;SACF,CAAC;QACF,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC,EAAE;CACL,CAAA"}
1
+ {"version":3,"file":"black-forest-labs-flux-1-1-pro.js","sourceRoot":"","sources":["../../../../src/transformers/replicate/black-forest-labs-flux-1-1-pro.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAqBnC,eAAe;IACb,gCAAgC,EAAE,CAAC,GAAG,EAAE;QACtC,MAAM,WAAW,GAAyB;YACxC,aAAa,EAAE;gBACb,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAA6B,EAAE;oBAChE,MAAM,KAAK,GAAqB;wBAC9B,MAAM,EAAE,OAAO,CAAC,MAAM;wBACtB,IAAI,EAAE,OAAO,CAAC,IAAI;wBAClB,GAAG,OAAO,CAAC,KAAK;qBACjB,CAAC;oBAEF,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;wBACjB,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;wBAC5D,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;4BACpC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;4BACpB,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;4BACtB,KAAK,CAAC,YAAY,GAAG,QAAQ,CAAC;wBAChC,CAAC;oBACH,CAAC;oBAED,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;wBACpB,MAAM,UAAU,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;wBACtF,KAAK,CAAC,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;oBAC3D,CAAC;oBAED,IAAI,OAAO,CAAC,KAAK,EAAE,YAAY,EAAE,CAAC;wBAChC,KAAK,CAAC,YAAY,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;oBAC/D,CAAC;oBAED,OAAO,KAAK,CAAC;gBACf,CAAC;gBACD,aAAa,EAAE,KAAK,EAAE,QAA2B,EAAE,GAAG,EAAE,EAAE;oBACxD,OAAO;wBACL,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;qBAC5B,CAAC;gBACJ,CAAC;aACF;SACF,CAAC;QACF,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC,EAAE;CACL,CAAA"}
@@ -20,7 +20,7 @@ export default {
20
20
  }
21
21
  }
22
22
  if (request.quality) {
23
- const qualityMap = { low: 60, medium: 80, high: 100 };
23
+ const qualityMap = { auto: 80, low: 60, medium: 80, high: 100, xhigh: 100, max: 100 };
24
24
  input.output_quality = qualityMap[request.quality] || 80;
25
25
  }
26
26
  return input;
@@ -1 +1 @@
1
- {"version":3,"file":"black-forest-labs-flux-pro.js","sourceRoot":"","sources":["../../../../src/transformers/replicate/black-forest-labs-flux-pro.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAwBnC,eAAe;IACb,4BAA4B,EAAE,CAAC,GAAG,EAAE;QAClC,MAAM,WAAW,GAAyB;YACxC,aAAa,EAAE;gBACb,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAA6B,EAAE;oBAChE,MAAM,KAAK,GAAqB;wBAC9B,MAAM,EAAE,OAAO,CAAC,MAAM;wBACtB,GAAG,OAAO,CAAC,KAAK;qBACjB,CAAC;oBACF,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;wBAC/B,KAAK,CAAC,IAAI,GAAG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wBACxC,GAAG,OAAO,CAAC,KAAK;qBACjB,CAAC;oBACF,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;wBAC/B,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;oBAC5B,CAAC;oBACD,OAAO,KAAK,CAAC;gBACf,CAAC;gBACD,aAAa,EAAE,KAAK,EAAE,QAA2B,EAAE,GAAG,EAAE,EAAE;oBACxD,OAAO;wBACL,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;qBACzC,CAAC;gBACJ,CAAC;aACF;SACF,CAAC;QACF,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC,EAAE;CACL,CAAA"}
1
+ {"version":3,"file":"black-forest-labs-flux-pro.js","sourceRoot":"","sources":["../../../../src/transformers/replicate/black-forest-labs-flux-pro.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAwBnC,eAAe;IACb,4BAA4B,EAAE,CAAC,GAAG,EAAE;QAClC,MAAM,WAAW,GAAyB;YACxC,aAAa,EAAE;gBACb,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAA6B,EAAE;oBAChE,MAAM,KAAK,GAAqB;wBAC9B,MAAM,EAAE,OAAO,CAAC,MAAM;wBACtB,GAAG,OAAO,CAAC,KAAK;qBACjB,CAAC;oBACF,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;wBAC/B,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;oBAC5B,CAAC;oBACD,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;wBACjB,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;wBAClD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KA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AAC;gBACf,CAAC;gBACD,aAAa,EAAE,KAAK,EAAE,QAA2B,EAAE,GAAG,EAAE,EAAE;oBACxD,OAAO;wBACL,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;qBACzC,CAAC;gBACJ,CAAC;aACF;SACF,CAAC;QACF,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC,EAAE;CACL,CAAA"}
@@ -6,7 +6,7 @@ export default {
6
6
  convertRequest: async (request, ctx) => ({
7
7
  prompt: request.prompt,
8
8
  number_of_images: request.n,
9
- quality: request.quality,
9
+ quality: request.quality === 'xhigh' || request.quality === 'max' ? 'high' : request.quality,
10
10
  user_id: request.userIdentifier,
11
11
  ...request.extra,
12
12
  openai_api_key: request.extra?.openai_api_key,
@@ -1 +1 @@
1
- {"version":3,"file":"openai-gpt-image-1.js","sourceRoot":"","sources":["../../../../src/transformers/replicate/openai-gpt-image-1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AA4BnC,eAAe;IACb,oBAAoB,EAAE,CAAC,GAAG,EAAE;QAC1B,MAAM,WAAW,GAAyB;YACxC,aAAa,EAAE;gBACb,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAA6B,EAAE,CAAC,CAAC;oBAClE,MAAM,EAAE,OAAO,CAAC,MAAM;oBACtB,gBAAgB,EAAE,OAAO,CAAC,CAAC;oBAC3B,OAAO,EAAE,OAAO,CAAC,OAAO;oBACxB,OAAO,EAAE,OAAO,CAAC,cAAc;oBAC/B,GAAG,OAAO,CAAC,KAAK;oBAChB,cAAc,EAAE,OAAO,CAAC,KAAK,EAAE,cAAc;iBAC9C,CAAC;gBACF,aAAa,EAAE,KAAK,EAAE,QAA2B,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;oBAC1D,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CA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C,OAAO;oBAC5F,OAAO,EAAE,OAAO,CAAC,cAAc;oBAC/B,GAAG,OAAO,CAAC,KAAK;oBAChB,cAAc,EAAE,OAAO,CAAC,KAAK,EAAE,cAAc;iBAC9C,CAAC;gBACF,aAAa,EAAE,KAAK,EAAE,QAA2B,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;oBAC1D,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;iBACzC,CAAC;aACH;YACD,SAAS,EAAE;gBACT,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAA6B,EAAE,CAAC,CAAC;oBAClE,MAAM,EAAE,OAAO,CAAC,MAAM;oBACtB,YAAY,EAAE,CAAC,MAAM,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;oBAC1C,gBAAgB,EAAE,OAAO,CAAC,CAAC;oBAC3B,OAAO,EAAE,OAAO,CAAC,cAAc;oBAC/B,GAAG,OAAO,CAAC,KAAK;oBAChB,cAAc,EAAE,OAAO,CAAC,KAAK,EAAE,cAAc;iBAC9C,CAAC;gBACF,aAAa,EAAE,KAAK,EAAE,QAA2B,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;oBAC1D,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;iBACzC,CAAC;aACH;SACF,CAAC;QACF,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC,EAAE;CACL,CAAA"}
package/package.json CHANGED
@@ -1,79 +1,78 @@
1
- {
2
- "name": "@aeye/models",
3
- "version": "0.3.9",
4
- "description": "Static model information scraped from OpenAI, OpenRouter, Replicate, and AWS Bedrock",
5
- "type": "module",
6
- "main": "dist/src/index.js",
7
- "types": "dist/src/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "import": {
11
- "types": "./dist/src/index.d.ts",
12
- "default": "./dist/src/index.js"
13
- },
14
- "require": {
15
- "types": "./dist/src/index.d.ts",
16
- "default": "./dist/src/index.js"
17
- },
18
- "default": "./dist/src/index.js"
19
- }
20
- },
21
- "scripts": {
22
- "build": "tsc",
23
- "typecheck": "tsc --noEmit",
24
- "clean": "rimraf dist tsconfig.tsbuildinfo",
25
- "scrape": "tsx scripts/scrape.ts",
26
- "scrape:openrouter": "tsx scripts/scrapers/openrouter.ts",
27
- "scrape:openrouter:full": "tsx scripts/scrapers/openrouter.ts --metrics",
28
- "scrape:openai": "tsx scripts/scrapers/openai.ts",
29
- "scrape:replicate": "tsx scripts/scrapers/replicate.ts",
30
- "scrape:replicate:test": "tsx scripts/scrapers/replicate.ts --transformers --transformers-only --models=\"adirik/kosmos-g\"",
31
- "scrape:replicate:chunk": "tsx scripts/scrapers/replicate.ts --transformers --transformers-only --transformer-model=\"google/gemini-3-pro-preview\" --n=50 --transform-concurrency=0",
32
- "scrape:replicate:models": "tsx scripts/scrapers/replicate.ts --transformers-only",
33
- "scrape:replicate:patch": "tsx scripts/patch-modelinfo.ts",
34
- "scrape:aws": "tsx scripts/scrapers/aws.ts"
35
- },
36
- "keywords": [
37
- "ai",
38
- "models",
39
- "openai",
40
- "openrouter",
41
- "replicate",
42
- "aws",
43
- "bedrock"
44
- ],
45
- "author": "ClickerMonkey",
46
- "license": "GPL-3.0",
47
- "repository": {
48
- "type": "git",
49
- "url": "https://github.com/ClickerMonkey/aeye.git",
50
- "directory": "packages/models"
51
- },
52
- "dependencies": {
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
- },
58
- "devDependencies": {
59
- "@aws-sdk/client-bedrock": "^3.709.0",
60
- "@types/node": "^20.12.7",
61
- "axios": "^1.7.2",
62
- "openapi-typescript": "^7.10.1",
63
- "puppeteer": "^24.31.0",
64
- "replicate": "^0.34.1",
65
- "tsconfig-paths": "^4.2.0",
66
- "tsx": "^4.7.0",
67
- "typescript": "^5.9.3"
68
- },
69
- "publishConfig": {
70
- "access": "public"
71
- },
72
- "engines": {
73
- "node": ">=16.0.0"
74
- },
75
- "homepage": "https://github.com/ClickerMonkey/aeye#readme",
76
- "bugs": {
77
- "url": "https://github.com/ClickerMonkey/aeye/issues"
78
- }
79
- }
1
+ {
2
+ "name": "@aeye/models",
3
+ "version": "0.4.0",
4
+ "description": "Static model information scraped from OpenAI, OpenRouter, Replicate, and AWS Bedrock",
5
+ "type": "module",
6
+ "main": "dist/src/index.js",
7
+ "types": "dist/src/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": {
11
+ "types": "./dist/src/index.d.ts",
12
+ "default": "./dist/src/index.js"
13
+ },
14
+ "require": {
15
+ "types": "./dist/src/index.d.ts",
16
+ "default": "./dist/src/index.js"
17
+ },
18
+ "default": "./dist/src/index.js"
19
+ }
20
+ },
21
+ "scripts": {
22
+ "build": "tsc",
23
+ "typecheck": "tsc --noEmit",
24
+ "clean": "rimraf dist tsconfig.tsbuildinfo",
25
+ "scrape": "tsx scripts/scrape.ts",
26
+ "scrape:auto": "tsx scripts/scrape.ts --sources=openrouter,openai,aws --metrics",
27
+ "scrape:openrouter": "tsx scripts/scrapers/openrouter.ts",
28
+ "scrape:openrouter:full": "tsx scripts/scrapers/openrouter.ts --metrics",
29
+ "scrape:openai": "tsx scripts/scrapers/openai.ts",
30
+ "scrape:replicate": "tsx scripts/scrapers/replicate.ts",
31
+ "scrape:replicate:test": "tsx scripts/scrapers/replicate.ts --transformers --transformers-only --models=\"adirik/kosmos-g\"",
32
+ "scrape:replicate:chunk": "tsx scripts/scrapers/replicate.ts --transformers --transformers-only --transformer-model=\"google/gemini-3-pro-preview\" --n=50 --transform-concurrency=0",
33
+ "scrape:replicate:models": "tsx scripts/scrapers/replicate.ts --transformers-only",
34
+ "scrape:replicate:patch": "tsx scripts/patch-modelinfo.ts",
35
+ "scrape:aws": "tsx scripts/scrapers/aws.ts"
36
+ },
37
+ "keywords": [
38
+ "ai",
39
+ "models",
40
+ "openai",
41
+ "openrouter",
42
+ "replicate",
43
+ "aws",
44
+ "bedrock"
45
+ ],
46
+ "author": "ClickerMonkey",
47
+ "license": "GPL-3.0",
48
+ "repository": {
49
+ "type": "git",
50
+ "url": "https://github.com/ClickerMonkey/aeye.git",
51
+ "directory": "packages/models"
52
+ },
53
+ "dependencies": {
54
+ "@aeye/ai": "0.4.0",
55
+ "@aeye/aws": "0.4.0",
56
+ "@aeye/openrouter": "0.5.0",
57
+ "@aeye/replicate": "0.4.0"
58
+ },
59
+ "devDependencies": {
60
+ "@types/node": "^20.12.7",
61
+ "axios": "^1.7.2",
62
+ "openapi-typescript": "^7.10.1",
63
+ "replicate": "^0.34.1",
64
+ "tsconfig-paths": "^4.2.0",
65
+ "tsx": "^4.7.0",
66
+ "typescript": "^5.9.3"
67
+ },
68
+ "publishConfig": {
69
+ "access": "public"
70
+ },
71
+ "engines": {
72
+ "node": ">=16.0.0"
73
+ },
74
+ "homepage": "https://github.com/ClickerMonkey/aeye#readme",
75
+ "bugs": {
76
+ "url": "https://github.com/ClickerMonkey/aeye/issues"
77
+ }
78
+ }
@@ -27,6 +27,8 @@ export const stringifyModel = (m: ModelInfo) => {
27
27
  [m.capabilities, `capabilities: new Set([${Array.from(m.capabilities).map(c => `'${c}'`).join(', ')}])`],
28
28
  [m.supportedParameters?.size || (m.supportedParameters as any)?.length, `supportedParameters: new Set([${Array.from(m.supportedParameters || []).map(p => `'${p}'`).join(', ')}])`],
29
29
  [m.pricing || {}, `pricing: ${stringify(m.pricing, 2)}`],
30
+ [m.reasoningEfforts?.length, `reasoningEfforts: [${(m.reasoningEfforts ?? []).map(e => `'${e}'`).join(', ')}]`],
31
+ [m.retiresAt, `retiresAt: '${m.retiresAt}'`],
30
32
  [m.metrics, `metrics: ${stringify(m.metrics, 2)}`],
31
33
  [m.metadata, `metadata: ${stringify(m.metadata, 2)}`],
32
34
  ];
@@ -72,6 +74,14 @@ export async function writeModelTS(
72
74
  await fs.writeFile(outputPath, content, 'utf-8');
73
75
  }
74
76
 
77
+ /**
78
+ * Write model data as JSON for reference, sets as arrays
79
+ */
80
+ export async function writeModelJSON(models: ModelInfo[], outputPath: string): Promise<void> {
81
+ await fs.mkdir(path.dirname(outputPath), { recursive: true });
82
+ await fs.writeFile(outputPath, JSON.stringify(models, (_key, value) => value instanceof Set ? Array.from(value) : value, 2));
83
+ }
84
+
75
85
  /**
76
86
  * Generate the models/index.ts file that aggregates all provider models
77
87
  */
@@ -117,5 +127,7 @@ export function generateMainIndexTS(): string {
117
127
 
118
128
  export { models, openaiModels, openrouterModels, replicateModels, awsModels } from './models';
119
129
  export { transformers } from './transformers';
130
+ export { replicateTransformers } from './transformers/replicate';
131
+ export { strictSupport } from './strict-support';
120
132
  `;
121
133
  }
package/scripts/scrape.ts CHANGED
@@ -6,16 +6,23 @@
6
6
 
7
7
  import * as fs from 'fs/promises';
8
8
  import * as path from 'path';
9
+ import { fileURLToPath } from 'url';
9
10
  import { scrapeOpenAI } from './scrapers/openai';
10
11
  import { scrapeOpenRouter } from './scrapers/openrouter';
11
12
  import { scrapeReplicate } from './scrapers/replicate';
12
13
  import { scrapeAWS } from './scrapers/aws';
13
14
  import { generateModelsIndexTS, generateMainIndexTS } from './codegen';
14
15
 
16
+ type Source = 'openai' | 'openrouter' | 'replicate' | 'aws';
17
+
18
+ const SOURCES: Source[] = ['openai', 'openrouter', 'replicate', 'aws'];
19
+
20
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
21
+
15
22
  interface ScraperOptions {
16
23
  outputDir?: string;
17
24
  cacheDir?: string;
18
- sources?: ('openai' | 'openrouter' | 'replicate' | 'aws')[];
25
+ sources?: Source[];
19
26
  concurrency?: number;
20
27
  scrapeMetrics?: boolean;
21
28
  awsRegion?: string;
@@ -27,7 +34,7 @@ interface ScraperOptions {
27
34
  export async function scrapeAllModels(options: ScraperOptions = {}): Promise<void> {
28
35
  const outputDir = options.outputDir || path.join(__dirname, '../data');
29
36
  const cacheDir = options.cacheDir || path.join(__dirname, '../cache');
30
- const sources = options.sources || ['openai', 'openrouter', 'replicate', 'aws'];
37
+ const sources = options.sources || SOURCES;
31
38
  const concurrency = options.concurrency || 5;
32
39
  const scrapeMetrics = options.scrapeMetrics || false;
33
40
  const awsRegion = options.awsRegion;
@@ -114,7 +121,8 @@ export async function scrapeAllModels(options: ScraperOptions = {}): Promise<voi
114
121
 
115
122
  console.log(`\n${successCount}/${totalCount} sources completed successfully\n`);
116
123
 
117
- if (successCount === 0) {
124
+ // Any failed source fails the run; the sources that succeeded still regenerate
125
+ if (successCount < totalCount) {
118
126
  process.exitCode = 1;
119
127
  }
120
128
 
@@ -145,7 +153,7 @@ export async function scrapeAllModels(options: ScraperOptions = {}): Promise<voi
145
153
  }
146
154
 
147
155
  // CLI execution
148
- if (require.main === module) {
156
+ if (process.argv[1].endsWith('scrape.ts')) {
149
157
  const args = process.argv.slice(2);
150
158
 
151
159
  // Parse command line arguments
@@ -153,7 +161,7 @@ if (require.main === module) {
153
161
  const cacheDir = args.find((arg) => arg.startsWith('--cache='))?.split('=')[1];
154
162
  const sourcesArg = args.find((arg) => arg.startsWith('--sources='))?.split('=')[1];
155
163
  const sources = sourcesArg
156
- ? (sourcesArg.split(',') as ('openai' | 'openrouter' | 'replicate' | 'aws')[])
164
+ ? sourcesArg.split(',').flatMap((name) => SOURCES.filter((source) => source === name))
157
165
  : undefined;
158
166
 
159
167
  const concurrencyArg = args.find((arg) => arg.startsWith('--concurrency='));