@velum-labs/routekit-registry 1.4.0 → 1.5.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.
@@ -19,6 +19,12 @@ export declare const REGISTRY: {
19
19
  auth: string;
20
20
  responseShape: string;
21
21
  };
22
+ module: {
23
+ protocol: string;
24
+ accountClass: string;
25
+ billingMode: string;
26
+ firstLaunch: boolean;
27
+ };
22
28
  };
23
29
  anthropic: {
24
30
  baseUrl: string;
@@ -46,6 +52,12 @@ export declare const REGISTRY: {
46
52
  };
47
53
  responseShape: string;
48
54
  };
55
+ module: {
56
+ protocol: string;
57
+ accountClass: string;
58
+ billingMode: string;
59
+ firstLaunch: boolean;
60
+ };
49
61
  };
50
62
  bedrock: {
51
63
  $comment: string;
@@ -59,6 +71,12 @@ export declare const REGISTRY: {
59
71
  auth: string;
60
72
  responseShape: string;
61
73
  };
74
+ module: {
75
+ protocol: string;
76
+ accountClass: string;
77
+ billingMode: string;
78
+ firstLaunch: boolean;
79
+ };
62
80
  };
63
81
  google: {
64
82
  baseUrl: string;
@@ -78,6 +96,12 @@ export declare const REGISTRY: {
78
96
  auth: string;
79
97
  responseShape: string;
80
98
  };
99
+ module: {
100
+ protocol: string;
101
+ accountClass: string;
102
+ billingMode: string;
103
+ firstLaunch: boolean;
104
+ };
81
105
  };
82
106
  openrouter: {
83
107
  baseUrl: string;
@@ -106,6 +130,12 @@ export declare const REGISTRY: {
106
130
  responseShape: string;
107
131
  pickerDefaultSource: string;
108
132
  };
133
+ module: {
134
+ protocol: string;
135
+ accountClass: string;
136
+ billingMode: string;
137
+ firstLaunch: boolean;
138
+ };
109
139
  };
110
140
  cliproxy: {
111
141
  $comment: string;
@@ -127,6 +157,12 @@ export declare const REGISTRY: {
127
157
  auth: string;
128
158
  responseShape: string;
129
159
  };
160
+ module: {
161
+ protocol: string;
162
+ accountClass: string;
163
+ billingMode: string;
164
+ firstLaunch: boolean;
165
+ };
130
166
  };
131
167
  codex: {
132
168
  baseUrl: string;
@@ -141,15 +177,48 @@ export declare const REGISTRY: {
141
177
  auth: string;
142
178
  responseShape: string;
143
179
  };
180
+ module: {
181
+ protocol: string;
182
+ accountClass: string;
183
+ billingMode: string;
184
+ firstLaunch: boolean;
185
+ };
144
186
  };
145
187
  "ai-gateway": {
146
188
  baseUrl: string;
147
189
  keyEnv: string;
148
190
  baseUrlEnv: string;
191
+ apiCompatibility: string;
192
+ wire: {
193
+ protocol: string;
194
+ basePath: string;
195
+ };
196
+ discovery: {
197
+ path: string;
198
+ auth: string;
199
+ responseShape: string;
200
+ };
201
+ module: {
202
+ protocol: string;
203
+ accountClass: string;
204
+ billingMode: string;
205
+ firstLaunch: boolean;
206
+ };
207
+ keyProbe: {
208
+ path: string;
209
+ auth: string;
210
+ invalidStatuses: number[];
211
+ };
149
212
  };
150
213
  "openai-compatible": {
151
214
  baseUrl: string;
152
215
  apiCompatibility: string;
216
+ module: {
217
+ protocol: string;
218
+ accountClass: string;
219
+ billingMode: string;
220
+ firstLaunch: boolean;
221
+ };
153
222
  };
