@anolilab/ai-model-registry 4.0.2 → 4.1.1

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 (220) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +123 -0
  3. package/dist/icons-sprite.d.ts +1 -2
  4. package/dist/icons-sprite.js +3 -6
  5. package/dist/index.d.ts +47 -49
  6. package/dist/index.js +1 -1
  7. package/dist/packem_shared/{aihubmix-CjuksD_A.js → aihubmix-3eUEO81x.js} +30 -26
  8. package/dist/packem_shared/alibaba-DO3mwr5n.js +1 -0
  9. package/dist/packem_shared/amazon-bedrock-kuD9YAc_.js +1 -0
  10. package/dist/packem_shared/anthropic-Cf5ei7gv.js +5 -0
  11. package/dist/packem_shared/azure-open-ai-NdDwqwXE.js +1 -0
  12. package/dist/packem_shared/cerebras-CBfHNOx5.js +1 -0
  13. package/dist/packem_shared/chutes-CdMXItbr.js +2 -0
  14. package/dist/packem_shared/cloudflare-BJ1QVsF1.js +3 -0
  15. package/dist/packem_shared/deep-infra-Cck2XGez.js +1 -0
  16. package/dist/packem_shared/deep-seek-Ce7yheJ9.js +1 -0
  17. package/dist/packem_shared/fireworks-ai-FmFnhc9z.js +1 -0
  18. package/dist/packem_shared/git-hub-copilot-CqrXfcpe.js +1 -0
  19. package/dist/packem_shared/google-D6RThtPk.js +1 -0
  20. package/dist/packem_shared/google-partner-DgQowLhd.js +1 -0
  21. package/dist/packem_shared/google-vertex-lCsXuwhh.js +1 -0
  22. package/dist/packem_shared/groq-Bz3CszS1.js +1 -0
  23. package/dist/packem_shared/hugging-face-L3wtFFVQ.js +1 -0
  24. package/dist/packem_shared/inception-WkPuNJJc.js +1 -0
  25. package/dist/packem_shared/inference-CascC5hi.js +1 -0
  26. package/dist/packem_shared/meta-9Qr5WFEr.js +1 -0
  27. package/dist/packem_shared/mistral-eECLD_-Y.js +1 -0
  28. package/dist/packem_shared/model-scope-CcR8U1m0.js +3 -0
  29. package/dist/packem_shared/ollama-cloud-YeFjAjPM.js +1 -0
  30. package/dist/packem_shared/{open-ai-byQBxiD0.js → open-ai-C9dp9K38.js} +2 -2
  31. package/dist/packem_shared/open-router-UNNnC1Gf.js +1 -0
  32. package/dist/packem_shared/requesty-B-kslTFP.js +72 -0
  33. package/dist/packem_shared/together-ai-DVcWBHEB.js +1 -0
  34. package/dist/packem_shared/upstage-BdDX81K1.js +1 -0
  35. package/dist/packem_shared/v0-DweiLDeZ.js +1 -0
  36. package/dist/packem_shared/venice-B2S4t2BX.js +1 -0
  37. package/dist/packem_shared/vercel-DJGvYdAY.js +1 -0
  38. package/dist/packem_shared/weights-_-biases-CHQHwsFi.js +1 -0
  39. package/dist/packem_shared/xai-2PIcrQ0M.js +3 -0
  40. package/dist/providers/aihubmix.d.ts +36 -38
  41. package/dist/providers/aihubmix.js +1 -1
  42. package/dist/providers/alibaba.d.ts +36 -38
  43. package/dist/providers/alibaba.js +1 -1
  44. package/dist/providers/amazon-bedrock.d.ts +36 -38
  45. package/dist/providers/amazon-bedrock.js +1 -1
  46. package/dist/providers/anthropic.d.ts +36 -38
  47. package/dist/providers/anthropic.js +1 -1
  48. package/dist/providers/azure-open-ai.d.ts +36 -38
  49. package/dist/providers/azure-open-ai.js +1 -1
  50. package/dist/providers/cerebras.d.ts +36 -38
  51. package/dist/providers/cerebras.js +1 -1
  52. package/dist/providers/chutes.d.ts +36 -38
  53. package/dist/providers/chutes.js +1 -1
  54. package/dist/providers/cloudflare.d.ts +36 -38
  55. package/dist/providers/cloudflare.js +1 -1
  56. package/dist/providers/deep-infra.d.ts +36 -38
  57. package/dist/providers/deep-infra.js +1 -1
  58. package/dist/providers/deep-seek.d.ts +36 -38
  59. package/dist/providers/deep-seek.js +1 -1
  60. package/dist/providers/fireworks-ai.d.ts +36 -38
  61. package/dist/providers/fireworks-ai.js +1 -1
  62. package/dist/providers/git-hub-copilot.d.ts +36 -38
  63. package/dist/providers/git-hub-copilot.js +1 -1
  64. package/dist/providers/google-partner.d.ts +36 -38
  65. package/dist/providers/google-partner.js +1 -1
  66. package/dist/providers/google-vertex.d.ts +36 -38
  67. package/dist/providers/google-vertex.js +1 -1
  68. package/dist/providers/google.d.ts +36 -38
  69. package/dist/providers/google.js +1 -1
  70. package/dist/providers/groq.d.ts +36 -38
  71. package/dist/providers/groq.js +1 -1
  72. package/dist/providers/hugging-face.d.ts +36 -38
  73. package/dist/providers/hugging-face.js +1 -1
  74. package/dist/providers/inception.d.ts +36 -38
  75. package/dist/providers/inception.js +1 -1
  76. package/dist/providers/inference.d.ts +36 -38
  77. package/dist/providers/inference.js +1 -1
  78. package/dist/providers/meta.d.ts +36 -38
  79. package/dist/providers/meta.js +1 -1
  80. package/dist/providers/mistral.d.ts +36 -38
  81. package/dist/providers/mistral.js +1 -1
  82. package/dist/providers/model-scope.d.ts +36 -38
  83. package/dist/providers/model-scope.js +1 -1
  84. package/dist/providers/ollama-cloud.d.ts +36 -38
  85. package/dist/providers/ollama-cloud.js +1 -1
  86. package/dist/providers/open-ai.d.ts +36 -38
  87. package/dist/providers/open-ai.js +1 -1
  88. package/dist/providers/open-router.d.ts +36 -38
  89. package/dist/providers/open-router.js +1 -1
  90. package/dist/providers/requesty.d.ts +36 -38
  91. package/dist/providers/requesty.js +1 -1
  92. package/dist/providers/together-ai.d.ts +36 -38
  93. package/dist/providers/together-ai.js +1 -1
  94. package/dist/providers/upstage.d.ts +36 -38
  95. package/dist/providers/upstage.js +1 -1
  96. package/dist/providers/v0.d.ts +36 -38
  97. package/dist/providers/v0.js +1 -1
  98. package/dist/providers/venice.d.ts +36 -38
  99. package/dist/providers/venice.js +1 -1
  100. package/dist/providers/vercel.d.ts +36 -38
  101. package/dist/providers/vercel.js +1 -1
  102. package/dist/providers/weights-_-biases.d.ts +36 -38
  103. package/dist/providers/weights-_-biases.js +1 -1
  104. package/dist/providers/xai.d.ts +36 -38
  105. package/dist/providers/xai.js +1 -1
  106. package/dist/schema.d.ts +84 -90
  107. package/dist/schema.js +1 -1
  108. package/dist/types/ai-hub-mix.d.ts +4 -5
  109. package/dist/types/alibaba.d.ts +3 -4
  110. package/dist/types/amazon-bedrock.d.ts +3 -4
  111. package/dist/types/anthropic.d.ts +4 -5
  112. package/dist/types/azure-open-ai.d.ts +3 -4
  113. package/dist/types/cerebras.d.ts +3 -4
  114. package/dist/types/chutes.d.ts +4 -5
  115. package/dist/types/cloudflare.d.ts +4 -5
  116. package/dist/types/deep-infra.d.ts +4 -5
  117. package/dist/types/deep-seek.d.ts +3 -4
  118. package/dist/types/fireworks-ai.d.ts +4 -5
  119. package/dist/types/git-hub-copilot.d.ts +4 -5
  120. package/dist/types/google-partner.d.ts +3 -4
  121. package/dist/types/google-vertex.d.ts +4 -5
  122. package/dist/types/google.d.ts +3 -4
  123. package/dist/types/groq.d.ts +3 -4
  124. package/dist/types/hugging-face.d.ts +4 -5
  125. package/dist/types/inception.d.ts +4 -5
  126. package/dist/types/inference.d.ts +3 -4
  127. package/dist/types/meta.d.ts +3 -4
  128. package/dist/types/mistral.d.ts +4 -5
  129. package/dist/types/model-scope.d.ts +4 -5
  130. package/dist/types/ollama-cloud.d.ts +4 -5
  131. package/dist/types/open-ai.d.ts +3 -4
  132. package/dist/types/open-router.d.ts +4 -5
  133. package/dist/types/providers.d.ts +7 -9
  134. package/dist/types/providers.js +1 -1
  135. package/dist/types/requesty.d.ts +4 -5
  136. package/dist/types/together-ai.d.ts +3 -4
  137. package/dist/types/upstage.d.ts +4 -5
  138. package/dist/types/v0.d.ts +4 -5
  139. package/dist/types/venice.d.ts +3 -4
  140. package/dist/types/vercel.d.ts +4 -5
  141. package/dist/types/weights-_-biases.d.ts +4 -5
  142. package/dist/types/xai.d.ts +3 -4
  143. package/package.json +2 -2
  144. package/public/ai-hub-mix.json +2691 -327
  145. package/public/alibaba.json +23 -23
  146. package/public/amazon-bedrock.json +4 -4
  147. package/public/anthropic.json +114 -5
  148. package/public/azure-open-ai.json +2 -2
  149. package/public/cerebras.json +11 -11
  150. package/public/chutes.json +349 -9
  151. package/public/cloudflare.json +246 -9
  152. package/public/deep-infra.json +111 -6
  153. package/public/deep-seek.json +2 -2
  154. package/public/fireworks-ai.json +169 -5615
  155. package/public/git-hub-copilot.json +178 -3
  156. package/public/google-partner.json +2 -2
  157. package/public/google-vertex.json +38 -3
  158. package/public/google.json +2 -2
  159. package/public/groq.json +2 -2
  160. package/public/hugging-face.json +285 -5
  161. package/public/inception.json +73 -3
  162. package/public/inference.json +2 -2
  163. package/public/meta.json +2 -2
  164. package/public/mistral.json +38 -3
  165. package/public/model-scope.json +17735 -6066
  166. package/public/ollama-cloud.json +24 -806
  167. package/public/open-ai.json +2 -2
  168. package/public/open-router.json +2074 -744
  169. package/public/providers.json +4 -40
  170. package/public/requesty.json +5404 -2892
  171. package/public/together-ai.json +2 -2
  172. package/public/upstage.json +89 -54
  173. package/public/v0.json +73 -3
  174. package/public/venice.json +2 -2
  175. package/public/vercel.json +1587 -257
  176. package/public/weights-&-biases.json +349 -119
  177. package/public/xai.json +3 -2
  178. package/dist/packem_shared/alibaba-KCpNTbPH.js +0 -1
  179. package/dist/packem_shared/amazon-bedrock-BEpdRaRK.js +0 -1
  180. package/dist/packem_shared/anthropic-D5m7WwK5.js +0 -2
  181. package/dist/packem_shared/azure-open-ai-C6QP5dSw.js +0 -1
  182. package/dist/packem_shared/cerebras-BjaINteN.js +0 -1
  183. package/dist/packem_shared/chutes-DJskRgMs.js +0 -3
  184. package/dist/packem_shared/cloudflare-C83X5Lbf.js +0 -3
  185. package/dist/packem_shared/deep-infra-BbtbGruj.js +0 -1
  186. package/dist/packem_shared/deep-seek-CWqPVvJA.js +0 -1
  187. package/dist/packem_shared/fireworks-ai-D3bvzN8A.js +0 -1
  188. package/dist/packem_shared/git-hub-copilot-B0xJ4jvl.js +0 -1
  189. package/dist/packem_shared/git-hub-models-Cyf4N1hP.js +0 -1
  190. package/dist/packem_shared/google-CF3J5A9V.js +0 -1
  191. package/dist/packem_shared/google-partner-DV4aTl-d.js +0 -1
  192. package/dist/packem_shared/google-vertex-CbWZUmxZ.js +0 -1
  193. package/dist/packem_shared/groq-BiW3tuc8.js +0 -1
  194. package/dist/packem_shared/hugging-face-CWivgPFf.js +0 -1
  195. package/dist/packem_shared/inception-C2RuJCqh.js +0 -1
  196. package/dist/packem_shared/inference-DeVnQ2rP.js +0 -1
  197. package/dist/packem_shared/meta-DgZfkCHT.js +0 -1
  198. package/dist/packem_shared/mistral-Bqk6rtoD.js +0 -1
  199. package/dist/packem_shared/model-scope-B97EzMOm.js +0 -1
  200. package/dist/packem_shared/morph-CBEkhIbg.js +0 -1
  201. package/dist/packem_shared/ollama-cloud-AMbVVbEe.js +0 -1
  202. package/dist/packem_shared/open-router-Bgk_Eg85.js +0 -1
  203. package/dist/packem_shared/requesty-jpAC9INf.js +0 -73
  204. package/dist/packem_shared/together-ai-DGMgKPuZ.js +0 -1
  205. package/dist/packem_shared/upstage-CdH3YrFR.js +0 -1
  206. package/dist/packem_shared/v0-BjlxXJua.js +0 -1
  207. package/dist/packem_shared/venice-C3HQT6s8.js +0 -1
  208. package/dist/packem_shared/vercel-CtkHacHk.js +0 -1
  209. package/dist/packem_shared/weights-_-biases-BJw-U5-q.js +0 -1
  210. package/dist/packem_shared/xai-ojVHf5mV.js +0 -1
  211. package/dist/providers/git-hub-models.d.ts +0 -49
  212. package/dist/providers/git-hub-models.js +0 -1
  213. package/dist/providers/morph.d.ts +0 -49
  214. package/dist/providers/morph.js +0 -1
  215. package/dist/types/git-hub-models.d.ts +0 -6
  216. package/dist/types/git-hub-models.js +0 -0
  217. package/dist/types/morph.d.ts +0 -6
  218. package/dist/types/morph.js +0 -0
  219. package/public/git-hub-models.json +0 -257
  220. package/public/morph.json +0 -47
