@omnicross/contracts 0.1.5 → 0.1.7
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/dist/account-tokens-types.d.cts +72 -55
- package/dist/account-tokens-types.d.ts +72 -55
- package/dist/audit-types.cjs +1 -1
- package/dist/audit-types.d.cts +17 -10
- package/dist/audit-types.d.ts +17 -10
- package/dist/audit-types.js +1 -1
- package/dist/canonical-models.cjs +11 -0
- package/dist/canonical-models.js +11 -0
- package/dist/index.cjs +105 -114
- package/dist/index.d.cts +59 -4
- package/dist/index.d.ts +59 -4
- package/dist/index.js +104 -114
- package/dist/pricing-types.cjs +5 -2
- package/dist/pricing-types.d.cts +16 -1
- package/dist/pricing-types.d.ts +16 -1
- package/dist/pricing-types.js +3 -1
- package/dist/provider-presets/index.cjs +90 -113
- package/dist/provider-presets/index.js +90 -113
- package/dist/subscription-types.d.cts +8 -13
- package/dist/subscription-types.d.ts +8 -13
- package/dist/usage-stats-types.d.cts +16 -1
- package/dist/usage-stats-types.d.ts +16 -1
- package/dist/webhook-types.d.cts +1 -1
- package/dist/webhook-types.d.ts +1 -1
- package/package.json +1 -1
package/dist/pricing-types.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ type PricingSource =
|
|
|
14
14
|
'builtin'
|
|
15
15
|
/** Auto-fetched from the LiteLLM JSON URL. */
|
|
16
16
|
| 'litellm'
|
|
17
|
+
/** Supplemental OpenRouter model catalog price (OpenRouter routes only). */
|
|
18
|
+
| 'openrouter'
|
|
17
19
|
/** Hand-edited by the user; protected from auto-overwrite. */
|
|
18
20
|
| 'user';
|
|
19
21
|
/**
|
|
@@ -64,6 +66,8 @@ interface PricingFetchResult {
|
|
|
64
66
|
fetchedAt: number;
|
|
65
67
|
/** Source URL that was fetched. */
|
|
66
68
|
sourceUrl: string;
|
|
69
|
+
/** Outcome of every configured catalog source; one source may fail without discarding the other. */
|
|
70
|
+
sources: PricingSourceRefreshResult[];
|
|
67
71
|
}
|
|
68
72
|
/** Per-row decision passed back from the host's conflict-resolution UI. */
|
|
69
73
|
interface PricingConflictDecision {
|
|
@@ -80,5 +84,16 @@ interface PricingResolution {
|
|
|
80
84
|
}
|
|
81
85
|
/** Default LiteLLM source URL — public model_prices_and_context_window.json. */
|
|
82
86
|
declare const DEFAULT_LITELLM_PRICING_URL = "https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json";
|
|
87
|
+
/** Supplemental OpenRouter catalog. Prices are USD per token in `data[].pricing`. */
|
|
88
|
+
declare const DEFAULT_OPENROUTER_PRICING_URL = "https://openrouter.ai/api/v1/models";
|
|
89
|
+
/** One source attempt in a multi-source pricing refresh. */
|
|
90
|
+
interface PricingSourceRefreshResult {
|
|
91
|
+
source: 'litellm' | 'openrouter';
|
|
92
|
+
sourceUrl: string;
|
|
93
|
+
status: 'applied' | 'failed';
|
|
94
|
+
parsedCount: number;
|
|
95
|
+
appliedCount: number;
|
|
96
|
+
error?: string;
|
|
97
|
+
}
|
|
83
98
|
|
|
84
|
-
export { DEFAULT_LITELLM_PRICING_URL, type PricingConflict, type PricingConflictDecision, type PricingEntry, type PricingEntryInput, type PricingFetchResult, type PricingResolution, type PricingSource };
|
|
99
|
+
export { DEFAULT_LITELLM_PRICING_URL, DEFAULT_OPENROUTER_PRICING_URL, type PricingConflict, type PricingConflictDecision, type PricingEntry, type PricingEntryInput, type PricingFetchResult, type PricingResolution, type PricingSource, type PricingSourceRefreshResult };
|
package/dist/pricing-types.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// src/pricing-types.ts
|
|
2
2
|
var DEFAULT_LITELLM_PRICING_URL = "https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json";
|
|
3
|
+
var DEFAULT_OPENROUTER_PRICING_URL = "https://openrouter.ai/api/v1/models";
|
|
3
4
|
export {
|
|
4
|
-
DEFAULT_LITELLM_PRICING_URL
|
|
5
|
+
DEFAULT_LITELLM_PRICING_URL,
|
|
6
|
+
DEFAULT_OPENROUTER_PRICING_URL
|
|
5
7
|
};
|
|
@@ -269,8 +269,12 @@ var anthropic_default = {
|
|
|
269
269
|
api_base_url: "https://api.anthropic.com/v1/messages",
|
|
270
270
|
modelsEndpoint: "https://api.anthropic.com/v1/models",
|
|
271
271
|
models: [
|
|
272
|
+
"claude-fable-5",
|
|
273
|
+
"claude-opus-5",
|
|
274
|
+
"claude-opus-4-8",
|
|
272
275
|
"claude-opus-4-7",
|
|
273
276
|
"claude-opus-4-7[1m]",
|
|
277
|
+
"claude-sonnet-5",
|
|
274
278
|
"claude-sonnet-4-6",
|
|
275
279
|
"claude-sonnet-4-6[1m]",
|
|
276
280
|
"claude-opus-4-6",
|
|
@@ -278,6 +282,21 @@ var anthropic_default = {
|
|
|
278
282
|
"claude-haiku-4-5"
|
|
279
283
|
],
|
|
280
284
|
modelConfigs: [
|
|
285
|
+
{
|
|
286
|
+
id: "claude-fable-5",
|
|
287
|
+
name: "Claude Fable 5",
|
|
288
|
+
enabled: true
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
id: "claude-opus-5",
|
|
292
|
+
name: "Claude Opus 5",
|
|
293
|
+
enabled: true
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
id: "claude-opus-4-8",
|
|
297
|
+
name: "Claude Opus 4.8",
|
|
298
|
+
enabled: true
|
|
299
|
+
},
|
|
281
300
|
{
|
|
282
301
|
id: "claude-opus-4-7",
|
|
283
302
|
name: "Claude Opus 4.7",
|
|
@@ -288,6 +307,11 @@ var anthropic_default = {
|
|
|
288
307
|
name: "Claude Opus 4.7 (1M)",
|
|
289
308
|
enabled: false
|
|
290
309
|
},
|
|
310
|
+
{
|
|
311
|
+
id: "claude-sonnet-5",
|
|
312
|
+
name: "Claude Sonnet 5",
|
|
313
|
+
enabled: true
|
|
314
|
+
},
|
|
291
315
|
{
|
|
292
316
|
id: "claude-sonnet-4-6",
|
|
293
317
|
name: "Claude Sonnet 4.6",
|
|
@@ -314,11 +338,6 @@ var anthropic_default = {
|
|
|
314
338
|
enabled: true
|
|
315
339
|
}
|
|
316
340
|
],
|
|
317
|
-
transformer: {
|
|
318
|
-
use: [
|
|
319
|
-
"anthropic"
|
|
320
|
-
]
|
|
321
|
-
},
|
|
322
341
|
description: "Claude\u6A21\u578B\u5B98\u65B9API (Anthropic Messages\u683C\u5F0F)",
|
|
323
342
|
icon: "anthropic",
|
|
324
343
|
website: "https://anthropic.com",
|
|
@@ -575,9 +594,7 @@ var deepseek_default = {
|
|
|
575
594
|
api_base_url: "https://api.deepseek.com/v1/chat/completions",
|
|
576
595
|
models: [
|
|
577
596
|
"deepseek-v4-flash",
|
|
578
|
-
"deepseek-v4-pro"
|
|
579
|
-
"deepseek-chat",
|
|
580
|
-
"deepseek-reasoner"
|
|
597
|
+
"deepseek-v4-pro"
|
|
581
598
|
],
|
|
582
599
|
modelConfigs: [
|
|
583
600
|
{
|
|
@@ -589,23 +606,8 @@ var deepseek_default = {
|
|
|
589
606
|
id: "deepseek-v4-pro",
|
|
590
607
|
name: "DeepSeek V4 Pro",
|
|
591
608
|
enabled: true
|
|
592
|
-
},
|
|
593
|
-
{
|
|
594
|
-
id: "deepseek-chat",
|
|
595
|
-
name: "DeepSeek Chat (Legacy)",
|
|
596
|
-
enabled: false
|
|
597
|
-
},
|
|
598
|
-
{
|
|
599
|
-
id: "deepseek-reasoner",
|
|
600
|
-
name: "DeepSeek Reasoner (Legacy)",
|
|
601
|
-
enabled: false
|
|
602
609
|
}
|
|
603
610
|
],
|
|
604
|
-
transformer: {
|
|
605
|
-
use: [
|
|
606
|
-
"deepseek"
|
|
607
|
-
]
|
|
608
|
-
},
|
|
609
611
|
description: "DeepSeek\u5B98\u65B9API",
|
|
610
612
|
icon: "deepseek",
|
|
611
613
|
website: "https://deepseek.com",
|
|
@@ -630,10 +632,16 @@ var gemini_default = {
|
|
|
630
632
|
api_base_url: "https://generativelanguage.googleapis.com/v1beta/models/",
|
|
631
633
|
modelsEndpoint: "https://generativelanguage.googleapis.com/v1beta/models",
|
|
632
634
|
models: [
|
|
635
|
+
"gemini-3.5-flash",
|
|
633
636
|
"gemini-3-flash",
|
|
634
637
|
"gemini-3.1-pro"
|
|
635
638
|
],
|
|
636
639
|
modelConfigs: [
|
|
640
|
+
{
|
|
641
|
+
id: "gemini-3.5-flash",
|
|
642
|
+
name: "Gemini 3.5 Flash",
|
|
643
|
+
enabled: true
|
|
644
|
+
},
|
|
637
645
|
{
|
|
638
646
|
id: "gemini-3-flash",
|
|
639
647
|
name: "Gemini 3 Flash",
|
|
@@ -684,10 +692,16 @@ var gemini_vertex_default = {
|
|
|
684
692
|
apiType: "google",
|
|
685
693
|
api_base_url: "https://us-central1-aiplatform.googleapis.com/v1/projects/YOUR_PROJECT_ID/locations/us-central1/publishers/google",
|
|
686
694
|
models: [
|
|
695
|
+
"gemini-3.5-flash",
|
|
687
696
|
"gemini-3-flash",
|
|
688
697
|
"gemini-3.1-pro"
|
|
689
698
|
],
|
|
690
699
|
modelConfigs: [
|
|
700
|
+
{
|
|
701
|
+
id: "gemini-3.5-flash",
|
|
702
|
+
name: "Gemini 3.5 Flash",
|
|
703
|
+
enabled: true
|
|
704
|
+
},
|
|
691
705
|
{
|
|
692
706
|
id: "gemini-3-flash",
|
|
693
707
|
name: "Gemini 3 Flash",
|
|
@@ -738,30 +752,18 @@ var grok_default = {
|
|
|
738
752
|
apiType: "openai",
|
|
739
753
|
api_base_url: "https://api.x.ai/v1/chat/completions",
|
|
740
754
|
models: [
|
|
741
|
-
"grok-4.
|
|
742
|
-
"grok-4.
|
|
743
|
-
"grok-4.20-reasoning",
|
|
744
|
-
"grok-4.20-multi-agent"
|
|
755
|
+
"grok-4.5",
|
|
756
|
+
"grok-4.3"
|
|
745
757
|
],
|
|
746
758
|
modelConfigs: [
|
|
747
759
|
{
|
|
748
|
-
id: "grok-4.
|
|
749
|
-
name: "Grok 4.
|
|
750
|
-
enabled: true
|
|
751
|
-
},
|
|
752
|
-
{
|
|
753
|
-
id: "grok-4.20",
|
|
754
|
-
name: "Grok 4.20",
|
|
760
|
+
id: "grok-4.5",
|
|
761
|
+
name: "Grok 4.5",
|
|
755
762
|
enabled: true
|
|
756
763
|
},
|
|
757
764
|
{
|
|
758
|
-
id: "grok-4.
|
|
759
|
-
name: "Grok 4.
|
|
760
|
-
enabled: true
|
|
761
|
-
},
|
|
762
|
-
{
|
|
763
|
-
id: "grok-4.20-multi-agent",
|
|
764
|
-
name: "Grok 4.20 Multi-Agent",
|
|
765
|
+
id: "grok-4.3",
|
|
766
|
+
name: "Grok 4.3",
|
|
765
767
|
enabled: true
|
|
766
768
|
}
|
|
767
769
|
],
|
|
@@ -847,11 +849,16 @@ var kimi_default = {
|
|
|
847
849
|
api_base_url: "https://api.moonshot.ai/v1",
|
|
848
850
|
codingPlanBaseUrl: "https://api.kimi.com/coding/v1",
|
|
849
851
|
models: [
|
|
852
|
+
"kimi-k3",
|
|
850
853
|
"kimi-k2.6",
|
|
851
|
-
"kimi-k2.5"
|
|
852
|
-
"kimi-k2-thinking"
|
|
854
|
+
"kimi-k2.5"
|
|
853
855
|
],
|
|
854
856
|
modelConfigs: [
|
|
857
|
+
{
|
|
858
|
+
id: "kimi-k3",
|
|
859
|
+
name: "Kimi K3",
|
|
860
|
+
enabled: true
|
|
861
|
+
},
|
|
855
862
|
{
|
|
856
863
|
id: "kimi-k2.6",
|
|
857
864
|
name: "Kimi K2.6",
|
|
@@ -861,11 +868,6 @@ var kimi_default = {
|
|
|
861
868
|
id: "kimi-k2.5",
|
|
862
869
|
name: "Kimi K2.5",
|
|
863
870
|
enabled: true
|
|
864
|
-
},
|
|
865
|
-
{
|
|
866
|
-
id: "kimi-k2-thinking",
|
|
867
|
-
name: "Kimi K2 Thinking",
|
|
868
|
-
enabled: false
|
|
869
871
|
}
|
|
870
872
|
],
|
|
871
873
|
description: "Moonshot AI - Kimi\u5927\u6A21\u578B",
|
|
@@ -1110,42 +1112,30 @@ var openai_default = {
|
|
|
1110
1112
|
apiType: "openai",
|
|
1111
1113
|
api_base_url: "https://api.openai.com/v1/chat/completions",
|
|
1112
1114
|
models: [
|
|
1113
|
-
"gpt-5.
|
|
1114
|
-
"gpt-5.
|
|
1115
|
-
"gpt-5.
|
|
1116
|
-
"gpt-5.
|
|
1117
|
-
"gpt-4o",
|
|
1118
|
-
"gpt-4o-mini"
|
|
1115
|
+
"gpt-5.6-sol",
|
|
1116
|
+
"gpt-5.6-terra",
|
|
1117
|
+
"gpt-5.6-luna",
|
|
1118
|
+
"gpt-5.5"
|
|
1119
1119
|
],
|
|
1120
1120
|
modelConfigs: [
|
|
1121
1121
|
{
|
|
1122
|
-
id: "gpt-5.
|
|
1123
|
-
name: "GPT-5.
|
|
1124
|
-
enabled: true
|
|
1125
|
-
},
|
|
1126
|
-
{
|
|
1127
|
-
id: "gpt-5.4",
|
|
1128
|
-
name: "GPT-5.4",
|
|
1122
|
+
id: "gpt-5.6-sol",
|
|
1123
|
+
name: "GPT-5.6 Sol",
|
|
1129
1124
|
enabled: true
|
|
1130
1125
|
},
|
|
1131
1126
|
{
|
|
1132
|
-
id: "gpt-5.
|
|
1133
|
-
name: "GPT-5.
|
|
1127
|
+
id: "gpt-5.6-terra",
|
|
1128
|
+
name: "GPT-5.6 Terra",
|
|
1134
1129
|
enabled: true
|
|
1135
1130
|
},
|
|
1136
1131
|
{
|
|
1137
|
-
id: "gpt-5.
|
|
1138
|
-
name: "GPT-5.
|
|
1132
|
+
id: "gpt-5.6-luna",
|
|
1133
|
+
name: "GPT-5.6 Luna",
|
|
1139
1134
|
enabled: true
|
|
1140
1135
|
},
|
|
1141
1136
|
{
|
|
1142
|
-
id: "gpt-
|
|
1143
|
-
name: "GPT-
|
|
1144
|
-
enabled: true
|
|
1145
|
-
},
|
|
1146
|
-
{
|
|
1147
|
-
id: "gpt-4o-mini",
|
|
1148
|
-
name: "GPT-4o Mini",
|
|
1137
|
+
id: "gpt-5.5",
|
|
1138
|
+
name: "GPT-5.5",
|
|
1149
1139
|
enabled: true
|
|
1150
1140
|
}
|
|
1151
1141
|
],
|
|
@@ -1180,62 +1170,33 @@ var openai_response_default = {
|
|
|
1180
1170
|
apiFormat: "openai-response",
|
|
1181
1171
|
api_base_url: "https://api.openai.com",
|
|
1182
1172
|
models: [
|
|
1183
|
-
"gpt-5.
|
|
1184
|
-
"gpt-5.
|
|
1185
|
-
"gpt-5.
|
|
1186
|
-
"gpt-5.
|
|
1187
|
-
"gpt-5.2",
|
|
1188
|
-
"o3",
|
|
1189
|
-
"o4-mini",
|
|
1190
|
-
"gpt-4.1"
|
|
1173
|
+
"gpt-5.6-sol",
|
|
1174
|
+
"gpt-5.6-terra",
|
|
1175
|
+
"gpt-5.6-luna",
|
|
1176
|
+
"gpt-5.5"
|
|
1191
1177
|
],
|
|
1192
1178
|
modelConfigs: [
|
|
1193
1179
|
{
|
|
1194
|
-
id: "gpt-5.
|
|
1195
|
-
name: "GPT-5.
|
|
1196
|
-
enabled: true
|
|
1197
|
-
},
|
|
1198
|
-
{
|
|
1199
|
-
id: "gpt-5.4",
|
|
1200
|
-
name: "GPT-5.4",
|
|
1201
|
-
enabled: true
|
|
1202
|
-
},
|
|
1203
|
-
{
|
|
1204
|
-
id: "gpt-5.4-mini",
|
|
1205
|
-
name: "GPT-5.4 Mini",
|
|
1206
|
-
enabled: true
|
|
1207
|
-
},
|
|
1208
|
-
{
|
|
1209
|
-
id: "gpt-5.3-codex",
|
|
1210
|
-
name: "GPT-5.3 Codex",
|
|
1180
|
+
id: "gpt-5.6-sol",
|
|
1181
|
+
name: "GPT-5.6 Sol",
|
|
1211
1182
|
enabled: true
|
|
1212
1183
|
},
|
|
1213
1184
|
{
|
|
1214
|
-
id: "gpt-5.
|
|
1215
|
-
name: "GPT-5.
|
|
1185
|
+
id: "gpt-5.6-terra",
|
|
1186
|
+
name: "GPT-5.6 Terra",
|
|
1216
1187
|
enabled: true
|
|
1217
1188
|
},
|
|
1218
1189
|
{
|
|
1219
|
-
id: "
|
|
1220
|
-
name: "
|
|
1190
|
+
id: "gpt-5.6-luna",
|
|
1191
|
+
name: "GPT-5.6 Luna",
|
|
1221
1192
|
enabled: true
|
|
1222
1193
|
},
|
|
1223
1194
|
{
|
|
1224
|
-
id: "
|
|
1225
|
-
name: "
|
|
1226
|
-
enabled: true
|
|
1227
|
-
},
|
|
1228
|
-
{
|
|
1229
|
-
id: "gpt-4.1",
|
|
1230
|
-
name: "GPT-4.1",
|
|
1195
|
+
id: "gpt-5.5",
|
|
1196
|
+
name: "GPT-5.5",
|
|
1231
1197
|
enabled: true
|
|
1232
1198
|
}
|
|
1233
1199
|
],
|
|
1234
|
-
transformer: {
|
|
1235
|
-
use: [
|
|
1236
|
-
"openai-response"
|
|
1237
|
-
]
|
|
1238
|
-
},
|
|
1239
1200
|
description: "OpenAI Responses API (/v1/responses endpoint)",
|
|
1240
1201
|
icon: "openai",
|
|
1241
1202
|
website: "https://openai.com",
|
|
@@ -1834,6 +1795,7 @@ var zhipu_default = {
|
|
|
1834
1795
|
codingPlanBaseUrl: "https://api.z.ai/api/coding/paas/v4",
|
|
1835
1796
|
modelsEndpoint: "https://api.z.ai/api/paas/v4/models",
|
|
1836
1797
|
models: [
|
|
1798
|
+
"glm-5.2",
|
|
1837
1799
|
"glm-5",
|
|
1838
1800
|
"glm-5.1",
|
|
1839
1801
|
"glm-4.5-air",
|
|
@@ -1841,6 +1803,11 @@ var zhipu_default = {
|
|
|
1841
1803
|
"glm-4.7"
|
|
1842
1804
|
],
|
|
1843
1805
|
modelConfigs: [
|
|
1806
|
+
{
|
|
1807
|
+
id: "glm-5.2",
|
|
1808
|
+
name: "GLM-5.2",
|
|
1809
|
+
enabled: true
|
|
1810
|
+
},
|
|
1844
1811
|
{
|
|
1845
1812
|
id: "glm-5",
|
|
1846
1813
|
name: "GLM-5",
|
|
@@ -1914,6 +1881,7 @@ var zhipu_bigmodel_default = {
|
|
|
1914
1881
|
codingPlanBaseUrl: "https://open.bigmodel.cn/api/coding/paas/v4",
|
|
1915
1882
|
modelsEndpoint: "https://open.bigmodel.cn/api/paas/v4/models",
|
|
1916
1883
|
models: [
|
|
1884
|
+
"glm-5.2",
|
|
1917
1885
|
"glm-5",
|
|
1918
1886
|
"glm-5.1",
|
|
1919
1887
|
"glm-4.5-air",
|
|
@@ -1921,6 +1889,15 @@ var zhipu_bigmodel_default = {
|
|
|
1921
1889
|
"glm-4.7"
|
|
1922
1890
|
],
|
|
1923
1891
|
modelConfigs: [
|
|
1892
|
+
{
|
|
1893
|
+
id: "glm-5.2",
|
|
1894
|
+
name: "GLM-5.2",
|
|
1895
|
+
enabled: true,
|
|
1896
|
+
category: "chat",
|
|
1897
|
+
contextLength: 1048576,
|
|
1898
|
+
maxTokens: 131072,
|
|
1899
|
+
functionCall: true
|
|
1900
|
+
},
|
|
1924
1901
|
{
|
|
1925
1902
|
id: "glm-5",
|
|
1926
1903
|
name: "GLM-5",
|