@agentmark-ai/model-registry 0.2.0 → 0.2.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.
@@ -0,0 +1,574 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Model Registry Types
5
+ *
6
+ * Defines the public interface for the @agentmark-ai/model-registry package.
7
+ * All consumers (CLI, dashboard, analytics, adapters) import from this contract.
8
+ */
9
+ type ModelMode = "chat" | "embedding" | "image_generation" | "audio_speech" | "audio_transcription" | "moderation" | "rerank";
10
+ interface ModelPricing {
11
+ inputCostPerToken: number;
12
+ outputCostPerToken: number;
13
+ cacheCreationCostPerToken?: number;
14
+ cacheReadCostPerToken?: number;
15
+ }
16
+ interface ModelContext {
17
+ maxInputTokens?: number;
18
+ maxOutputTokens?: number;
19
+ }
20
+ interface ModelCapabilities {
21
+ vision?: boolean;
22
+ functionCalling?: boolean;
23
+ parallelFunctionCalling?: boolean;
24
+ structuredOutput?: boolean;
25
+ promptCaching?: boolean;
26
+ reasoning?: boolean;
27
+ audioInput?: boolean;
28
+ audioOutput?: boolean;
29
+ pdfInput?: boolean;
30
+ webSearch?: boolean;
31
+ }
32
+ interface ModelEntry {
33
+ id: string;
34
+ provider: string;
35
+ displayName: string;
36
+ mode: ModelMode;
37
+ pricing?: ModelPricing;
38
+ context?: ModelContext;
39
+ capabilities?: ModelCapabilities;
40
+ deprecationDate?: string | null;
41
+ source?: string;
42
+ supportedParameters?: string[];
43
+ }
44
+ interface ProviderInfo {
45
+ id: string;
46
+ label: string;
47
+ modelCount: number;
48
+ }
49
+ interface ModelsFile {
50
+ $schema?: string;
51
+ version: string;
52
+ generatedAt: string;
53
+ sources: Record<string, {
54
+ fetchedAt: string;
55
+ modelCount: number;
56
+ }>;
57
+ models: Record<string, Omit<ModelEntry, "id">>;
58
+ }
59
+ interface OverridesFile {
60
+ $schema?: string;
61
+ models: Record<string, Partial<Omit<ModelEntry, "id">>>;
62
+ }
63
+ interface ModelRegistry {
64
+ getProviders(): ProviderInfo[];
65
+ getModelsByProvider(provider: string): ModelEntry[];
66
+ getAllModels(): ModelEntry[];
67
+ getModel(modelId: string): ModelEntry | undefined;
68
+ getPricingForModel(modelId: string): ModelPricing | undefined;
69
+ getCapabilitiesForModel(modelId: string): ModelCapabilities | undefined;
70
+ findModelsByCapability(capability: keyof ModelCapabilities): ModelEntry[];
71
+ findDeprecatedModels(): ModelEntry[];
72
+ getPricingDictionary(): Record<string, {
73
+ promptPrice: number;
74
+ completionPrice: number;
75
+ }>;
76
+ getProviderModels(): Record<string, {
77
+ label: string;
78
+ languageModels: string[];
79
+ imageModels: string[];
80
+ speechModels: string[];
81
+ }>;
82
+ }
83
+ interface SyncResult {
84
+ models: Record<string, Omit<ModelEntry, "id">>;
85
+ sources: ModelsFile["sources"];
86
+ changelog: SyncChangelog;
87
+ }
88
+ interface SyncChangelog {
89
+ added: string[];
90
+ removed: string[];
91
+ pricingChanged: Array<{
92
+ modelId: string;
93
+ field: string;
94
+ oldValue: number;
95
+ newValue: number;
96
+ }>;
97
+ capabilitiesChanged: Array<{
98
+ modelId: string;
99
+ field: string;
100
+ oldValue: boolean | undefined;
101
+ newValue: boolean | undefined;
102
+ }>;
103
+ anomalies: Array<{
104
+ modelId: string;
105
+ type: string;
106
+ description: string;
107
+ }>;
108
+ }
109
+
110
+ declare const modelsFileSchema: z.ZodObject<{
111
+ $schema: z.ZodOptional<z.ZodString>;
112
+ version: z.ZodString;
113
+ generatedAt: z.ZodString;
114
+ sources: z.ZodRecord<z.ZodString, z.ZodObject<{
115
+ fetchedAt: z.ZodString;
116
+ modelCount: z.ZodNumber;
117
+ }, "strip", z.ZodTypeAny, {
118
+ fetchedAt: string;
119
+ modelCount: number;
120
+ }, {
121
+ fetchedAt: string;
122
+ modelCount: number;
123
+ }>>;
124
+ models: z.ZodRecord<z.ZodString, z.ZodObject<{
125
+ provider: z.ZodString;
126
+ displayName: z.ZodString;
127
+ mode: z.ZodEnum<["chat", "embedding", "image_generation", "audio_speech", "audio_transcription", "moderation", "rerank"]>;
128
+ pricing: z.ZodOptional<z.ZodObject<{
129
+ inputCostPerToken: z.ZodNumber;
130
+ outputCostPerToken: z.ZodNumber;
131
+ cacheCreationCostPerToken: z.ZodOptional<z.ZodNumber>;
132
+ cacheReadCostPerToken: z.ZodOptional<z.ZodNumber>;
133
+ }, "strict", z.ZodTypeAny, {
134
+ inputCostPerToken: number;
135
+ outputCostPerToken: number;
136
+ cacheCreationCostPerToken?: number | undefined;
137
+ cacheReadCostPerToken?: number | undefined;
138
+ }, {
139
+ inputCostPerToken: number;
140
+ outputCostPerToken: number;
141
+ cacheCreationCostPerToken?: number | undefined;
142
+ cacheReadCostPerToken?: number | undefined;
143
+ }>>;
144
+ context: z.ZodOptional<z.ZodEffects<z.ZodObject<{
145
+ maxInputTokens: z.ZodOptional<z.ZodNumber>;
146
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
147
+ }, "strict", z.ZodTypeAny, {
148
+ maxInputTokens?: number | undefined;
149
+ maxOutputTokens?: number | undefined;
150
+ }, {
151
+ maxInputTokens?: number | undefined;
152
+ maxOutputTokens?: number | undefined;
153
+ }>, {
154
+ maxInputTokens?: number | undefined;
155
+ maxOutputTokens?: number | undefined;
156
+ }, {
157
+ maxInputTokens?: number | undefined;
158
+ maxOutputTokens?: number | undefined;
159
+ }>>;
160
+ capabilities: z.ZodOptional<z.ZodObject<{
161
+ vision: z.ZodOptional<z.ZodBoolean>;
162
+ functionCalling: z.ZodOptional<z.ZodBoolean>;
163
+ parallelFunctionCalling: z.ZodOptional<z.ZodBoolean>;
164
+ structuredOutput: z.ZodOptional<z.ZodBoolean>;
165
+ promptCaching: z.ZodOptional<z.ZodBoolean>;
166
+ reasoning: z.ZodOptional<z.ZodBoolean>;
167
+ audioInput: z.ZodOptional<z.ZodBoolean>;
168
+ audioOutput: z.ZodOptional<z.ZodBoolean>;
169
+ pdfInput: z.ZodOptional<z.ZodBoolean>;
170
+ webSearch: z.ZodOptional<z.ZodBoolean>;
171
+ }, "strict", z.ZodTypeAny, {
172
+ vision?: boolean | undefined;
173
+ functionCalling?: boolean | undefined;
174
+ parallelFunctionCalling?: boolean | undefined;
175
+ structuredOutput?: boolean | undefined;
176
+ promptCaching?: boolean | undefined;
177
+ reasoning?: boolean | undefined;
178
+ audioInput?: boolean | undefined;
179
+ audioOutput?: boolean | undefined;
180
+ pdfInput?: boolean | undefined;
181
+ webSearch?: boolean | undefined;
182
+ }, {
183
+ vision?: boolean | undefined;
184
+ functionCalling?: boolean | undefined;
185
+ parallelFunctionCalling?: boolean | undefined;
186
+ structuredOutput?: boolean | undefined;
187
+ promptCaching?: boolean | undefined;
188
+ reasoning?: boolean | undefined;
189
+ audioInput?: boolean | undefined;
190
+ audioOutput?: boolean | undefined;
191
+ pdfInput?: boolean | undefined;
192
+ webSearch?: boolean | undefined;
193
+ }>>;
194
+ deprecationDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
195
+ source: z.ZodOptional<z.ZodString>;
196
+ supportedParameters: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
197
+ }, "strip", z.ZodTypeAny, {
198
+ provider: string;
199
+ displayName: string;
200
+ mode: "chat" | "embedding" | "image_generation" | "audio_speech" | "audio_transcription" | "moderation" | "rerank";
201
+ pricing?: {
202
+ inputCostPerToken: number;
203
+ outputCostPerToken: number;
204
+ cacheCreationCostPerToken?: number | undefined;
205
+ cacheReadCostPerToken?: number | undefined;
206
+ } | undefined;
207
+ context?: {
208
+ maxInputTokens?: number | undefined;
209
+ maxOutputTokens?: number | undefined;
210
+ } | undefined;
211
+ capabilities?: {
212
+ vision?: boolean | undefined;
213
+ functionCalling?: boolean | undefined;
214
+ parallelFunctionCalling?: boolean | undefined;
215
+ structuredOutput?: boolean | undefined;
216
+ promptCaching?: boolean | undefined;
217
+ reasoning?: boolean | undefined;
218
+ audioInput?: boolean | undefined;
219
+ audioOutput?: boolean | undefined;
220
+ pdfInput?: boolean | undefined;
221
+ webSearch?: boolean | undefined;
222
+ } | undefined;
223
+ deprecationDate?: string | null | undefined;
224
+ source?: string | undefined;
225
+ supportedParameters?: string[] | undefined;
226
+ }, {
227
+ provider: string;
228
+ displayName: string;
229
+ mode: "chat" | "embedding" | "image_generation" | "audio_speech" | "audio_transcription" | "moderation" | "rerank";
230
+ pricing?: {
231
+ inputCostPerToken: number;
232
+ outputCostPerToken: number;
233
+ cacheCreationCostPerToken?: number | undefined;
234
+ cacheReadCostPerToken?: number | undefined;
235
+ } | undefined;
236
+ context?: {
237
+ maxInputTokens?: number | undefined;
238
+ maxOutputTokens?: number | undefined;
239
+ } | undefined;
240
+ capabilities?: {
241
+ vision?: boolean | undefined;
242
+ functionCalling?: boolean | undefined;
243
+ parallelFunctionCalling?: boolean | undefined;
244
+ structuredOutput?: boolean | undefined;
245
+ promptCaching?: boolean | undefined;
246
+ reasoning?: boolean | undefined;
247
+ audioInput?: boolean | undefined;
248
+ audioOutput?: boolean | undefined;
249
+ pdfInput?: boolean | undefined;
250
+ webSearch?: boolean | undefined;
251
+ } | undefined;
252
+ deprecationDate?: string | null | undefined;
253
+ source?: string | undefined;
254
+ supportedParameters?: string[] | undefined;
255
+ }>>;
256
+ }, "strip", z.ZodTypeAny, {
257
+ version: string;
258
+ generatedAt: string;
259
+ sources: Record<string, {
260
+ fetchedAt: string;
261
+ modelCount: number;
262
+ }>;
263
+ models: Record<string, {
264
+ provider: string;
265
+ displayName: string;
266
+ mode: "chat" | "embedding" | "image_generation" | "audio_speech" | "audio_transcription" | "moderation" | "rerank";
267
+ pricing?: {
268
+ inputCostPerToken: number;
269
+ outputCostPerToken: number;
270
+ cacheCreationCostPerToken?: number | undefined;
271
+ cacheReadCostPerToken?: number | undefined;
272
+ } | undefined;
273
+ context?: {
274
+ maxInputTokens?: number | undefined;
275
+ maxOutputTokens?: number | undefined;
276
+ } | undefined;
277
+ capabilities?: {
278
+ vision?: boolean | undefined;
279
+ functionCalling?: boolean | undefined;
280
+ parallelFunctionCalling?: boolean | undefined;
281
+ structuredOutput?: boolean | undefined;
282
+ promptCaching?: boolean | undefined;
283
+ reasoning?: boolean | undefined;
284
+ audioInput?: boolean | undefined;
285
+ audioOutput?: boolean | undefined;
286
+ pdfInput?: boolean | undefined;
287
+ webSearch?: boolean | undefined;
288
+ } | undefined;
289
+ deprecationDate?: string | null | undefined;
290
+ source?: string | undefined;
291
+ supportedParameters?: string[] | undefined;
292
+ }>;
293
+ $schema?: string | undefined;
294
+ }, {
295
+ version: string;
296
+ generatedAt: string;
297
+ sources: Record<string, {
298
+ fetchedAt: string;
299
+ modelCount: number;
300
+ }>;
301
+ models: Record<string, {
302
+ provider: string;
303
+ displayName: string;
304
+ mode: "chat" | "embedding" | "image_generation" | "audio_speech" | "audio_transcription" | "moderation" | "rerank";
305
+ pricing?: {
306
+ inputCostPerToken: number;
307
+ outputCostPerToken: number;
308
+ cacheCreationCostPerToken?: number | undefined;
309
+ cacheReadCostPerToken?: number | undefined;
310
+ } | undefined;
311
+ context?: {
312
+ maxInputTokens?: number | undefined;
313
+ maxOutputTokens?: number | undefined;
314
+ } | undefined;
315
+ capabilities?: {
316
+ vision?: boolean | undefined;
317
+ functionCalling?: boolean | undefined;
318
+ parallelFunctionCalling?: boolean | undefined;
319
+ structuredOutput?: boolean | undefined;
320
+ promptCaching?: boolean | undefined;
321
+ reasoning?: boolean | undefined;
322
+ audioInput?: boolean | undefined;
323
+ audioOutput?: boolean | undefined;
324
+ pdfInput?: boolean | undefined;
325
+ webSearch?: boolean | undefined;
326
+ } | undefined;
327
+ deprecationDate?: string | null | undefined;
328
+ source?: string | undefined;
329
+ supportedParameters?: string[] | undefined;
330
+ }>;
331
+ $schema?: string | undefined;
332
+ }>;
333
+ declare const overridesFileSchema: z.ZodObject<{
334
+ $schema: z.ZodOptional<z.ZodString>;
335
+ models: z.ZodRecord<z.ZodString, z.ZodObject<{
336
+ provider: z.ZodOptional<z.ZodString>;
337
+ displayName: z.ZodOptional<z.ZodString>;
338
+ mode: z.ZodOptional<z.ZodEnum<["chat", "embedding", "image_generation", "audio_speech", "audio_transcription", "moderation", "rerank"]>>;
339
+ pricing: z.ZodOptional<z.ZodObject<{
340
+ inputCostPerToken: z.ZodNumber;
341
+ outputCostPerToken: z.ZodNumber;
342
+ cacheCreationCostPerToken: z.ZodOptional<z.ZodNumber>;
343
+ cacheReadCostPerToken: z.ZodOptional<z.ZodNumber>;
344
+ }, "strict", z.ZodTypeAny, {
345
+ inputCostPerToken: number;
346
+ outputCostPerToken: number;
347
+ cacheCreationCostPerToken?: number | undefined;
348
+ cacheReadCostPerToken?: number | undefined;
349
+ }, {
350
+ inputCostPerToken: number;
351
+ outputCostPerToken: number;
352
+ cacheCreationCostPerToken?: number | undefined;
353
+ cacheReadCostPerToken?: number | undefined;
354
+ }>>;
355
+ context: z.ZodOptional<z.ZodEffects<z.ZodObject<{
356
+ maxInputTokens: z.ZodOptional<z.ZodNumber>;
357
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
358
+ }, "strict", z.ZodTypeAny, {
359
+ maxInputTokens?: number | undefined;
360
+ maxOutputTokens?: number | undefined;
361
+ }, {
362
+ maxInputTokens?: number | undefined;
363
+ maxOutputTokens?: number | undefined;
364
+ }>, {
365
+ maxInputTokens?: number | undefined;
366
+ maxOutputTokens?: number | undefined;
367
+ }, {
368
+ maxInputTokens?: number | undefined;
369
+ maxOutputTokens?: number | undefined;
370
+ }>>;
371
+ capabilities: z.ZodOptional<z.ZodObject<{
372
+ vision: z.ZodOptional<z.ZodBoolean>;
373
+ functionCalling: z.ZodOptional<z.ZodBoolean>;
374
+ parallelFunctionCalling: z.ZodOptional<z.ZodBoolean>;
375
+ structuredOutput: z.ZodOptional<z.ZodBoolean>;
376
+ promptCaching: z.ZodOptional<z.ZodBoolean>;
377
+ reasoning: z.ZodOptional<z.ZodBoolean>;
378
+ audioInput: z.ZodOptional<z.ZodBoolean>;
379
+ audioOutput: z.ZodOptional<z.ZodBoolean>;
380
+ pdfInput: z.ZodOptional<z.ZodBoolean>;
381
+ webSearch: z.ZodOptional<z.ZodBoolean>;
382
+ }, "strict", z.ZodTypeAny, {
383
+ vision?: boolean | undefined;
384
+ functionCalling?: boolean | undefined;
385
+ parallelFunctionCalling?: boolean | undefined;
386
+ structuredOutput?: boolean | undefined;
387
+ promptCaching?: boolean | undefined;
388
+ reasoning?: boolean | undefined;
389
+ audioInput?: boolean | undefined;
390
+ audioOutput?: boolean | undefined;
391
+ pdfInput?: boolean | undefined;
392
+ webSearch?: boolean | undefined;
393
+ }, {
394
+ vision?: boolean | undefined;
395
+ functionCalling?: boolean | undefined;
396
+ parallelFunctionCalling?: boolean | undefined;
397
+ structuredOutput?: boolean | undefined;
398
+ promptCaching?: boolean | undefined;
399
+ reasoning?: boolean | undefined;
400
+ audioInput?: boolean | undefined;
401
+ audioOutput?: boolean | undefined;
402
+ pdfInput?: boolean | undefined;
403
+ webSearch?: boolean | undefined;
404
+ }>>;
405
+ deprecationDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
406
+ source: z.ZodOptional<z.ZodString>;
407
+ supportedParameters: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
408
+ }, "strip", z.ZodTypeAny, {
409
+ provider?: string | undefined;
410
+ displayName?: string | undefined;
411
+ mode?: "chat" | "embedding" | "image_generation" | "audio_speech" | "audio_transcription" | "moderation" | "rerank" | undefined;
412
+ pricing?: {
413
+ inputCostPerToken: number;
414
+ outputCostPerToken: number;
415
+ cacheCreationCostPerToken?: number | undefined;
416
+ cacheReadCostPerToken?: number | undefined;
417
+ } | undefined;
418
+ context?: {
419
+ maxInputTokens?: number | undefined;
420
+ maxOutputTokens?: number | undefined;
421
+ } | undefined;
422
+ capabilities?: {
423
+ vision?: boolean | undefined;
424
+ functionCalling?: boolean | undefined;
425
+ parallelFunctionCalling?: boolean | undefined;
426
+ structuredOutput?: boolean | undefined;
427
+ promptCaching?: boolean | undefined;
428
+ reasoning?: boolean | undefined;
429
+ audioInput?: boolean | undefined;
430
+ audioOutput?: boolean | undefined;
431
+ pdfInput?: boolean | undefined;
432
+ webSearch?: boolean | undefined;
433
+ } | undefined;
434
+ deprecationDate?: string | null | undefined;
435
+ source?: string | undefined;
436
+ supportedParameters?: string[] | undefined;
437
+ }, {
438
+ provider?: string | undefined;
439
+ displayName?: string | undefined;
440
+ mode?: "chat" | "embedding" | "image_generation" | "audio_speech" | "audio_transcription" | "moderation" | "rerank" | undefined;
441
+ pricing?: {
442
+ inputCostPerToken: number;
443
+ outputCostPerToken: number;
444
+ cacheCreationCostPerToken?: number | undefined;
445
+ cacheReadCostPerToken?: number | undefined;
446
+ } | undefined;
447
+ context?: {
448
+ maxInputTokens?: number | undefined;
449
+ maxOutputTokens?: number | undefined;
450
+ } | undefined;
451
+ capabilities?: {
452
+ vision?: boolean | undefined;
453
+ functionCalling?: boolean | undefined;
454
+ parallelFunctionCalling?: boolean | undefined;
455
+ structuredOutput?: boolean | undefined;
456
+ promptCaching?: boolean | undefined;
457
+ reasoning?: boolean | undefined;
458
+ audioInput?: boolean | undefined;
459
+ audioOutput?: boolean | undefined;
460
+ pdfInput?: boolean | undefined;
461
+ webSearch?: boolean | undefined;
462
+ } | undefined;
463
+ deprecationDate?: string | null | undefined;
464
+ source?: string | undefined;
465
+ supportedParameters?: string[] | undefined;
466
+ }>>;
467
+ }, "strip", z.ZodTypeAny, {
468
+ models: Record<string, {
469
+ provider?: string | undefined;
470
+ displayName?: string | undefined;
471
+ mode?: "chat" | "embedding" | "image_generation" | "audio_speech" | "audio_transcription" | "moderation" | "rerank" | undefined;
472
+ pricing?: {
473
+ inputCostPerToken: number;
474
+ outputCostPerToken: number;
475
+ cacheCreationCostPerToken?: number | undefined;
476
+ cacheReadCostPerToken?: number | undefined;
477
+ } | undefined;
478
+ context?: {
479
+ maxInputTokens?: number | undefined;
480
+ maxOutputTokens?: number | undefined;
481
+ } | undefined;
482
+ capabilities?: {
483
+ vision?: boolean | undefined;
484
+ functionCalling?: boolean | undefined;
485
+ parallelFunctionCalling?: boolean | undefined;
486
+ structuredOutput?: boolean | undefined;
487
+ promptCaching?: boolean | undefined;
488
+ reasoning?: boolean | undefined;
489
+ audioInput?: boolean | undefined;
490
+ audioOutput?: boolean | undefined;
491
+ pdfInput?: boolean | undefined;
492
+ webSearch?: boolean | undefined;
493
+ } | undefined;
494
+ deprecationDate?: string | null | undefined;
495
+ source?: string | undefined;
496
+ supportedParameters?: string[] | undefined;
497
+ }>;
498
+ $schema?: string | undefined;
499
+ }, {
500
+ models: Record<string, {
501
+ provider?: string | undefined;
502
+ displayName?: string | undefined;
503
+ mode?: "chat" | "embedding" | "image_generation" | "audio_speech" | "audio_transcription" | "moderation" | "rerank" | undefined;
504
+ pricing?: {
505
+ inputCostPerToken: number;
506
+ outputCostPerToken: number;
507
+ cacheCreationCostPerToken?: number | undefined;
508
+ cacheReadCostPerToken?: number | undefined;
509
+ } | undefined;
510
+ context?: {
511
+ maxInputTokens?: number | undefined;
512
+ maxOutputTokens?: number | undefined;
513
+ } | undefined;
514
+ capabilities?: {
515
+ vision?: boolean | undefined;
516
+ functionCalling?: boolean | undefined;
517
+ parallelFunctionCalling?: boolean | undefined;
518
+ structuredOutput?: boolean | undefined;
519
+ promptCaching?: boolean | undefined;
520
+ reasoning?: boolean | undefined;
521
+ audioInput?: boolean | undefined;
522
+ audioOutput?: boolean | undefined;
523
+ pdfInput?: boolean | undefined;
524
+ webSearch?: boolean | undefined;
525
+ } | undefined;
526
+ deprecationDate?: string | null | undefined;
527
+ source?: string | undefined;
528
+ supportedParameters?: string[] | undefined;
529
+ }>;
530
+ $schema?: string | undefined;
531
+ }>;
532
+
533
+ declare class ModelRegistryImpl implements ModelRegistry {
534
+ private models;
535
+ private providerLabels;
536
+ constructor(modelsFile: ModelsFile, overridesFile?: OverridesFile, providerLabels?: Record<string, string>);
537
+ getProviders(): ProviderInfo[];
538
+ getModelsByProvider(provider: string): ModelEntry[];
539
+ getAllModels(): ModelEntry[];
540
+ getModel(modelId: string): ModelEntry | undefined;
541
+ getPricingForModel(modelId: string): ModelPricing | undefined;
542
+ getCapabilitiesForModel(modelId: string): ModelCapabilities | undefined;
543
+ findModelsByCapability(capability: keyof ModelCapabilities): ModelEntry[];
544
+ findDeprecatedModels(): ModelEntry[];
545
+ getPricingDictionary(): Record<string, {
546
+ promptPrice: number;
547
+ completionPrice: number;
548
+ }>;
549
+ getProviderModels(): Record<string, {
550
+ label: string;
551
+ languageModels: string[];
552
+ imageModels: string[];
553
+ speechModels: string[];
554
+ }>;
555
+ }
556
+
557
+ /**
558
+ * Factory function that reads models.json + overrides.json from disk,
559
+ * validates via Zod, constructs ModelRegistryImpl, and returns it.
560
+ * Singleton pattern: caches the registry after first load.
561
+ */
562
+ declare function getModelRegistry(): ModelRegistry;
563
+ /**
564
+ * Async factory that fetches fresh model data from the CDN, falling back
565
+ * to the bundled copy on network failure. Use this in runtimes that
566
+ * support async initialization (CLI commands, server cold start).
567
+ */
568
+ declare function getModelRegistryAsync(): Promise<ModelRegistry>;
569
+ /**
570
+ * Reset all caches (useful for testing).
571
+ */
572
+ declare function resetRegistryCache(): void;
573
+
574
+ export { type ModelCapabilities, type ModelContext, type ModelEntry, type ModelMode, type ModelPricing, type ModelRegistry, ModelRegistryImpl, type ModelsFile, type OverridesFile, type ProviderInfo, type SyncChangelog, type SyncResult, getModelRegistry, getModelRegistryAsync, modelsFileSchema, overridesFileSchema, resetRegistryCache };