package/dist/index.d.ts CHANGED
@@ -1,64 +1,62 @@
1
- import { Model } from './schema.js';
2
- import { ProviderName } from './types/providers.js';
1
+ import { Model } from "./schema.js";
2
+ import { ProviderName } from "./types/providers.js";
3
3
  import 'zod';
4
-
5
4
  /**
6
- * Retrieves all available AI model providers from the registry.
7
- * @returns Promise that resolves to an array of provider names sorted alphabetically.
8
- */
5
+ * Retrieves all available AI model providers from the registry.
6
+ * @returns Promise that resolves to an array of provider names sorted alphabetically.
7
+ */
9
8
  declare const getProviders: () => Promise<ProviderName[]>;
10
9
  /**
11
- * Retrieves all AI models for a specific provider.
12
- * First tries to load from provider-specific module, falls back to filtering all models.
13
- * @param provider The name of the provider to filter by.
14
- * @returns Promise that resolves to an array of models belonging to the specified provider.
15
- */
10
+ * Retrieves all AI models for a specific provider.
11
+ * First tries to load from provider-specific module, falls back to filtering all models.
12
+ * @param provider The name of the provider to filter by.
13
+ * @returns Promise that resolves to an array of models belonging to the specified provider.
14
+ */
16
15
  declare const getModelsByProvider: (provider: ProviderName) => Promise<Model[]>;
