llm-zoo 1.0.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.
- package/LICENSE +21 -0
- package/README.md +269 -0
- package/dist/index-CQCjbg9k.d.cts +226 -0
- package/dist/index-CQCjbg9k.d.ts +226 -0
- package/dist/index.cjs +1778 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +260 -0
- package/dist/index.d.ts +260 -0
- package/dist/index.js +1733 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/index.cjs +1535 -0
- package/dist/providers/index.cjs.map +1 -0
- package/dist/providers/index.d.cts +1 -0
- package/dist/providers/index.d.ts +1 -0
- package/dist/providers/index.js +1523 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/schemas.cjs +61 -0
- package/dist/schemas.cjs.map +1 -0
- package/dist/schemas.d.cts +355 -0
- package/dist/schemas.d.ts +355 -0
- package/dist/schemas.js +55 -0
- package/dist/schemas.js.map +1 -0
- package/package.json +91 -0
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Zod schemas for runtime validation of model configurations.
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
declare const ReasoningEffortSchema: z.ZodEnum<["xhigh", "high", "medium", "low", "none"]>;
|
|
9
|
+
declare const ModelProviderSchema: z.ZodEnum<["anthropic", "openai", "google", "deepseek", "xai", "moonshot", "dashscope", "copilot", "others"]>;
|
|
10
|
+
declare const ModelCapabilitiesSchema: z.ZodObject<{
|
|
11
|
+
supportsFunctionCalling: z.ZodBoolean;
|
|
12
|
+
supportsNativeMCPServer: z.ZodBoolean;
|
|
13
|
+
supportsNativeWebSearch: z.ZodBoolean;
|
|
14
|
+
supportsNativeCodeExecution: z.ZodBoolean;
|
|
15
|
+
supportsPromptCaching: z.ZodBoolean;
|
|
16
|
+
supportsAutoPromptCaching: z.ZodBoolean;
|
|
17
|
+
cacheDiscountFactor: z.ZodNumber;
|
|
18
|
+
supportsReasoning: z.ZodBoolean;
|
|
19
|
+
supportsInterleavedThinking: z.ZodBoolean;
|
|
20
|
+
supportsReasoningEffort: z.ZodBoolean;
|
|
21
|
+
reasoningEffort: z.ZodEnum<["xhigh", "high", "medium", "low", "none"]>;
|
|
22
|
+
supportsVision: z.ZodBoolean;
|
|
23
|
+
supportsNativePdf: z.ZodBoolean;
|
|
24
|
+
supportsNativeAudio: z.ZodBoolean;
|
|
25
|
+
supportsAssistantPrefill: z.ZodBoolean;
|
|
26
|
+
supportsPredictiveOutput: z.ZodBoolean;
|
|
27
|
+
supportsTokenCounting: z.ZodBoolean;
|
|
28
|
+
supportsSystemPrompt: z.ZodBoolean;
|
|
29
|
+
supportsIntermDevMsgs: z.ZodBoolean;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
supportsFunctionCalling: boolean;
|
|
32
|
+
supportsNativeMCPServer: boolean;
|
|
33
|
+
supportsNativeWebSearch: boolean;
|
|
34
|
+
supportsNativeCodeExecution: boolean;
|
|
35
|
+
supportsPromptCaching: boolean;
|
|
36
|
+
supportsAutoPromptCaching: boolean;
|
|
37
|
+
cacheDiscountFactor: number;
|
|
38
|
+
supportsReasoning: boolean;
|
|
39
|
+
supportsInterleavedThinking: boolean;
|
|
40
|
+
supportsReasoningEffort: boolean;
|
|
41
|
+
reasoningEffort: "xhigh" | "high" | "medium" | "low" | "none";
|
|
42
|
+
supportsVision: boolean;
|
|
43
|
+
supportsNativePdf: boolean;
|
|
44
|
+
supportsNativeAudio: boolean;
|
|
45
|
+
supportsAssistantPrefill: boolean;
|
|
46
|
+
supportsPredictiveOutput: boolean;
|
|
47
|
+
supportsTokenCounting: boolean;
|
|
48
|
+
supportsSystemPrompt: boolean;
|
|
49
|
+
supportsIntermDevMsgs: boolean;
|
|
50
|
+
}, {
|
|
51
|
+
supportsFunctionCalling: boolean;
|
|
52
|
+
supportsNativeMCPServer: boolean;
|
|
53
|
+
supportsNativeWebSearch: boolean;
|
|
54
|
+
supportsNativeCodeExecution: boolean;
|
|
55
|
+
supportsPromptCaching: boolean;
|
|
56
|
+
supportsAutoPromptCaching: boolean;
|
|
57
|
+
cacheDiscountFactor: number;
|
|
58
|
+
supportsReasoning: boolean;
|
|
59
|
+
supportsInterleavedThinking: boolean;
|
|
60
|
+
supportsReasoningEffort: boolean;
|
|
61
|
+
reasoningEffort: "xhigh" | "high" | "medium" | "low" | "none";
|
|
62
|
+
supportsVision: boolean;
|
|
63
|
+
supportsNativePdf: boolean;
|
|
64
|
+
supportsNativeAudio: boolean;
|
|
65
|
+
supportsAssistantPrefill: boolean;
|
|
66
|
+
supportsPredictiveOutput: boolean;
|
|
67
|
+
supportsTokenCounting: boolean;
|
|
68
|
+
supportsSystemPrompt: boolean;
|
|
69
|
+
supportsIntermDevMsgs: boolean;
|
|
70
|
+
}>;
|
|
71
|
+
declare const ModelConfigSchema: z.ZodObject<{
|
|
72
|
+
name: z.ZodString;
|
|
73
|
+
fullName: z.ZodString;
|
|
74
|
+
provider: z.ZodEnum<["anthropic", "openai", "google", "deepseek", "xai", "moonshot", "dashscope", "copilot", "others"]>;
|
|
75
|
+
maxOutputTokens: z.ZodNumber;
|
|
76
|
+
inputPrice: z.ZodNumber;
|
|
77
|
+
outputPrice: z.ZodNumber;
|
|
78
|
+
contextWindow: z.ZodNumber;
|
|
79
|
+
capabilities: z.ZodObject<{
|
|
80
|
+
supportsFunctionCalling: z.ZodBoolean;
|
|
81
|
+
supportsNativeMCPServer: z.ZodBoolean;
|
|
82
|
+
supportsNativeWebSearch: z.ZodBoolean;
|
|
83
|
+
supportsNativeCodeExecution: z.ZodBoolean;
|
|
84
|
+
supportsPromptCaching: z.ZodBoolean;
|
|
85
|
+
supportsAutoPromptCaching: z.ZodBoolean;
|
|
86
|
+
cacheDiscountFactor: z.ZodNumber;
|
|
87
|
+
supportsReasoning: z.ZodBoolean;
|
|
88
|
+
supportsInterleavedThinking: z.ZodBoolean;
|
|
89
|
+
supportsReasoningEffort: z.ZodBoolean;
|
|
90
|
+
reasoningEffort: z.ZodEnum<["xhigh", "high", "medium", "low", "none"]>;
|
|
91
|
+
supportsVision: z.ZodBoolean;
|
|
92
|
+
supportsNativePdf: z.ZodBoolean;
|
|
93
|
+
supportsNativeAudio: z.ZodBoolean;
|
|
94
|
+
supportsAssistantPrefill: z.ZodBoolean;
|
|
95
|
+
supportsPredictiveOutput: z.ZodBoolean;
|
|
96
|
+
supportsTokenCounting: z.ZodBoolean;
|
|
97
|
+
supportsSystemPrompt: z.ZodBoolean;
|
|
98
|
+
supportsIntermDevMsgs: z.ZodBoolean;
|
|
99
|
+
}, "strip", z.ZodTypeAny, {
|
|
100
|
+
supportsFunctionCalling: boolean;
|
|
101
|
+
supportsNativeMCPServer: boolean;
|
|
102
|
+
supportsNativeWebSearch: boolean;
|
|
103
|
+
supportsNativeCodeExecution: boolean;
|
|
104
|
+
supportsPromptCaching: boolean;
|
|
105
|
+
supportsAutoPromptCaching: boolean;
|
|
106
|
+
cacheDiscountFactor: number;
|
|
107
|
+
supportsReasoning: boolean;
|
|
108
|
+
supportsInterleavedThinking: boolean;
|
|
109
|
+
supportsReasoningEffort: boolean;
|
|
110
|
+
reasoningEffort: "xhigh" | "high" | "medium" | "low" | "none";
|
|
111
|
+
supportsVision: boolean;
|
|
112
|
+
supportsNativePdf: boolean;
|
|
113
|
+
supportsNativeAudio: boolean;
|
|
114
|
+
supportsAssistantPrefill: boolean;
|
|
115
|
+
supportsPredictiveOutput: boolean;
|
|
116
|
+
supportsTokenCounting: boolean;
|
|
117
|
+
supportsSystemPrompt: boolean;
|
|
118
|
+
supportsIntermDevMsgs: boolean;
|
|
119
|
+
}, {
|
|
120
|
+
supportsFunctionCalling: boolean;
|
|
121
|
+
supportsNativeMCPServer: boolean;
|
|
122
|
+
supportsNativeWebSearch: boolean;
|
|
123
|
+
supportsNativeCodeExecution: boolean;
|
|
124
|
+
supportsPromptCaching: boolean;
|
|
125
|
+
supportsAutoPromptCaching: boolean;
|
|
126
|
+
cacheDiscountFactor: number;
|
|
127
|
+
supportsReasoning: boolean;
|
|
128
|
+
supportsInterleavedThinking: boolean;
|
|
129
|
+
supportsReasoningEffort: boolean;
|
|
130
|
+
reasoningEffort: "xhigh" | "high" | "medium" | "low" | "none";
|
|
131
|
+
supportsVision: boolean;
|
|
132
|
+
supportsNativePdf: boolean;
|
|
133
|
+
supportsNativeAudio: boolean;
|
|
134
|
+
supportsAssistantPrefill: boolean;
|
|
135
|
+
supportsPredictiveOutput: boolean;
|
|
136
|
+
supportsTokenCounting: boolean;
|
|
137
|
+
supportsSystemPrompt: boolean;
|
|
138
|
+
supportsIntermDevMsgs: boolean;
|
|
139
|
+
}>;
|
|
140
|
+
openRouterOnly: z.ZodBoolean;
|
|
141
|
+
openrouterFullName: z.ZodOptional<z.ZodString>;
|
|
142
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
|
143
|
+
requiresResponsesAPI: z.ZodOptional<z.ZodBoolean>;
|
|
144
|
+
}, "strip", z.ZodTypeAny, {
|
|
145
|
+
name: string;
|
|
146
|
+
fullName: string;
|
|
147
|
+
provider: "anthropic" | "openai" | "google" | "deepseek" | "xai" | "moonshot" | "dashscope" | "copilot" | "others";
|
|
148
|
+
maxOutputTokens: number;
|
|
149
|
+
inputPrice: number;
|
|
150
|
+
outputPrice: number;
|
|
151
|
+
contextWindow: number;
|
|
152
|
+
capabilities: {
|
|
153
|
+
supportsFunctionCalling: boolean;
|
|
154
|
+
supportsNativeMCPServer: boolean;
|
|
155
|
+
supportsNativeWebSearch: boolean;
|
|
156
|
+
supportsNativeCodeExecution: boolean;
|
|
157
|
+
supportsPromptCaching: boolean;
|
|
158
|
+
supportsAutoPromptCaching: boolean;
|
|
159
|
+
cacheDiscountFactor: number;
|
|
160
|
+
supportsReasoning: boolean;
|
|
161
|
+
supportsInterleavedThinking: boolean;
|
|
162
|
+
supportsReasoningEffort: boolean;
|
|
163
|
+
reasoningEffort: "xhigh" | "high" | "medium" | "low" | "none";
|
|
164
|
+
supportsVision: boolean;
|
|
165
|
+
supportsNativePdf: boolean;
|
|
166
|
+
supportsNativeAudio: boolean;
|
|
167
|
+
supportsAssistantPrefill: boolean;
|
|
168
|
+
supportsPredictiveOutput: boolean;
|
|
169
|
+
supportsTokenCounting: boolean;
|
|
170
|
+
supportsSystemPrompt: boolean;
|
|
171
|
+
supportsIntermDevMsgs: boolean;
|
|
172
|
+
};
|
|
173
|
+
openRouterOnly: boolean;
|
|
174
|
+
openrouterFullName?: string | undefined;
|
|
175
|
+
baseUrl?: string | undefined;
|
|
176
|
+
requiresResponsesAPI?: boolean | undefined;
|
|
177
|
+
}, {
|
|
178
|
+
name: string;
|
|
179
|
+
fullName: string;
|
|
180
|
+
provider: "anthropic" | "openai" | "google" | "deepseek" | "xai" | "moonshot" | "dashscope" | "copilot" | "others";
|
|
181
|
+
maxOutputTokens: number;
|
|
182
|
+
inputPrice: number;
|
|
183
|
+
outputPrice: number;
|
|
184
|
+
contextWindow: number;
|
|
185
|
+
capabilities: {
|
|
186
|
+
supportsFunctionCalling: boolean;
|
|
187
|
+
supportsNativeMCPServer: boolean;
|
|
188
|
+
supportsNativeWebSearch: boolean;
|
|
189
|
+
supportsNativeCodeExecution: boolean;
|
|
190
|
+
supportsPromptCaching: boolean;
|
|
191
|
+
supportsAutoPromptCaching: boolean;
|
|
192
|
+
cacheDiscountFactor: number;
|
|
193
|
+
supportsReasoning: boolean;
|
|
194
|
+
supportsInterleavedThinking: boolean;
|
|
195
|
+
supportsReasoningEffort: boolean;
|
|
196
|
+
reasoningEffort: "xhigh" | "high" | "medium" | "low" | "none";
|
|
197
|
+
supportsVision: boolean;
|
|
198
|
+
supportsNativePdf: boolean;
|
|
199
|
+
supportsNativeAudio: boolean;
|
|
200
|
+
supportsAssistantPrefill: boolean;
|
|
201
|
+
supportsPredictiveOutput: boolean;
|
|
202
|
+
supportsTokenCounting: boolean;
|
|
203
|
+
supportsSystemPrompt: boolean;
|
|
204
|
+
supportsIntermDevMsgs: boolean;
|
|
205
|
+
};
|
|
206
|
+
openRouterOnly: boolean;
|
|
207
|
+
openrouterFullName?: string | undefined;
|
|
208
|
+
baseUrl?: string | undefined;
|
|
209
|
+
requiresResponsesAPI?: boolean | undefined;
|
|
210
|
+
}>;
|
|
211
|
+
declare const ModelRegistrySchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
212
|
+
name: z.ZodString;
|
|
213
|
+
fullName: z.ZodString;
|
|
214
|
+
provider: z.ZodEnum<["anthropic", "openai", "google", "deepseek", "xai", "moonshot", "dashscope", "copilot", "others"]>;
|
|
215
|
+
maxOutputTokens: z.ZodNumber;
|
|
216
|
+
inputPrice: z.ZodNumber;
|
|
217
|
+
outputPrice: z.ZodNumber;
|
|
218
|
+
contextWindow: z.ZodNumber;
|
|
219
|
+
capabilities: z.ZodObject<{
|
|
220
|
+
supportsFunctionCalling: z.ZodBoolean;
|
|
221
|
+
supportsNativeMCPServer: z.ZodBoolean;
|
|
222
|
+
supportsNativeWebSearch: z.ZodBoolean;
|
|
223
|
+
supportsNativeCodeExecution: z.ZodBoolean;
|
|
224
|
+
supportsPromptCaching: z.ZodBoolean;
|
|
225
|
+
supportsAutoPromptCaching: z.ZodBoolean;
|
|
226
|
+
cacheDiscountFactor: z.ZodNumber;
|
|
227
|
+
supportsReasoning: z.ZodBoolean;
|
|
228
|
+
supportsInterleavedThinking: z.ZodBoolean;
|
|
229
|
+
supportsReasoningEffort: z.ZodBoolean;
|
|
230
|
+
reasoningEffort: z.ZodEnum<["xhigh", "high", "medium", "low", "none"]>;
|
|
231
|
+
supportsVision: z.ZodBoolean;
|
|
232
|
+
supportsNativePdf: z.ZodBoolean;
|
|
233
|
+
supportsNativeAudio: z.ZodBoolean;
|
|
234
|
+
supportsAssistantPrefill: z.ZodBoolean;
|
|
235
|
+
supportsPredictiveOutput: z.ZodBoolean;
|
|
236
|
+
supportsTokenCounting: z.ZodBoolean;
|
|
237
|
+
supportsSystemPrompt: z.ZodBoolean;
|
|
238
|
+
supportsIntermDevMsgs: z.ZodBoolean;
|
|
239
|
+
}, "strip", z.ZodTypeAny, {
|
|
240
|
+
supportsFunctionCalling: boolean;
|
|
241
|
+
supportsNativeMCPServer: boolean;
|
|
242
|
+
supportsNativeWebSearch: boolean;
|
|
243
|
+
supportsNativeCodeExecution: boolean;
|
|
244
|
+
supportsPromptCaching: boolean;
|
|
245
|
+
supportsAutoPromptCaching: boolean;
|
|
246
|
+
cacheDiscountFactor: number;
|
|
247
|
+
supportsReasoning: boolean;
|
|
248
|
+
supportsInterleavedThinking: boolean;
|
|
249
|
+
supportsReasoningEffort: boolean;
|
|
250
|
+
reasoningEffort: "xhigh" | "high" | "medium" | "low" | "none";
|
|
251
|
+
supportsVision: boolean;
|
|
252
|
+
supportsNativePdf: boolean;
|
|
253
|
+
supportsNativeAudio: boolean;
|
|
254
|
+
supportsAssistantPrefill: boolean;
|
|
255
|
+
supportsPredictiveOutput: boolean;
|
|
256
|
+
supportsTokenCounting: boolean;
|
|
257
|
+
supportsSystemPrompt: boolean;
|
|
258
|
+
supportsIntermDevMsgs: boolean;
|
|
259
|
+
}, {
|
|
260
|
+
supportsFunctionCalling: boolean;
|
|
261
|
+
supportsNativeMCPServer: boolean;
|
|
262
|
+
supportsNativeWebSearch: boolean;
|
|
263
|
+
supportsNativeCodeExecution: boolean;
|
|
264
|
+
supportsPromptCaching: boolean;
|
|
265
|
+
supportsAutoPromptCaching: boolean;
|
|
266
|
+
cacheDiscountFactor: number;
|
|
267
|
+
supportsReasoning: boolean;
|
|
268
|
+
supportsInterleavedThinking: boolean;
|
|
269
|
+
supportsReasoningEffort: boolean;
|
|
270
|
+
reasoningEffort: "xhigh" | "high" | "medium" | "low" | "none";
|
|
271
|
+
supportsVision: boolean;
|
|
272
|
+
supportsNativePdf: boolean;
|
|
273
|
+
supportsNativeAudio: boolean;
|
|
274
|
+
supportsAssistantPrefill: boolean;
|
|
275
|
+
supportsPredictiveOutput: boolean;
|
|
276
|
+
supportsTokenCounting: boolean;
|
|
277
|
+
supportsSystemPrompt: boolean;
|
|
278
|
+
supportsIntermDevMsgs: boolean;
|
|
279
|
+
}>;
|
|
280
|
+
openRouterOnly: z.ZodBoolean;
|
|
281
|
+
openrouterFullName: z.ZodOptional<z.ZodString>;
|
|
282
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
|
283
|
+
requiresResponsesAPI: z.ZodOptional<z.ZodBoolean>;
|
|
284
|
+
}, "strip", z.ZodTypeAny, {
|
|
285
|
+
name: string;
|
|
286
|
+
fullName: string;
|
|
287
|
+
provider: "anthropic" | "openai" | "google" | "deepseek" | "xai" | "moonshot" | "dashscope" | "copilot" | "others";
|
|
288
|
+
maxOutputTokens: number;
|
|
289
|
+
inputPrice: number;
|
|
290
|
+
outputPrice: number;
|
|
291
|
+
contextWindow: number;
|
|
292
|
+
capabilities: {
|
|
293
|
+
supportsFunctionCalling: boolean;
|
|
294
|
+
supportsNativeMCPServer: boolean;
|
|
295
|
+
supportsNativeWebSearch: boolean;
|
|
296
|
+
supportsNativeCodeExecution: boolean;
|
|
297
|
+
supportsPromptCaching: boolean;
|
|
298
|
+
supportsAutoPromptCaching: boolean;
|
|
299
|
+
cacheDiscountFactor: number;
|
|
300
|
+
supportsReasoning: boolean;
|
|
301
|
+
supportsInterleavedThinking: boolean;
|
|
302
|
+
supportsReasoningEffort: boolean;
|
|
303
|
+
reasoningEffort: "xhigh" | "high" | "medium" | "low" | "none";
|
|
304
|
+
supportsVision: boolean;
|
|
305
|
+
supportsNativePdf: boolean;
|
|
306
|
+
supportsNativeAudio: boolean;
|
|
307
|
+
supportsAssistantPrefill: boolean;
|
|
308
|
+
supportsPredictiveOutput: boolean;
|
|
309
|
+
supportsTokenCounting: boolean;
|
|
310
|
+
supportsSystemPrompt: boolean;
|
|
311
|
+
supportsIntermDevMsgs: boolean;
|
|
312
|
+
};
|
|
313
|
+
openRouterOnly: boolean;
|
|
314
|
+
openrouterFullName?: string | undefined;
|
|
315
|
+
baseUrl?: string | undefined;
|
|
316
|
+
requiresResponsesAPI?: boolean | undefined;
|
|
317
|
+
}, {
|
|
318
|
+
name: string;
|
|
319
|
+
fullName: string;
|
|
320
|
+
provider: "anthropic" | "openai" | "google" | "deepseek" | "xai" | "moonshot" | "dashscope" | "copilot" | "others";
|
|
321
|
+
maxOutputTokens: number;
|
|
322
|
+
inputPrice: number;
|
|
323
|
+
outputPrice: number;
|
|
324
|
+
contextWindow: number;
|
|
325
|
+
capabilities: {
|
|
326
|
+
supportsFunctionCalling: boolean;
|
|
327
|
+
supportsNativeMCPServer: boolean;
|
|
328
|
+
supportsNativeWebSearch: boolean;
|
|
329
|
+
supportsNativeCodeExecution: boolean;
|
|
330
|
+
supportsPromptCaching: boolean;
|
|
331
|
+
supportsAutoPromptCaching: boolean;
|
|
332
|
+
cacheDiscountFactor: number;
|
|
333
|
+
supportsReasoning: boolean;
|
|
334
|
+
supportsInterleavedThinking: boolean;
|
|
335
|
+
supportsReasoningEffort: boolean;
|
|
336
|
+
reasoningEffort: "xhigh" | "high" | "medium" | "low" | "none";
|
|
337
|
+
supportsVision: boolean;
|
|
338
|
+
supportsNativePdf: boolean;
|
|
339
|
+
supportsNativeAudio: boolean;
|
|
340
|
+
supportsAssistantPrefill: boolean;
|
|
341
|
+
supportsPredictiveOutput: boolean;
|
|
342
|
+
supportsTokenCounting: boolean;
|
|
343
|
+
supportsSystemPrompt: boolean;
|
|
344
|
+
supportsIntermDevMsgs: boolean;
|
|
345
|
+
};
|
|
346
|
+
openRouterOnly: boolean;
|
|
347
|
+
openrouterFullName?: string | undefined;
|
|
348
|
+
baseUrl?: string | undefined;
|
|
349
|
+
requiresResponsesAPI?: boolean | undefined;
|
|
350
|
+
}>>;
|
|
351
|
+
type ModelCapabilitiesZ = z.infer<typeof ModelCapabilitiesSchema>;
|
|
352
|
+
type ModelConfigZ = z.infer<typeof ModelConfigSchema>;
|
|
353
|
+
type ModelRegistryZ = z.infer<typeof ModelRegistrySchema>;
|
|
354
|
+
|
|
355
|
+
export { ModelCapabilitiesSchema, type ModelCapabilitiesZ, ModelConfigSchema, type ModelConfigZ, ModelProviderSchema, ModelRegistrySchema, type ModelRegistryZ, ReasoningEffortSchema };
|
package/dist/schemas.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
// src/schemas.ts
|
|
4
|
+
var ReasoningEffortSchema = z.enum(["xhigh", "high", "medium", "low", "none"]);
|
|
5
|
+
var ModelProviderSchema = z.enum([
|
|
6
|
+
"anthropic",
|
|
7
|
+
"openai",
|
|
8
|
+
"google",
|
|
9
|
+
"deepseek",
|
|
10
|
+
"xai",
|
|
11
|
+
"moonshot",
|
|
12
|
+
"dashscope",
|
|
13
|
+
"copilot",
|
|
14
|
+
"others"
|
|
15
|
+
]);
|
|
16
|
+
var ModelCapabilitiesSchema = z.object({
|
|
17
|
+
supportsFunctionCalling: z.boolean(),
|
|
18
|
+
supportsNativeMCPServer: z.boolean(),
|
|
19
|
+
supportsNativeWebSearch: z.boolean(),
|
|
20
|
+
supportsNativeCodeExecution: z.boolean(),
|
|
21
|
+
supportsPromptCaching: z.boolean(),
|
|
22
|
+
supportsAutoPromptCaching: z.boolean(),
|
|
23
|
+
cacheDiscountFactor: z.number().min(0).max(1),
|
|
24
|
+
supportsReasoning: z.boolean(),
|
|
25
|
+
supportsInterleavedThinking: z.boolean(),
|
|
26
|
+
supportsReasoningEffort: z.boolean(),
|
|
27
|
+
reasoningEffort: ReasoningEffortSchema,
|
|
28
|
+
supportsVision: z.boolean(),
|
|
29
|
+
supportsNativePdf: z.boolean(),
|
|
30
|
+
supportsNativeAudio: z.boolean(),
|
|
31
|
+
supportsAssistantPrefill: z.boolean(),
|
|
32
|
+
supportsPredictiveOutput: z.boolean(),
|
|
33
|
+
supportsTokenCounting: z.boolean(),
|
|
34
|
+
supportsSystemPrompt: z.boolean(),
|
|
35
|
+
supportsIntermDevMsgs: z.boolean()
|
|
36
|
+
});
|
|
37
|
+
var ModelConfigSchema = z.object({
|
|
38
|
+
name: z.string(),
|
|
39
|
+
fullName: z.string(),
|
|
40
|
+
provider: ModelProviderSchema,
|
|
41
|
+
maxOutputTokens: z.number().positive(),
|
|
42
|
+
inputPrice: z.number().min(0),
|
|
43
|
+
outputPrice: z.number().min(0),
|
|
44
|
+
contextWindow: z.number().positive(),
|
|
45
|
+
capabilities: ModelCapabilitiesSchema,
|
|
46
|
+
openRouterOnly: z.boolean(),
|
|
47
|
+
openrouterFullName: z.string().optional(),
|
|
48
|
+
baseUrl: z.string().url().optional(),
|
|
49
|
+
requiresResponsesAPI: z.boolean().optional()
|
|
50
|
+
});
|
|
51
|
+
var ModelRegistrySchema = z.record(z.string(), ModelConfigSchema);
|
|
52
|
+
|
|
53
|
+
export { ModelCapabilitiesSchema, ModelConfigSchema, ModelProviderSchema, ModelRegistrySchema, ReasoningEffortSchema };
|
|
54
|
+
//# sourceMappingURL=schemas.js.map
|
|
55
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas.ts"],"names":[],"mappings":";;;AAWO,IAAM,qBAAA,GAAwB,EAAE,IAAA,CAAK,CAAC,SAAS,MAAA,EAAQ,QAAA,EAAU,KAAA,EAAO,MAAM,CAAC;AAE/E,IAAM,mBAAA,GAAsB,EAAE,IAAA,CAAK;AAAA,EACxC,WAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA,UAAA;AAAA,EACA,WAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAC;AAMM,IAAM,uBAAA,GAA0B,EAAE,MAAA,CAAO;AAAA,EAC9C,uBAAA,EAAyB,EAAE,OAAA,EAAQ;AAAA,EACnC,uBAAA,EAAyB,EAAE,OAAA,EAAQ;AAAA,EACnC,uBAAA,EAAyB,EAAE,OAAA,EAAQ;AAAA,EACnC,2BAAA,EAA6B,EAAE,OAAA,EAAQ;AAAA,EACvC,qBAAA,EAAuB,EAAE,OAAA,EAAQ;AAAA,EACjC,yBAAA,EAA2B,EAAE,OAAA,EAAQ;AAAA,EACrC,mBAAA,EAAqB,EAAE,MAAA,EAAO,CAAE,IAAI,CAAC,CAAA,CAAE,IAAI,CAAC,CAAA;AAAA,EAC5C,iBAAA,EAAmB,EAAE,OAAA,EAAQ;AAAA,EAC7B,2BAAA,EAA6B,EAAE,OAAA,EAAQ;AAAA,EACvC,uBAAA,EAAyB,EAAE,OAAA,EAAQ;AAAA,EACnC,eAAA,EAAiB,qBAAA;AAAA,EACjB,cAAA,EAAgB,EAAE,OAAA,EAAQ;AAAA,EAC1B,iBAAA,EAAmB,EAAE,OAAA,EAAQ;AAAA,EAC7B,mBAAA,EAAqB,EAAE,OAAA,EAAQ;AAAA,EAC/B,wBAAA,EAA0B,EAAE,OAAA,EAAQ;AAAA,EACpC,wBAAA,EAA0B,EAAE,OAAA,EAAQ;AAAA,EACpC,qBAAA,EAAuB,EAAE,OAAA,EAAQ;AAAA,EACjC,oBAAA,EAAsB,EAAE,OAAA,EAAQ;AAAA,EAChC,qBAAA,EAAuB,EAAE,OAAA;AAC3B,CAAC;AAMM,IAAM,iBAAA,GAAoB,EAAE,MAAA,CAAO;AAAA,EACxC,IAAA,EAAM,EAAE,MAAA,EAAO;AAAA,EACf,QAAA,EAAU,EAAE,MAAA,EAAO;AAAA,EACnB,QAAA,EAAU,mBAAA;AAAA,EACV,eAAA,EAAiB,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EACrC,UAAA,EAAY,CAAA,CAAE,MAAA,EAAO,CAAE,IAAI,CAAC,CAAA;AAAA,EAC5B,WAAA,EAAa,CAAA,CAAE,MAAA,EAAO,CAAE,IAAI,CAAC,CAAA;AAAA,EAC7B,aAAA,EAAe,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EACnC,YAAA,EAAc,uBAAA;AAAA,EACd,cAAA,EAAgB,EAAE,OAAA,EAAQ;AAAA,EAC1B,kBAAA,EAAoB,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA,EAAS;AAAA,EACxC,SAAS,CAAA,CAAE,MAAA,EAAO,CAAE,GAAA,GAAM,QAAA,EAAS;AAAA,EACnC,oBAAA,EAAsB,CAAA,CAAE,OAAA,EAAQ,CAAE,QAAA;AACpC,CAAC;AAMM,IAAM,sBAAsB,CAAA,CAAE,MAAA,CAAO,CAAA,CAAE,MAAA,IAAU,iBAAiB","file":"schemas.js","sourcesContent":["/**\n * Zod schemas for runtime validation of model configurations.\n * @packageDocumentation\n */\n\nimport { z } from 'zod';\n\n// ============================================================================\n// Enums\n// ============================================================================\n\nexport const ReasoningEffortSchema = z.enum(['xhigh', 'high', 'medium', 'low', 'none']);\n\nexport const ModelProviderSchema = z.enum([\n 'anthropic',\n 'openai',\n 'google',\n 'deepseek',\n 'xai',\n 'moonshot',\n 'dashscope',\n 'copilot',\n 'others',\n]);\n\n// ============================================================================\n// Capabilities\n// ============================================================================\n\nexport const ModelCapabilitiesSchema = z.object({\n supportsFunctionCalling: z.boolean(),\n supportsNativeMCPServer: z.boolean(),\n supportsNativeWebSearch: z.boolean(),\n supportsNativeCodeExecution: z.boolean(),\n supportsPromptCaching: z.boolean(),\n supportsAutoPromptCaching: z.boolean(),\n cacheDiscountFactor: z.number().min(0).max(1),\n supportsReasoning: z.boolean(),\n supportsInterleavedThinking: z.boolean(),\n supportsReasoningEffort: z.boolean(),\n reasoningEffort: ReasoningEffortSchema,\n supportsVision: z.boolean(),\n supportsNativePdf: z.boolean(),\n supportsNativeAudio: z.boolean(),\n supportsAssistantPrefill: z.boolean(),\n supportsPredictiveOutput: z.boolean(),\n supportsTokenCounting: z.boolean(),\n supportsSystemPrompt: z.boolean(),\n supportsIntermDevMsgs: z.boolean(),\n});\n\n// ============================================================================\n// Model Config\n// ============================================================================\n\nexport const ModelConfigSchema = z.object({\n name: z.string(),\n fullName: z.string(),\n provider: ModelProviderSchema,\n maxOutputTokens: z.number().positive(),\n inputPrice: z.number().min(0),\n outputPrice: z.number().min(0),\n contextWindow: z.number().positive(),\n capabilities: ModelCapabilitiesSchema,\n openRouterOnly: z.boolean(),\n openrouterFullName: z.string().optional(),\n baseUrl: z.string().url().optional(),\n requiresResponsesAPI: z.boolean().optional(),\n});\n\n// ============================================================================\n// Registry\n// ============================================================================\n\nexport const ModelRegistrySchema = z.record(z.string(), ModelConfigSchema);\n\n// ============================================================================\n// Inferred Types (for reference)\n// ============================================================================\n\nexport type ModelCapabilitiesZ = z.infer<typeof ModelCapabilitiesSchema>;\nexport type ModelConfigZ = z.infer<typeof ModelConfigSchema>;\nexport type ModelRegistryZ = z.infer<typeof ModelRegistrySchema>;\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "llm-zoo",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "70+ LLM models. Pricing, capabilities, context windows. Always current.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"llm",
|
|
7
|
+
"gpt",
|
|
8
|
+
"claude",
|
|
9
|
+
"gemini",
|
|
10
|
+
"openai",
|
|
11
|
+
"anthropic",
|
|
12
|
+
"google",
|
|
13
|
+
"deepseek",
|
|
14
|
+
"grok",
|
|
15
|
+
"qwen",
|
|
16
|
+
"ai",
|
|
17
|
+
"chatgpt",
|
|
18
|
+
"gpt-4",
|
|
19
|
+
"gpt-5",
|
|
20
|
+
"o1",
|
|
21
|
+
"o3",
|
|
22
|
+
"sonnet",
|
|
23
|
+
"opus",
|
|
24
|
+
"language-model",
|
|
25
|
+
"model-registry",
|
|
26
|
+
"pricing",
|
|
27
|
+
"token-cost",
|
|
28
|
+
"api-cost",
|
|
29
|
+
"context-window"
|
|
30
|
+
],
|
|
31
|
+
"author": "LionSR",
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "git+https://github.com/texra-ai/llm-zoo.git"
|
|
36
|
+
},
|
|
37
|
+
"homepage": "https://github.com/texra-ai/llm-zoo",
|
|
38
|
+
"bugs": {
|
|
39
|
+
"url": "https://github.com/texra-ai/llm-zoo/issues"
|
|
40
|
+
},
|
|
41
|
+
"type": "module",
|
|
42
|
+
"main": "./dist/index.js",
|
|
43
|
+
"module": "./dist/index.js",
|
|
44
|
+
"types": "./dist/index.d.ts",
|
|
45
|
+
"exports": {
|
|
46
|
+
".": {
|
|
47
|
+
"types": "./dist/index.d.ts",
|
|
48
|
+
"import": "./dist/index.js",
|
|
49
|
+
"require": "./dist/index.cjs"
|
|
50
|
+
},
|
|
51
|
+
"./providers": {
|
|
52
|
+
"types": "./dist/providers/index.d.ts",
|
|
53
|
+
"import": "./dist/providers/index.js",
|
|
54
|
+
"require": "./dist/providers/index.cjs"
|
|
55
|
+
},
|
|
56
|
+
"./schemas": {
|
|
57
|
+
"types": "./dist/schemas.d.ts",
|
|
58
|
+
"import": "./dist/schemas.js",
|
|
59
|
+
"require": "./dist/schemas.cjs"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"files": [
|
|
63
|
+
"dist",
|
|
64
|
+
"README.md",
|
|
65
|
+
"LICENSE"
|
|
66
|
+
],
|
|
67
|
+
"scripts": {
|
|
68
|
+
"build": "tsup",
|
|
69
|
+
"dev": "tsup --watch",
|
|
70
|
+
"typecheck": "tsc --noEmit",
|
|
71
|
+
"clean": "rm -rf dist",
|
|
72
|
+
"prepublishOnly": "npm run build"
|
|
73
|
+
},
|
|
74
|
+
"peerDependencies": {
|
|
75
|
+
"zod": "^3.22.0"
|
|
76
|
+
},
|
|
77
|
+
"peerDependenciesMeta": {
|
|
78
|
+
"zod": {
|
|
79
|
+
"optional": true
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"devDependencies": {
|
|
83
|
+
"tsup": "^8.0.0",
|
|
84
|
+
"typescript": "^5.3.0",
|
|
85
|
+
"zod": "^3.22.0"
|
|
86
|
+
},
|
|
87
|
+
"engines": {
|
|
88
|
+
"node": ">=18.0.0"
|
|
89
|
+
},
|
|
90
|
+
"sideEffects": false
|
|
91
|
+
}
|