154
223
  "mlx-lm": {
155
224
  apiCompatibility: string;
@@ -157,6 +226,52 @@ export declare const REGISTRY: {
157
226
  mlx: {};
158
227
  custom: {
159
228
  apiCompatibility: string;
229
+ module: {
230
+ protocol: string;
231
+ accountClass: string;
232
+ billingMode: string;
233
+ firstLaunch: boolean;
234
+ };
235
+ };
236
+ "claude-code": {
237
+ $comment: string;
238
+ apiCompatibility: string;
239
+ module: {
240
+ protocol: string;
241
+ accountClass: string;
242
+ billingMode: string;
243
+ firstLaunch: boolean;
244
+ };
245
+ };
246
+ "openai-azure": {
247
+ $comment: string;
248
+ apiCompatibility: string;
249
+ module: {
250
+ protocol: string;
251
+ accountClass: string;
252
+ billingMode: string;
253
+ firstLaunch: boolean;
254
+ };
255
+ };
256
+ "google-vertex": {
257
+ $comment: string;
258
+ apiCompatibility: string;
259
+ module: {
260
+ protocol: string;
261
+ accountClass: string;
262
+ billingMode: string;
263
+ firstLaunch: boolean;
264
+ };
265
+ };
266
+ "fake-openai": {
267
+ $comment: string;
268
+ apiCompatibility: string;
269
+ module: {
270
+ protocol: string;
271
+ accountClass: string;
272
+ billingMode: string;
273
+ firstLaunch: boolean;
274
+ };
160
275
  };
161
276
  };
162
277
  subscriptions: {
@@ -394,18 +509,22 @@ export declare const REGISTRY: {
394
509
  models: {
395
510
  "claude-haiku": {
396
511
  inputPer1mTokens: number;
512
+ cachedInputPer1mTokens: number;
397
513
  outputPer1mTokens: number;
398
514
  };
399
515
  "claude-opus": {
400
516
  inputPer1mTokens: number;
517
+ cachedInputPer1mTokens: number;
401
518
  outputPer1mTokens: number;
402
519
  };
403
520
  "claude-sonnet": {
404
521
  inputPer1mTokens: number;
522
+ cachedInputPer1mTokens: number;
405
523
  outputPer1mTokens: number;
406
524
  };
407
525
  "claude-sonnet-4-6": {
408
526
  inputPer1mTokens: number;
527
+ cachedInputPer1mTokens: number;
409
528
  outputPer1mTokens: number;
410
529
  };
411
530
  "gemini-2.5-flash": {
@@ -418,22 +537,47 @@ export declare const REGISTRY: {
418
537
  };
419
538
  "gpt-4.1": {
420
539
  inputPer1mTokens: number;
540
+ cachedInputPer1mTokens: number;
421
541
  outputPer1mTokens: number;
422
542
  };
423
543
  "gpt-4o": {
424
544
  inputPer1mTokens: number;
545
+ cachedInputPer1mTokens: number;
425
546
  outputPer1mTokens: number;
426
547
  };
427
548
  "gpt-5": {
428
549
  inputPer1mTokens: number;
550
+ cachedInputPer1mTokens: number;
429
551
  outputPer1mTokens: number;
430
552
  };
431
553
  "gpt-5.5": {
432
554
  inputPer1mTokens: number;
555
+ cachedInputPer1mTokens: number;
556
+ outputPer1mTokens: number;
557
+ };
558
+ "gpt-5.6-luna": {
559
+ inputPer1mTokens: number;
560
+ cachedInputPer1mTokens: number;
561
+ outputPer1mTokens: number;
562
+ };
563
+ "gpt-5.6-sol": {
564
+ inputPer1mTokens: number;
565
+ cachedInputPer1mTokens: number;
566
+ outputPer1mTokens: number;
567
+ };
568
+ "gpt-5.6-terra": {
569
+ inputPer1mTokens: number;
570
+ cachedInputPer1mTokens: number;
571
+ outputPer1mTokens: number;
572
+ };
573
+ "gpt-6-astra": {
574
+ inputPer1mTokens: number;
575
+ cachedInputPer1mTokens: number;
433
576
  outputPer1mTokens: number;
434
577
  };
435
578
  o3: {
436
579
  inputPer1mTokens: number;
580
+ cachedInputPer1mTokens: number;
437
581
  outputPer1mTokens: number;
438
582
  };
439
583
  };
@@ -442,6 +586,7 @@ export declare const REGISTRY: {
442
586
  "claude-haiku-4-5": string;
443
587
  "claude-opus-4-8": string;
444
588
  "claude-sonnet-4-5": string;
589
+ "codex/gpt-6-astra": string;
445
590
  "gpt-4.1-mini": string;
446
591
  "gpt-5.1": string;
447
592
  "gpt-5.1-codex": string;
@@ -449,6 +594,7 @@ export declare const REGISTRY: {
449
594
  "gpt-5.5-2026-05": string;
450
595
  "gpt-5.5-codex": string;
451
596
  "openai/gpt-5.5": string;
597
+ "openai/gpt-6-astra": string;
452
598
  };
453
599
  manualOverrides: {};
454
600
  };
@@ -22,6 +22,12 @@ export const REGISTRY = {
22
22
  "path": "/v1/models",
23
23
  "auth": "bearer",
24
24
  "responseShape": "openai"
25
+ },
26
+ "module": {
27
+ "protocol": "openai",
28
+ "accountClass": "api-key",
29
+ "billingMode": "metered-api",
30
+ "firstLaunch": true
25
31
  }
26
32
  },
27
33
  "anthropic": {
@@ -52,6 +58,12 @@ export const REGISTRY = {
52
58
  "anthropic-version": "2023-06-01"
53
59
  },
54
60
  "responseShape": "anthropic"
61
+ },
62
+ "module": {
63
+ "protocol": "anthropic",
64
+ "accountClass": "api-key",
65
+ "billingMode": "metered-api",
66
+ "firstLaunch": true
55
67
  }
56
68
  },
57
69
  "bedrock": {
@@ -65,6 +77,12 @@ export const REGISTRY = {
65
77
  "path": "ListFoundationModels+ListInferenceProfiles",
66
78
  "auth": "aws-sdk",
67
79
  "responseShape": "bedrock"
80
+ },
81
+ "module": {
82
+ "protocol": "bedrock",
83
+ "accountClass": "api-key",
84
+ "billingMode": "metered-api",
85
+ "firstLaunch": true
68
86
  }
69
87
  },
70
88
  "google": {
@@ -88,6 +106,12 @@ export const REGISTRY = {
88
106
  "path": "/v1beta/models",
89
107
  "auth": "x-goog-api-key",
90
108
  "responseShape": "google"
109
+ },
110
+ "module": {
111
+ "protocol": "google",
112
+ "accountClass": "api-key",
113
+ "billingMode": "metered-api",
114
+ "firstLaunch": false
91
115
  }
92
116
  },
93
117
  "openrouter": {
@@ -119,6 +143,12 @@ export const REGISTRY = {
119
143
  },
120
144
  "responseShape": "openai",
121
145
  "pickerDefaultSource": "curated"
146
+ },
147
+ "module": {
148
+ "protocol": "openai",
149
+ "accountClass": "api-key",
150
+ "billingMode": "metered-api",
151
+ "firstLaunch": true
122
152
  }
123
153
  },
124
154
  "cliproxy": {
@@ -143,6 +173,12 @@ export const REGISTRY = {
143
173
  "path": "/v1/models",
144
174
  "auth": "bearer",
145
175
  "responseShape": "openai"
176
+ },
177
+ "module": {
178
+ "protocol": "openai",
179
+ "accountClass": "proxy",
180
+ "billingMode": "upstream-managed",
181
+ "firstLaunch": false
146
182
  }
147
183
  },
148
184
  "codex": {
@@ -160,23 +196,105 @@ export const REGISTRY = {
160
196
  "path": "/models",
161
197
  "auth": "bearer",
162
198
  "responseShape": "codex"
199
+ },
200
+ "module": {
201
+ "protocol": "codex",
202
+ "accountClass": "subscription",
203
+ "billingMode": "subscription",
204
+ "firstLaunch": true
163
205
  }
164
206
  },
165
207
  "ai-gateway": {
166
208
  "baseUrl": "https://ai-gateway.vercel.sh",
167
209
  "keyEnv": "AI_GATEWAY_API_KEY",
168
- "baseUrlEnv": "AI_GATEWAY_BASE_URL"
210
+ "baseUrlEnv": "AI_GATEWAY_BASE_URL",
211
+ "apiCompatibility": "openai-chat-completions",
212
+ "wire": {
213
+ "protocol": "openai",
214
+ "basePath": "/v1"
215
+ },
216
+ "discovery": {
217
+ "path": "/v1/models",
218
+ "auth": "bearer",
219
+ "responseShape": "openai"
220
+ },
221
+ "module": {
222
+ "protocol": "openai",
223
+ "accountClass": "api-key",
224
+ "billingMode": "metered-api",
225
+ "firstLaunch": false
226
+ },
227
+ "keyProbe": {
228
+ "path": "/v1/credits",
229
+ "auth": "bearer",
230
+ "invalidStatuses": [
231
+ 401,
232
+ 403
233
+ ]
234
+ }
169
235
  },
170
236
  "openai-compatible": {
171
237
  "baseUrl": "http://127.0.0.1",
172
- "apiCompatibility": "openai-chat-completions"
238
+ "apiCompatibility": "openai-chat-completions",
239
+ "module": {
240
+ "protocol": "openai",
241
+ "accountClass": "api-key",
242
+ "billingMode": "metered-api",
243
+ "firstLaunch": false
244
+ }
173
245
  },
174
246
  "mlx-lm": {
175
247
  "apiCompatibility": "mlx-lm-server"
176
248
  },
177
249
  "mlx": {},
178
250
  "custom": {
179
- "apiCompatibility": "custom"
251
+ "apiCompatibility": "custom",
252
+ "module": {
253
+ "protocol": "openai",
254
+ "accountClass": "api-key",
255
+ "billingMode": "metered-api",
256
+ "firstLaunch": false
257
+ }
258
+ },
259
+ "claude-code": {
260
+ "$comment": "Claude Code OAuth subscription module; operational metadata lives in subscriptions.json.",
261
+ "apiCompatibility": "anthropic-messages",
262
+ "module": {
263
+ "protocol": "anthropic",
264
+ "accountClass": "subscription",
265
+ "billingMode": "subscription",
266
+ "firstLaunch": true
267
+ }
268
+ },
269
+ "openai-azure": {
270
+ "$comment": "Azure OpenAI deployment-scoped REST source.",
271
+ "apiCompatibility": "openai-chat-completions",
272
+ "module": {
273
+ "protocol": "openai",
274
+ "accountClass": "api-key",
275
+ "billingMode": "metered-api",
276
+ "firstLaunch": false
277
+ }
278
+ },
279
+ "google-vertex": {
280
+ "$comment": "Vertex AI publisher models authenticated with Application Default Credentials.",
281
+ "apiCompatibility": "google-generate-content",
282
+ "module": {
283
+ "protocol": "google",
284
+ "accountClass": "iam",
285
+ "billingMode": "metered-api",
286
+ "firstLaunch": false
287
+ }
288
+ },
289
+ "fake-openai": {
290
+ "$comment": "Private test fixture proving catalog-backed provider extensibility.",
291
+ "apiCompatibility": "openai-chat-completions",
292
+ "module": {
293
+ "protocol": "openai",
294
+ "accountClass": "api-key",
295
+ "billingMode": "metered-api",
296
+ "firstLaunch": false
297
+ }
180
298
  }
181
299
  },