17
16
  /**
18
- * Retrieves a specific AI model by its unique identifier.
19
- * @param id The unique identifier of the model to retrieve.
20
- * @returns Promise that resolves to the model if found, undefined otherwise.
21
- */
17
+ * Retrieves a specific AI model by its unique identifier.
18
+ * @param id The unique identifier of the model to retrieve.
19
+ * @returns Promise that resolves to the model if found, undefined otherwise.
20
+ */
22
21
  declare const getModelById: (id: string) => Promise<Model | undefined>;
23
22
  /**
24
- * Searches and filters AI models based on various criteria such as capabilities, provider, and context window.
25
- * @param criteria The search criteria to filter models by.
26
- * @param criteria.context_min Minimum context window size (excludes models with null/undefined context).
27
- * @param criteria.context_max Maximum context window size (excludes models with null/undefined context).
28
- * @param criteria.modalities Input/output modalities to filter by.
29
- * @param criteria.modalities.input Array of input modalities to filter by.
30
- * @param criteria.modalities.output Array of output modalities to filter by.
31
- * @param criteria.preview Whether to filter by preview status.
32
- * @param criteria.provider Provider name to filter by.
33
- * @param criteria.reasoning Whether to filter by reasoning capability.
34
- * @param criteria.streaming_supported Whether to filter by streaming support.
35
- * @param criteria.tool_call Whether to filter by tool calling capability.
36
- * @param criteria.vision Whether to filter by vision capability.
37
- * @returns Promise that resolves to an array of models that match the specified criteria.
38
- */
23
+ * Searches and filters AI models based on various criteria such as capabilities, provider, and context window.
24
+ * @param criteria The search criteria to filter models by.
25
+ * @param criteria.context_min Minimum context window size (excludes models with null/undefined context).
26
+ * @param criteria.context_max Maximum context window size (excludes models with null/undefined context).
27
+ * @param criteria.modalities Input/output modalities to filter by.
28
+ * @param criteria.modalities.input Array of input modalities to filter by.
29
+ * @param criteria.modalities.output Array of output modalities to filter by.
30
+ * @param criteria.preview Whether to filter by preview status.
31
+ * @param criteria.provider Provider name to filter by.
32
+ * @param criteria.reasoning Whether to filter by reasoning capability.
33
+ * @param criteria.streaming_supported Whether to filter by streaming support.
34
+ * @param criteria.tool_call Whether to filter by tool calling capability.
35
+ * @param criteria.vision Whether to filter by vision capability.
36
+ * @returns Promise that resolves to an array of models that match the specified criteria.
37
+ */
39
38
  declare const searchModels: (criteria: {
40
- context_max?: number;
41
- context_min?: number;
42
- modalities?: {
43
- input?: string[];
44
- output?: string[];
45
- };
46
- preview?: boolean;
47
- provider?: ProviderName;
48
- reasoning?: boolean;
49
- streaming_supported?: boolean;
50
- tool_call?: boolean;
51
- vision?: boolean;
39
+ context_max?: number;
40
+ context_min?: number;
41
+ modalities?: {
42
+ input?: string[];
43
+ output?: string[];
44
+ };
45
+ preview?: boolean;
46
+ provider?: ProviderName;
47
+ reasoning?: boolean;
48
+ streaming_supported?: boolean;
49
+ tool_call?: boolean;
50
+ vision?: boolean;
52
51
  }) => Promise<Model[]>;
53
52
  /**
54
- * Retrieves all AI models from the registry for advanced filtering and processing.
55
- * @returns Promise that resolves to a copy of all models in the registry.
56
- */
53
+ * Retrieves all AI models from the registry for advanced filtering and processing.
54
+ * @returns Promise that resolves to a copy of all models in the registry.
55
+ */
57
56
  declare const getAllModels: () => Promise<Model[]>;
58
57
  /**
59
- * Retrieves statistics about AI model providers including their model counts.
60
- * @returns Promise that resolves to an object mapping provider names to their model counts.
61
- */
58
+ * Retrieves statistics about AI model providers including their model counts.
59
+ * @returns Promise that resolves to an object mapping provider names to their model counts.
60
+ */
62
61
  declare const getProviderStats: () => Promise<Record<ProviderName, number>>;
63
-
64
62
  export { getAllModels, getModelById, getModelsByProvider, getProviderStats, getProviders, searchModels };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var c=Object.defineProperty;var l=(o,r)=>c(o,"name",{value:r,configurable:!0});import{u}from"./packem_shared/aihubmix-CjuksD_A.js";import{v}from"./packem_shared/alibaba-KCpNTbPH.js";import{P as g}from"./packem_shared/amazon-bedrock-BEpdRaRK.js";import{c as w}from"./packem_shared/anthropic-D5m7WwK5.js";import{g as y}from"./packem_shared/azure-open-ai-C6QP5dSw.js";import{M}from"./packem_shared/cerebras-BjaINteN.js";import{x}from"./packem_shared/chutes-DJskRgMs.js";import{h as A}from"./packem_shared/cloudflare-C83X5Lbf.js";import{w as P}from"./packem_shared/deep-infra-BbtbGruj.js";import{b as h}from"./packem_shared/deep-seek-CWqPVvJA.js";import{y as I}from"./packem_shared/fireworks-ai-D3bvzN8A.js";import{A as b}from"./packem_shared/git-hub-copilot-B0xJ4jvl.js";import{N as S}from"./packem_shared/git-hub-models-Cyf4N1hP.js";import{_}from"./packem_shared/google-CF3J5A9V.js";import{S as B}from"./packem_shared/google-partner-DV4aTl-d.js";import{I as G}from"./packem_shared/google-vertex-CbWZUmxZ.js";import{C as O}from"./packem_shared/groq-BiW3tuc8.js";import{k}from"./packem_shared/hugging-face-CWivgPFf.js";import{B as C}from"./packem_shared/inception-C2RuJCqh.js";import{G as H}from"./packem_shared/inference-DeVnQ2rP.js";import{H as V}from"./packem_shared/meta-DgZfkCHT.js";import{O as q}from"./packem_shared/mistral-Bqk6rtoD.js";import{R as z}from"./packem_shared/model-scope-B97EzMOm.js";import{V as D}from"./packem_shared/morph-CBEkhIbg.js";import{q as E}from"./packem_shared/ollama-cloud-AMbVVbEe.js";import{z as F}from"./packem_shared/open-ai-byQBxiD0.js";import{F as R}from"./packem_shared/open-router-Bgk_Eg85.js";import{L as j}from"./packem_shared/requesty-jpAC9INf.js";import{T as L}from"./packem_shared/together-ai-DGMgKPuZ.js";import{D as T}from"./packem_shared/upstage-CdH3YrFR.js";import{E as U}from"./packem_shared/v0-BjlxXJua.js";import{U as W}from"./packem_shared/venice-C3HQT6s8.js";import{W as X}from"./packem_shared/vercel-CtkHacHk.js";import{X as N}from"./packem_shared/weights-_-biases-BJw-U5-q.js";import{j as J}from"./packem_shared/xai-ojVHf5mV.js";var K=Object.defineProperty,i=l((o,r)=>K(o,"name",{value:r,configurable:!0}),"i");const d=new Map([["AIHubMix",u],["Alibaba",v],["Amazon Bedrock",g],["Anthropic",w],["Azure OpenAI",y],["cerebras",M],["chutes",x],["Cloudflare",A],["Deep Infra",P],["DeepSeek",h],["Fireworks AI",I],["GitHub Copilot",b],["GitHub Models",S],["Google",_],["Google Partner",B],["Google Vertex",G],["Groq",O],["Hugging Face",k],["inception",C],["Inference",H],["Meta",V],["Mistral",q],["ModelScope",z],["Morph",D],["Ollama Cloud",E],["OpenAI",F],["OpenRouter",R],["Requesty",j],["Together AI",L],["Upstage",T],["V0",U],["Venice",W],["Vercel",X],["Weights & Biases",N],["XAI",J]]);let m=null;const s=new Map;let a=null;const n=i(async o=>{const r=s.get(o);if(r)return r;const t=d.get(o);if(t){const p=t.getModels();return s.set(o,p),p}return null},"loadProviderModels"),f=i(async()=>a||(a=[...d.keys()].toSorted(),a),"loadProvidersList"),e=i(async()=>m||(m=(await Promise.all((await f()).map(async o=>await n(o)??[]))).flat(),m),"loadAllModels"),Ho=i(async()=>{const o=await f();if(o.length>0)return o;const r=new Set;return(await e()).forEach(t=>{t.provider&&r.add(t.provider)}),[...r].toSorted()},"getProviders"),Vo=i(async o=>await n(o)??(await e()).filter(r=>r.provider===o),"getModelsByProvider"),qo=i(async o=>{if(o?.trim())return(await e()).find(r=>r.id===o)},"getModelById"),zo=i(async o=>(o.provider?await n(o.provider)??await e():await e()).filter(r=>!(o.vision!==void 0&&r.vision!==o.vision||o.reasoning!==void 0&&r.reasoning!==o.reasoning||o.tool_call!==void 0&&r.toolCall!==o.tool_call||o.streaming_supported!==void 0&&r.streamingSupported!==o.streaming_supported||o.provider&&r.provider!==o.provider||o.preview!==void 0&&r.preview!==o.preview||o.modalities?.input&&!o.modalities.input.every(t=>r.modalities.input.includes(t))||o.modalities?.output&&!o.modalities.output.every(t=>r.modalities.output.includes(t))||o.context_min!==void 0&&(!r.limit.context||r.limit.context<o.context_min)||o.context_max!==void 0&&(!r.limit.context||r.limit.context>o.context_max))),"searchModels"),Do=i(async()=>[...await e()],"getAllModels"),Eo=i(async()=>{const o={};return(await e()).forEach(r=>{r.provider&&(o[r.provider]=(o[r.provider]||0)+1)}),o},"getProviderStats");export{Do as getAllModels,qo as getModelById,Vo as getModelsByProvider,Eo as getProviderStats,Ho as getProviders,zo as searchModels};