182
300
  "subscriptions": {
@@ -252,7 +370,7 @@ export const REGISTRY = {
252
370
  "discovery": {
253
371
  "path": "/models",
254
372
  "responseShape": "codex",
255
- "clientVersion": "0.145.0",
373
+ "clientVersion": "0.153.0",
256
374
  "cacheFallback": true,
257
375
  "extraHeaders": {
258
376
  "OpenAI-Beta": "responses=v1",
@@ -508,18 +626,22 @@ export const REGISTRY = {
508
626
  "models": {
509
627
  "claude-haiku": {
510
628
  "inputPer1mTokens": 1,
629
+ "cachedInputPer1mTokens": 0.1,
511
630
  "outputPer1mTokens": 5
512
631
  },
513
632
  "claude-opus": {
514
633
  "inputPer1mTokens": 15,
634
+ "cachedInputPer1mTokens": 1.5,
515
635
  "outputPer1mTokens": 75
516
636
  },
517
637
  "claude-sonnet": {
518
638
  "inputPer1mTokens": 3,
639
+ "cachedInputPer1mTokens": 0.3,
519
640
  "outputPer1mTokens": 15
520
641
  },
521
642
  "claude-sonnet-4-6": {
522
643
  "inputPer1mTokens": 3,
644
+ "cachedInputPer1mTokens": 0.3,
523
645
  "outputPer1mTokens": 15
524
646
  },
525
647
  "gemini-2.5-flash": {
@@ -532,22 +654,47 @@ export const REGISTRY = {
532
654
  },
533
655
  "gpt-4.1": {
534
656
  "inputPer1mTokens": 2,
657
+ "cachedInputPer1mTokens": 0.5,
535
658
  "outputPer1mTokens": 8
536
659
  },
537
660
  "gpt-4o": {
538
661
  "inputPer1mTokens": 2.5,
662
+ "cachedInputPer1mTokens": 1.25,
539
663
  "outputPer1mTokens": 10
540
664
  },
541
665
  "gpt-5": {
542
666
  "inputPer1mTokens": 1.25,
667
+ "cachedInputPer1mTokens": 0.125,
543
668
  "outputPer1mTokens": 10
544
669
  },
545
670
  "gpt-5.5": {
546
671
  "inputPer1mTokens": 1.25,
672
+ "cachedInputPer1mTokens": 0.125,
547
673
  "outputPer1mTokens": 10
548
674
  },
675
+ "gpt-5.6-luna": {
676
+ "inputPer1mTokens": 0.2,
677
+ "cachedInputPer1mTokens": 0.02,
678
+ "outputPer1mTokens": 1.2
679
+ },
680
+ "gpt-5.6-sol": {
681
+ "inputPer1mTokens": 4,
682
+ "cachedInputPer1mTokens": 0.4,
683
+ "outputPer1mTokens": 20
684
+ },
685
+ "gpt-5.6-terra": {
686
+ "inputPer1mTokens": 2,
687
+ "cachedInputPer1mTokens": 0.2,
688
+ "outputPer1mTokens": 12
689
+ },
690
+ "gpt-6-astra": {
691
+ "inputPer1mTokens": 10,
692
+ "cachedInputPer1mTokens": 1,
693
+ "outputPer1mTokens": 50
694
+ },
549
695
  "o3": {
550
696
  "inputPer1mTokens": 2,
697
+ "cachedInputPer1mTokens": 0.5,
551
698
  "outputPer1mTokens": 8
552
699
  }
553
700
  },
@@ -556,13 +703,15 @@ export const REGISTRY = {
556
703
  "claude-haiku-4-5": "claude-haiku",
557
704
  "claude-opus-4-8": "claude-opus",
558
705
  "claude-sonnet-4-5": "claude-sonnet",
706
+ "codex/gpt-6-astra": "gpt-6-astra",
559
707
  "gpt-4.1-mini": "gpt-4.1",
560
708
  "gpt-5.1": "gpt-5",
561
709
  "gpt-5.1-codex": "gpt-5",
562
710
  "gpt-5.3-codex": "gpt-5",
563
711
  "gpt-5.5-2026-05": "gpt-5.5",
564
712
  "gpt-5.5-codex": "gpt-5.5",
565
- "openai/gpt-5.5": "gpt-5.5"
713
+ "openai/gpt-5.5": "gpt-5.5",
714
+ "openai/gpt-6-astra": "gpt-6-astra"
566
715
  },
567
716
  "manualOverrides": {}
568
717
  },
package/dist/index.d.ts CHANGED
@@ -6,11 +6,13 @@
6
6
  * panel presets are deliberately excluded.
7
7
  */
8
8
  import type { ProviderDiscoveryResponseShape } from "@velum-labs/routekit-contracts/provider-discovery";
9
+ import type { Effect } from "effect";
9
10
  import { REGISTRY } from "./generated/data.js";
10
11
  import { DEFAULT_MODEL_PRICING, PRICING_ALIASES } from "./pricing.js";
11
12
  export type { RegistryModelPricing } from "./pricing.js";
12
13
  export type { ProviderDiscoveryResponseShape };
13
14
  export { DEFAULT_MODEL_PRICING, PRICING_ALIASES, REGISTRY };
15
+ export { BUNDLED_PRICING_SNAPSHOT } from "./pricing-snapshot.js";
14
16
  export type ProviderAuthStyle = "bearer" | "x-api-key" | "x-goog-api-key" | "aws-sdk";
15
17
  export type ProviderKeyProbe = {
16
18
  path: string;
@@ -30,7 +32,27 @@ export type ProviderWire = {
30
32
  protocol: ProviderWireProtocol;
31
33
  basePath: string;
32
34
  };
35
+ export type ProviderAccountClass = "api-key" | "iam" | "subscription" | "proxy";
36
+ export type ProviderBillingMode = "metered-api" | "subscription" | "upstream-managed";
37
+ export type ProviderModuleInfo = {
38
+ protocol: ProviderWireProtocol;
39
+ accountClass: ProviderAccountClass;
40
+ billingMode: ProviderBillingMode;
41
+ firstLaunch: boolean;
42
+ };
43
+ /**
44
+ * First-party provider package contract. Runtime-specific context and source
45
+ * types are supplied by provider-core without making the registry depend on it.
46
+ */
47
+ export type ProviderModule<Context = unknown, Source = unknown, Failure = Error, Requirements = never> = {
48
+ readonly id: string;
49
+ readonly protocol: ProviderWireProtocol;
50
+ readonly accountClass: ProviderAccountClass;
51
+ readonly billingMode: ProviderBillingMode;
52
+ createSource(context: Context): Effect.Effect<Source, Failure, Requirements>;
53
+ };
33
54
  export type ProviderInfo = {
55
+ module?: ProviderModuleInfo;
34
56
  baseUrl?: string;
35
57
  keyEnv?: string;
36
58
  authTokenEnv?: string;
@@ -47,6 +69,9 @@ export declare function providerDefaultBaseUrl(provider: string): string | undef
47
69
  export declare function defaultKeyEnv(provider: string): string | undefined;
48
70
  export declare function providerKeyProbe(provider: string): ProviderKeyProbe | undefined;
49
71
  export declare function providerDiscovery(provider: string): ProviderDiscovery | undefined;
72
+ export declare function providerModuleInfo(provider: string): ProviderModuleInfo | undefined;
73
+ export declare function firstLaunchProviderModules(): readonly string[];
74
+ export declare function isSubscriptionModule(provider: string): boolean;
50
75
  export type SubscriptionMode = "claude-code" | "codex";
51
76
  export type SubscriptionTokenRequestFormat = "form" | "json";
52
77
  export type SubscriptionOAuthInfo = {
@@ -150,8 +175,8 @@ export declare function curatedModels(choice: string): readonly string[];
150
175
  export declare function smokeModelForTool(tool: string): string | undefined;
151
176
  export declare function samplingOverridesForModel(model: string): Readonly<Record<string, number>>;
152
177
  export declare function chatTemplateKwargsForModel(model: string): Readonly<Record<string, boolean>> | undefined;
153
- export type { CostActualCall, CostActuals, CostBillingMode, CostEstimate, CostEstimateCall, CostModelPricing, CostServiceShape, CostTokenUsage } from "./services/cost/service.js";
154
- export { attributeModelCosts, CostService, CostServiceLive, estimateModelCosts, formatCostUsd, lookupModelPricing, makeCostService } from "./services/cost/service.js";
178
+ export type { CostActualCall, CostActualHop, CostActuals, CostBillingMode, CostEstimate, CostEstimateCall, CostEpisodeRollup, CostModelPricing, CostPricingEntry, CostServiceOptions, CostServiceShape, CostTokenUsage, SubscriptionDemandForecast, SubscriptionSettlement, SubscriptionSettlementInput, SubscriptionSettlementStore, SubscriptionValuationInput } from "./services/cost/service.js";
179
+ export { attributeModelCosts, CostService, CostServiceLive, estimateModelCosts, formatCostUsd, lookupModelPricing, lookupModelPricingEntry, makeCostService, makeInMemorySubscriptionSettlementStore, priceTokenUsage, routingCacheOutcome, resolvePricingQuote, settleSubscriptionAllocations, subscriptionValuationInputFromAttribution, valueSubscriptionUsage } from "./services/cost/service.js";
155
180
  export type LocalModelRole = "general" | "coder";
156
181
  export type LocalCatalogModel = {
157
182
  repo: string;
package/dist/index.js CHANGED
@@ -8,6 +8,7 @@
8
8
  import { REGISTRY } from "./generated/data.js";
9
9
  import { DEFAULT_MODEL_PRICING, PRICING_ALIASES } from "./pricing.js";
10
10
  export { DEFAULT_MODEL_PRICING, PRICING_ALIASES, REGISTRY };
11
+ export { BUNDLED_PRICING_SNAPSHOT } from "./pricing-snapshot.js";
11
12
  export const PROVIDERS = REGISTRY.providers;
12
13
  export function providerDefaultBaseUrl(provider) {
13
14
  return PROVIDERS[provider]?.baseUrl;
@@ -21,6 +22,15 @@ export function providerKeyProbe(provider) {
21
22
  export function providerDiscovery(provider) {
22
23
  return PROVIDERS[provider]?.discovery;
23
24
  }
25
+ export function providerModuleInfo(provider) {
26
+ return PROVIDERS[provider]?.module;
27
+ }
28
+ export function firstLaunchProviderModules() {
29
+ return Object.entries(PROVIDERS).flatMap(([id, info]) => info.module?.firstLaunch === true ? [id] : []);
30
+ }
31
+ export function isSubscriptionModule(provider) {
32
+ return providerModuleInfo(provider)?.accountClass === "subscription";
33
+ }
24
34
  export const SUBSCRIPTIONS = REGISTRY.subscriptions;
25
35
  export function subscriptionInfo(mode) {
26
36
  return SUBSCRIPTIONS[mode];
@@ -98,7 +108,7 @@ export function chatTemplateKwargsForModel(model) {
98
108
  }
99
109
  return undefined;
100
110
  }
101
- export { attributeModelCosts, CostService, CostServiceLive, estimateModelCosts, formatCostUsd, lookupModelPricing, makeCostService } from "./services/cost/service.js";
111
+ export { attributeModelCosts, CostService, CostServiceLive, estimateModelCosts, formatCostUsd, lookupModelPricing, lookupModelPricingEntry, makeCostService, makeInMemorySubscriptionSettlementStore, priceTokenUsage, routingCacheOutcome, resolvePricingQuote, settleSubscriptionAllocations, subscriptionValuationInputFromAttribution, valueSubscriptionUsage } from "./services/cost/service.js";
102
112
  export const LOCAL_CATALOG_ENTRIES = REGISTRY.localCatalog
103
113
  .entries;
104
114
  export const PREFERRED_LOCAL_MODELS = REGISTRY.localCatalog.preferred;
@@ -0,0 +1,2 @@
1
+ import type { PricingSnapshot } from "@velum-labs/routekit-contracts";
2
+ export declare const BUNDLED_PRICING_SNAPSHOT: PricingSnapshot;
@@ -0,0 +1,44 @@
1
+ import { hashCanonicalSha256 } from "@velum-labs/routekit-contracts";
2
+ import { DEFAULT_MODEL_PRICING, PRICING_ALIASES } from "./pricing.js";
3
+ const BOOTSTRAP_GENERATED_AT = "2026-09-08T00:00:00.000Z";
4
+ function providerAndModel(key) {
5
+ const slash = key.indexOf("/");
6
+ return slash > 0
7
+ ? { provider: key.slice(0, slash), nativeModel: key.slice(slash + 1) }
8
+ : { provider: "*", nativeModel: key };
9
+ }
10
+ const bootstrapQuotes = Object.entries(DEFAULT_MODEL_PRICING).map(([key, pricing]) => ({
11
+ key,
12
+ subject: providerAndModel(key),
13
+ currency: pricing.currency ?? "USD",
14
+ rates: {
15
+ inputPer1mTokens: pricing.inputPer1mTokens,
16
+ ...(pricing.cachedInputPer1mTokens === undefined
17
+ ? {}
18
+ : { cachedInputReadPer1mTokens: pricing.cachedInputPer1mTokens }),
19
+ outputPer1mTokens: pricing.outputPer1mTokens,
20
+ ...(pricing.reasoningPer1mTokens === undefined
21
+ ? {}
22
+ : { reasoningPer1mTokens: pricing.reasoningPer1mTokens })
23
+ },
24
+ evidence: {
25
+ kind: "bundled-bootstrap",
26
+ source: "registry-catalog",
27
+ revision: "spec/registry/pricing.json",
28
+ retrievedAt: BOOTSTRAP_GENERATED_AT
29
+ }
30
+ }));
31
+ const bootstrapAliases = Object.entries(PRICING_ALIASES).map(([alias, canonical]) => ({
32
+ ...providerAndModel(alias),
33
+ canonicalNativeModel: canonical
34
+ }));
35
+ const bootstrapContent = {
36
+ version: 1,
37
+ generatedAt: BOOTSTRAP_GENERATED_AT,
38
+ quotes: bootstrapQuotes,
39
+ aliases: bootstrapAliases
40
+ };
41
+ export const BUNDLED_PRICING_SNAPSHOT = Object.freeze({
42
+ ...bootstrapContent,
43
+ revision: hashCanonicalSha256(bootstrapContent)
44
+ });