1
+ import{p as d}from"./packem_shared/aihubmix-3eUEO81x.js";import{f}from"./packem_shared/alibaba-DO3mwr5n.js";import{u as c}from"./packem_shared/amazon-bedrock-kuD9YAc_.js";import{v as u}from"./packem_shared/anthropic-Cf5ei7gv.js";import{P as v}from"./packem_shared/azure-open-ai-NdDwqwXE.js";import{c as g}from"./packem_shared/cerebras-CBfHNOx5.js";import{g as w}from"./packem_shared/chutes-CdMXItbr.js";import{M as y}from"./packem_shared/cloudflare-BJ1QVsF1.js";import{x}from"./packem_shared/deep-infra-Cck2XGez.js";import{w as A}from"./packem_shared/deep-seek-Ce7yheJ9.js";import{h as M}from"./packem_shared/fireworks-ai-FmFnhc9z.js";import{y as I}from"./packem_shared/git-hub-copilot-CqrXfcpe.js";import{b as h}from"./packem_shared/google-D6RThtPk.js";import{A as _}from"./packem_shared/google-partner-DgQowLhd.js";import{N as S}from"./packem_shared/google-vertex-lCsXuwhh.js";import{_ as b}from"./packem_shared/groq-Bz3CszS1.js";import{S as G}from"./packem_shared/hugging-face-L3wtFFVQ.js";import{I as P}from"./packem_shared/inception-WkPuNJJc.js";import{C as k}from"./packem_shared/inference-CascC5hi.js";import{k as B}from"./packem_shared/meta-9Qr5WFEr.js";import{B as C}from"./packem_shared/mistral-eECLD_-Y.js";import{G as O}from"./packem_shared/model-scope-CcR8U1m0.js";import{O as V}from"./packem_shared/ollama-cloud-YeFjAjPM.js";import{R as H}from"./packem_shared/open-ai-C9dp9K38.js";import{V as q}from"./packem_shared/open-router-UNNnC1Gf.js";import{q as z}from"./packem_shared/requesty-B-kslTFP.js";import{z as D}from"./packem_shared/together-ai-DVcWBHEB.js";import{H as E}from"./packem_shared/upstage-BdDX81K1.js";import{F}from"./packem_shared/v0-DweiLDeZ.js";import{L as R}from"./packem_shared/venice-B2S4t2BX.js";import{T}from"./packem_shared/vercel-DJGvYdAY.js";import{D as L}from"./packem_shared/weights-_-biases-CHQHwsFi.js";import{E as N}from"./packem_shared/xai-2PIcrQ0M.js";const s=new Map([["AIHubMix",d],["Alibaba",f],["Amazon Bedrock",c],["Anthropic",u],["Azure OpenAI",v],["cerebras",g],["chutes",w],["Cloudflare",y],["Deep Infra",x],["DeepSeek",A],["Fireworks AI",M],["GitHub Copilot",I],["Google",h],["Google Partner",_],["Google Vertex",S],["Groq",b],["Hugging Face",G],["inception",P],["Inference",k],["Meta",B],["Mistral",C],["ModelScope",O],["Ollama Cloud",V],["OpenAI",H],["OpenRouter",q],["Requesty",z],["Together AI",D],["Upstage",E],["V0",F],["Venice",R],["Vercel",T],["Weights & Biases",L],["XAI",N]]);let e=null;const p=new Map;let m=null;const a=async o=>{const t=p.get(o);if(t)return t;const r=s.get(o);if(r){const n=r.getModels();return p.set(o,n),n}return null},l=async()=>m||(m=[...s.keys()].toSorted(),m),i=async()=>e||(e=(await Promise.all((await l()).map(async o=>await a(o)??[]))).flat(),e),_o=async()=>{const o=await l();if(o.length>0)return o;const t=new Set;return(await i()).forEach(r=>{r.provider&&t.add(r.provider)}),[...t].toSorted()},So=async o=>await a(o)??(await i()).filter(t=>t.provider===o),bo=async o=>{if(o?.trim())return(await i()).find(t=>t.id===o)},Go=async o=>(o.provider?await a(o.provider)??await i():await i()).filter(t=>!(o.vision!==void 0&&t.vision!==o.vision||o.reasoning!==void 0&&t.reasoning!==o.reasoning||o.tool_call!==void 0&&t.toolCall!==o.tool_call||o.streaming_supported!==void 0&&t.streamingSupported!==o.streaming_supported||o.provider&&t.provider!==o.provider||o.preview!==void 0&&t.preview!==o.preview||o.modalities?.input&&!o.modalities.input.every(r=>t.modalities.input.includes(r))||o.modalities?.output&&!o.modalities.output.every(r=>t.modalities.output.includes(r))||o.context_min!==void 0&&(!t.limit.context||t.limit.context<o.context_min)||o.context_max!==void 0&&(!t.limit.context||t.limit.context>o.context_max))),Po=async()=>[...await i()],ko=async()=>{const o={};return(await i()).forEach(t=>{t.provider&&(o[t.provider]=(o[t.provider]||0)+1)}),o};export{Po as getAllModels,bo as getModelById,So as getModelsByProvider,ko as getProviderStats,_o as getProviders,Go as searchModels};