@x12i/ai-profiles 1.7.2 → 2.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/README.md +41 -5
- package/dist/buildResolvedProfile.d.ts.map +1 -1
- package/dist/buildResolvedProfile.js +2 -0
- package/dist/buildResolvedProfile.js.map +1 -1
- package/dist/constants.d.ts +2 -3
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -7
- package/dist/constants.js.map +1 -1
- package/dist/data/models-catalog.json +3 -3
- package/dist/data/models-profiles.json +514 -133
- package/dist/data/models-profiles.schema.json +58 -4
- package/dist/data/models-registry.json +71 -41
- package/dist/data/profiles-shortcuts.json +48 -42
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +10 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/listAIProfiles.d.ts.map +1 -1
- package/dist/listAIProfiles.js +34 -4
- package/dist/listAIProfiles.js.map +1 -1
- package/dist/logger.d.ts +2 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +7 -0
- package/dist/logger.js.map +1 -0
- package/dist/modelInputFallback.d.ts +20 -0
- package/dist/modelInputFallback.d.ts.map +1 -0
- package/dist/modelInputFallback.js +265 -0
- package/dist/modelInputFallback.js.map +1 -0
- package/dist/profileCatalogLane.d.ts +22 -0
- package/dist/profileCatalogLane.d.ts.map +1 -0
- package/dist/profileCatalogLane.js +83 -0
- package/dist/profileCatalogLane.js.map +1 -0
- package/dist/profileDiscovery.d.ts +43 -0
- package/dist/profileDiscovery.d.ts.map +1 -0
- package/dist/profileDiscovery.js +129 -0
- package/dist/profileDiscovery.js.map +1 -0
- package/dist/profileModelFallback.d.ts +13 -0
- package/dist/profileModelFallback.d.ts.map +1 -0
- package/dist/profileModelFallback.js +180 -0
- package/dist/profileModelFallback.js.map +1 -0
- package/dist/profileRegistryV3.d.ts.map +1 -1
- package/dist/profileRegistryV3.js +6 -4
- package/dist/profileRegistryV3.js.map +1 -1
- package/dist/resolveAIProfile.d.ts +1 -1
- package/dist/resolveAIProfile.d.ts.map +1 -1
- package/dist/resolveAIProfile.js +66 -1
- package/dist/resolveAIProfile.js.map +1 -1
- package/dist/resolveAIProfileByTags.d.ts +11 -0
- package/dist/resolveAIProfileByTags.d.ts.map +1 -0
- package/dist/resolveAIProfileByTags.js +33 -0
- package/dist/resolveAIProfileByTags.js.map +1 -0
- package/dist/resolveModelIdentity.d.ts.map +1 -1
- package/dist/resolveModelIdentity.js +16 -0
- package/dist/resolveModelIdentity.js.map +1 -1
- package/dist/types.d.ts +35 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/validateProfileCatalogLinkage.d.ts.map +1 -1
- package/dist/validateProfileCatalogLinkage.js +1 -0
- package/dist/validateProfileCatalogLinkage.js.map +1 -1
- package/dist/validation/profileIntentPolicy.d.ts +8 -0
- package/dist/validation/profileIntentPolicy.d.ts.map +1 -0
- package/dist/validation/profileIntentPolicy.js +60 -0
- package/dist/validation/profileIntentPolicy.js.map +1 -0
- package/dist/validation/validateModelsProfilesJson.d.ts +1 -0
- package/dist/validation/validateModelsProfilesJson.d.ts.map +1 -1
- package/dist/validation/validateModelsProfilesJson.js +65 -15
- package/dist/validation/validateModelsProfilesJson.js.map +1 -1
- package/package.json +3 -5
|
@@ -19,10 +19,7 @@
|
|
|
19
19
|
],
|
|
20
20
|
"properties": {
|
|
21
21
|
"schema": {
|
|
22
|
-
"
|
|
23
|
-
"x12i.ai-profiles.model-registry.v3",
|
|
24
|
-
"x12i.ai-profiles.model-registry.v2"
|
|
25
|
-
]
|
|
22
|
+
"const": "x12i.ai-profiles.model-registry.v3"
|
|
26
23
|
},
|
|
27
24
|
"registryId": { "type": "string", "minLength": 1 },
|
|
28
25
|
"generatedAt": { "type": "string", "format": "date-time" },
|
|
@@ -64,6 +61,7 @@
|
|
|
64
61
|
"displayName",
|
|
65
62
|
"description",
|
|
66
63
|
"category",
|
|
64
|
+
"catalogLane",
|
|
67
65
|
"defaultChoice",
|
|
68
66
|
"choices"
|
|
69
67
|
],
|
|
@@ -72,6 +70,18 @@
|
|
|
72
70
|
"displayName": { "type": "string" },
|
|
73
71
|
"description": { "type": "string" },
|
|
74
72
|
"category": { "type": "string" },
|
|
73
|
+
"catalogLane": {
|
|
74
|
+
"enum": [
|
|
75
|
+
"text",
|
|
76
|
+
"image",
|
|
77
|
+
"embeddings",
|
|
78
|
+
"audio",
|
|
79
|
+
"video",
|
|
80
|
+
"rerank",
|
|
81
|
+
"speech",
|
|
82
|
+
"transcription"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
75
85
|
"defaultChoice": { "type": "string" },
|
|
76
86
|
"requiredCapabilities": { "$ref": "#/$defs/requiredCapabilities" },
|
|
77
87
|
"deploymentType": {
|
|
@@ -79,6 +89,50 @@
|
|
|
79
89
|
},
|
|
80
90
|
"fallbackChoiceOrder": { "type": "array", "items": { "type": "string" } },
|
|
81
91
|
"aliases": { "type": "array", "items": { "type": "string" } },
|
|
92
|
+
"tags": {
|
|
93
|
+
"type": "array",
|
|
94
|
+
"items": {
|
|
95
|
+
"enum": [
|
|
96
|
+
"flg",
|
|
97
|
+
"eco",
|
|
98
|
+
"pro",
|
|
99
|
+
"exp",
|
|
100
|
+
"agt",
|
|
101
|
+
"sec",
|
|
102
|
+
"cyb",
|
|
103
|
+
"rsn",
|
|
104
|
+
"anl",
|
|
105
|
+
"for",
|
|
106
|
+
"aud",
|
|
107
|
+
"str",
|
|
108
|
+
"json",
|
|
109
|
+
"xtr",
|
|
110
|
+
"cls",
|
|
111
|
+
"cod",
|
|
112
|
+
"eng",
|
|
113
|
+
"res",
|
|
114
|
+
"cre",
|
|
115
|
+
"wrt",
|
|
116
|
+
"sum",
|
|
117
|
+
"vis",
|
|
118
|
+
"rte",
|
|
119
|
+
"tri",
|
|
120
|
+
"wf",
|
|
121
|
+
"bat",
|
|
122
|
+
"rev",
|
|
123
|
+
"spd",
|
|
124
|
+
"loc",
|
|
125
|
+
"vnd",
|
|
126
|
+
"ds",
|
|
127
|
+
"ggl",
|
|
128
|
+
"xai",
|
|
129
|
+
"mmx",
|
|
130
|
+
"ant",
|
|
131
|
+
"oai"
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
"uniqueItems": true
|
|
135
|
+
},
|
|
82
136
|
"choices": {
|
|
83
137
|
"type": "object",
|
|
84
138
|
"additionalProperties": { "$ref": "#/$defs/choice" }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "x12i.ai-profiles.models-registry",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"generatedAt": "2026-
|
|
3
|
+
"version": "3.1.0",
|
|
4
|
+
"generatedAt": "2026-06-01T07:50:27.676Z",
|
|
5
5
|
"inputs": {
|
|
6
6
|
"openRouterCatalog": {
|
|
7
7
|
"schema": "x12i.ai-profiles.models-catalog",
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"modelCount": 23
|
|
11
11
|
},
|
|
12
12
|
"modelsProfiles": {
|
|
13
|
-
"version": "3.
|
|
13
|
+
"version": "3.1.0",
|
|
14
14
|
"generatedAt": "2026-05-29T00:00:00.000Z",
|
|
15
|
-
"choiceCount":
|
|
15
|
+
"choiceCount": 61
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"models": {
|
|
@@ -92,10 +92,6 @@
|
|
|
92
92
|
"profile": "fast",
|
|
93
93
|
"choice": "anthropic_fast"
|
|
94
94
|
},
|
|
95
|
-
{
|
|
96
|
-
"profile": "summarization",
|
|
97
|
-
"choice": "default"
|
|
98
|
-
},
|
|
99
95
|
{
|
|
100
96
|
"profile": "extraction",
|
|
101
97
|
"choice": "anthropic_extraction"
|
|
@@ -103,6 +99,10 @@
|
|
|
103
99
|
{
|
|
104
100
|
"profile": "routing",
|
|
105
101
|
"choice": "safer_routing"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"profile": "sum",
|
|
105
|
+
"choice": "default"
|
|
106
106
|
}
|
|
107
107
|
]
|
|
108
108
|
}
|
|
@@ -135,6 +135,26 @@
|
|
|
135
135
|
{
|
|
136
136
|
"profile": "cheap",
|
|
137
137
|
"choice": "deepseek_cheap"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"profile": "json",
|
|
141
|
+
"choice": "deepseek_json"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"profile": "cyber",
|
|
145
|
+
"choice": "default"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"profile": "coding",
|
|
149
|
+
"choice": "default"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"profile": "vol",
|
|
153
|
+
"choice": "default"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"profile": "vol",
|
|
157
|
+
"choice": "flash"
|
|
138
158
|
}
|
|
139
159
|
]
|
|
140
160
|
}
|
|
@@ -448,7 +468,7 @@
|
|
|
448
468
|
"choice": "log_analysis"
|
|
449
469
|
},
|
|
450
470
|
{
|
|
451
|
-
"profile": "
|
|
471
|
+
"profile": "sum",
|
|
452
472
|
"choice": "mega_context"
|
|
453
473
|
}
|
|
454
474
|
]
|
|
@@ -490,17 +510,13 @@
|
|
|
490
510
|
"profile": "research",
|
|
491
511
|
"choice": "default"
|
|
492
512
|
},
|
|
493
|
-
{
|
|
494
|
-
"profile": "cyber",
|
|
495
|
-
"choice": "default"
|
|
496
|
-
},
|
|
497
513
|
{
|
|
498
514
|
"profile": "content",
|
|
499
515
|
"choice": "default"
|
|
500
516
|
},
|
|
501
517
|
{
|
|
502
518
|
"profile": "coding",
|
|
503
|
-
"choice": "
|
|
519
|
+
"choice": "claude_coding"
|
|
504
520
|
}
|
|
505
521
|
]
|
|
506
522
|
}
|
|
@@ -569,6 +585,22 @@
|
|
|
569
585
|
{
|
|
570
586
|
"profile": "deep",
|
|
571
587
|
"choice": "deepseek_pro"
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
"profile": "cyber",
|
|
591
|
+
"choice": "deep_forensics"
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
"profile": "coding",
|
|
595
|
+
"choice": "deepseek_pro"
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
"profile": "vol",
|
|
599
|
+
"choice": "pro"
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
"profile": "vol",
|
|
603
|
+
"choice": "final"
|
|
572
604
|
}
|
|
573
605
|
]
|
|
574
606
|
}
|
|
@@ -601,6 +633,10 @@
|
|
|
601
633
|
{
|
|
602
634
|
"profile": "deep",
|
|
603
635
|
"choice": "grok_flagship"
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"profile": "cyber",
|
|
639
|
+
"choice": "grok_intel"
|
|
604
640
|
}
|
|
605
641
|
]
|
|
606
642
|
}
|
|
@@ -676,7 +712,7 @@
|
|
|
676
712
|
},
|
|
677
713
|
{
|
|
678
714
|
"profile": "cyber",
|
|
679
|
-
"choice": "
|
|
715
|
+
"choice": "gpt_forensics"
|
|
680
716
|
}
|
|
681
717
|
]
|
|
682
718
|
}
|
|
@@ -770,59 +806,53 @@
|
|
|
770
806
|
]
|
|
771
807
|
}
|
|
772
808
|
},
|
|
773
|
-
"
|
|
774
|
-
"registryKey": "
|
|
775
|
-
"kind": "
|
|
809
|
+
"or:openai:gpt-5.4-mini": {
|
|
810
|
+
"registryKey": "or:openai:gpt-5.4-mini",
|
|
811
|
+
"kind": "openrouter-only",
|
|
776
812
|
"vendor": {
|
|
777
|
-
"provider": "
|
|
778
|
-
"modelId": "
|
|
813
|
+
"provider": "openai",
|
|
814
|
+
"modelId": "gpt-5.4-mini"
|
|
779
815
|
},
|
|
780
816
|
"invocation": {
|
|
781
817
|
"direct": {
|
|
782
|
-
"provider": "
|
|
783
|
-
"modelId": "
|
|
818
|
+
"provider": "openai",
|
|
819
|
+
"modelId": "gpt-5.4-mini"
|
|
784
820
|
},
|
|
785
821
|
"openrouter": {
|
|
786
822
|
"provider": "openrouter",
|
|
787
|
-
"modelId": "
|
|
823
|
+
"modelId": "openai/gpt-5.4-mini"
|
|
788
824
|
}
|
|
789
825
|
},
|
|
790
826
|
"linkage": {
|
|
791
827
|
"status": "matched",
|
|
792
|
-
"openRouterCatalogId": "
|
|
793
|
-
"canonicalSlug": "
|
|
794
|
-
"matchMethod": "providerPrefixed"
|
|
828
|
+
"openRouterCatalogId": "openai/gpt-5.4-mini",
|
|
829
|
+
"canonicalSlug": "openai/gpt-5.4-mini-20260317"
|
|
795
830
|
},
|
|
796
831
|
"usage": {
|
|
797
|
-
"profileChoices": [
|
|
798
|
-
{
|
|
799
|
-
"profile": "coding",
|
|
800
|
-
"choice": "deepseek_coding"
|
|
801
|
-
}
|
|
802
|
-
]
|
|
832
|
+
"profileChoices": []
|
|
803
833
|
}
|
|
804
834
|
},
|
|
805
|
-
"or:
|
|
806
|
-
"registryKey": "or:
|
|
835
|
+
"or:deepseek:deepseek-chat": {
|
|
836
|
+
"registryKey": "or:deepseek:deepseek-chat",
|
|
807
837
|
"kind": "openrouter-only",
|
|
808
838
|
"vendor": {
|
|
809
|
-
"provider": "
|
|
810
|
-
"modelId": "
|
|
839
|
+
"provider": "deepseek",
|
|
840
|
+
"modelId": "deepseek-chat"
|
|
811
841
|
},
|
|
812
842
|
"invocation": {
|
|
813
843
|
"direct": {
|
|
814
|
-
"provider": "
|
|
815
|
-
"modelId": "
|
|
844
|
+
"provider": "deepseek",
|
|
845
|
+
"modelId": "deepseek-chat"
|
|
816
846
|
},
|
|
817
847
|
"openrouter": {
|
|
818
848
|
"provider": "openrouter",
|
|
819
|
-
"modelId": "
|
|
849
|
+
"modelId": "deepseek/deepseek-chat"
|
|
820
850
|
}
|
|
821
851
|
},
|
|
822
852
|
"linkage": {
|
|
823
853
|
"status": "matched",
|
|
824
|
-
"openRouterCatalogId": "
|
|
825
|
-
"canonicalSlug": "
|
|
854
|
+
"openRouterCatalogId": "deepseek/deepseek-chat",
|
|
855
|
+
"canonicalSlug": "deepseek/deepseek-chat-v3"
|
|
826
856
|
},
|
|
827
857
|
"usage": {
|
|
828
858
|
"profileChoices": []
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "x12i.ai-profiles.shortcuts",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"generatedAt": "2026-
|
|
3
|
+
"version": "1.6.0",
|
|
4
|
+
"generatedAt": "2026-06-01T12:00:00.000Z",
|
|
5
5
|
"shortcuts": {
|
|
6
6
|
"economy": {
|
|
7
7
|
"profile": "cheap"
|
|
@@ -141,11 +141,11 @@
|
|
|
141
141
|
"choice": "default"
|
|
142
142
|
},
|
|
143
143
|
"tl-dr": {
|
|
144
|
-
"profile": "
|
|
144
|
+
"profile": "sum",
|
|
145
145
|
"choice": "default"
|
|
146
146
|
},
|
|
147
147
|
"mega-summary": {
|
|
148
|
-
"profile": "
|
|
148
|
+
"profile": "sum",
|
|
149
149
|
"choice": "mega_context"
|
|
150
150
|
},
|
|
151
151
|
"image": {
|
|
@@ -159,22 +159,6 @@
|
|
|
159
159
|
"profile": "cheap",
|
|
160
160
|
"choice": "deepseek_cheap"
|
|
161
161
|
},
|
|
162
|
-
"deepseek-cheap": {
|
|
163
|
-
"profile": "cheap",
|
|
164
|
-
"choice": "deepseek_cheap"
|
|
165
|
-
},
|
|
166
|
-
"grok-fast": {
|
|
167
|
-
"profile": "fast",
|
|
168
|
-
"choice": "grok_fast"
|
|
169
|
-
},
|
|
170
|
-
"deepseek-pro": {
|
|
171
|
-
"profile": "deep",
|
|
172
|
-
"choice": "deepseek_pro"
|
|
173
|
-
},
|
|
174
|
-
"grok-deep": {
|
|
175
|
-
"profile": "deep",
|
|
176
|
-
"choice": "grok_flagship"
|
|
177
|
-
},
|
|
178
162
|
"coding": {
|
|
179
163
|
"profile": "coding"
|
|
180
164
|
},
|
|
@@ -193,45 +177,67 @@
|
|
|
193
177
|
"route": {
|
|
194
178
|
"profile": "routing"
|
|
195
179
|
},
|
|
196
|
-
"
|
|
180
|
+
"cyber-analysis": {
|
|
181
|
+
"profile": "cyber"
|
|
182
|
+
},
|
|
183
|
+
"cyber-default": {
|
|
184
|
+
"profile": "cyber",
|
|
185
|
+
"choice": "default"
|
|
186
|
+
},
|
|
187
|
+
"cyber-forensics": {
|
|
188
|
+
"profile": "cyber",
|
|
189
|
+
"choice": "deep_forensics"
|
|
190
|
+
},
|
|
191
|
+
"final-answer": {
|
|
192
|
+
"profile": "vol",
|
|
193
|
+
"choice": "final"
|
|
194
|
+
},
|
|
195
|
+
"hard-reason": {
|
|
196
|
+
"profile": "deep",
|
|
197
|
+
"choice": "deepseek_pro"
|
|
198
|
+
},
|
|
199
|
+
"volume-agent": {
|
|
200
|
+
"profile": "vol"
|
|
201
|
+
},
|
|
202
|
+
"agent-volume": {
|
|
203
|
+
"profile": "vol",
|
|
204
|
+
"choice": "default"
|
|
205
|
+
},
|
|
206
|
+
"flash-tier": {
|
|
207
|
+
"profile": "vol",
|
|
208
|
+
"choice": "flash"
|
|
209
|
+
},
|
|
210
|
+
"coding-pro": {
|
|
211
|
+
"profile": "coding",
|
|
212
|
+
"choice": "deepseek_pro"
|
|
213
|
+
},
|
|
214
|
+
"intel-cyber": {
|
|
215
|
+
"profile": "cyber",
|
|
216
|
+
"choice": "grok_intel"
|
|
217
|
+
},
|
|
218
|
+
"mm-cheap": {
|
|
197
219
|
"profile": "cheap",
|
|
198
220
|
"choice": "minimax_cheap"
|
|
199
221
|
},
|
|
200
|
-
"
|
|
222
|
+
"mm-fast": {
|
|
201
223
|
"profile": "fast",
|
|
202
224
|
"choice": "minimax_fast"
|
|
203
225
|
},
|
|
204
|
-
"
|
|
226
|
+
"mm-balanced": {
|
|
205
227
|
"profile": "balanced",
|
|
206
228
|
"choice": "minimax_balanced"
|
|
207
229
|
},
|
|
208
|
-
"
|
|
230
|
+
"mm-deep": {
|
|
209
231
|
"profile": "deep",
|
|
210
232
|
"choice": "minimax_deep"
|
|
211
233
|
},
|
|
212
|
-
"
|
|
234
|
+
"mm-agent": {
|
|
213
235
|
"profile": "agentic",
|
|
214
236
|
"choice": "minimax_agentic"
|
|
215
237
|
},
|
|
216
|
-
"
|
|
238
|
+
"mm-coding": {
|
|
217
239
|
"profile": "coding",
|
|
218
240
|
"choice": "minimax_coding"
|
|
219
|
-
},
|
|
220
|
-
"google-fast": {
|
|
221
|
-
"profile": "fast",
|
|
222
|
-
"choice": "google_fast"
|
|
223
|
-
},
|
|
224
|
-
"google-balanced": {
|
|
225
|
-
"profile": "balanced",
|
|
226
|
-
"choice": "google_balanced"
|
|
227
|
-
},
|
|
228
|
-
"google-deep": {
|
|
229
|
-
"profile": "deep",
|
|
230
|
-
"choice": "google_deep"
|
|
231
|
-
},
|
|
232
|
-
"deepseek-coding": {
|
|
233
|
-
"profile": "coding",
|
|
234
|
-
"choice": "deepseek_coding"
|
|
235
241
|
}
|
|
236
242
|
}
|
|
237
243
|
}
|
package/dist/errors.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type AIProfilesErrorCode = "UNKNOWN_PROFILE" | "UNKNOWN_SHORTCUT" | "UNKNOWN_CHOICE" | "NO_ALLOWED_VENDOR" | "NO_MODALITY_MATCH" | "NO_COST_CAP_MATCH" | "REMOTE_FETCH_FAILED" | "REMOTE_JSON_INVALID" | "BUNDLED_JSON_INVALID" | "REGISTRY_SCHEMA_UNSUPPORTED" | "REGISTRY_VALIDATION_FAILED";
|
|
1
|
+
export type AIProfilesErrorCode = "UNKNOWN_PROFILE" | "UNKNOWN_SHORTCUT" | "UNKNOWN_CHOICE" | "NO_ALLOWED_VENDOR" | "NO_MODALITY_MATCH" | "NO_COST_CAP_MATCH" | "NO_OPENROUTER_CATALOG" | "CATALOG_LANE_MISMATCH" | "MISSING_CATALOG_LANE" | "REMOTE_FETCH_FAILED" | "REMOTE_JSON_INVALID" | "BUNDLED_JSON_INVALID" | "REGISTRY_SCHEMA_UNSUPPORTED" | "REGISTRY_VALIDATION_FAILED";
|
|
2
2
|
export declare class AIProfilesError extends Error {
|
|
3
3
|
code: AIProfilesErrorCode;
|
|
4
4
|
details?: Record<string, unknown> | undefined;
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAC3B,iBAAiB,GACjB,kBAAkB,GAClB,gBAAgB,GAChB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,qBAAqB,GACrB,sBAAsB,GACtB,6BAA6B,GAC7B,4BAA4B,CAAC;AAEjC,qBAAa,eAAgB,SAAQ,KAAK;IAE/B,IAAI,EAAE,mBAAmB;IAEzB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;gBAFjC,IAAI,EAAE,mBAAmB,EAChC,OAAO,EAAE,MAAM,EACR,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAAA;CAK3C"}
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAC3B,iBAAiB,GACjB,kBAAkB,GAClB,gBAAgB,GAChB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,uBAAuB,GACvB,uBAAuB,GACvB,sBAAsB,GACtB,qBAAqB,GACrB,qBAAqB,GACrB,sBAAsB,GACtB,6BAA6B,GAC7B,4BAA4B,CAAC;AAEjC,qBAAa,eAAgB,SAAQ,KAAK;IAE/B,IAAI,EAAE,mBAAmB;IAEzB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;gBAFjC,IAAI,EAAE,mBAAmB,EAChC,OAAO,EAAE,MAAM,EACR,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAAA;CAK3C"}
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAgBA,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAE/B;IAEA;IAHT,YACS,IAAyB,EAChC,OAAe,EACR,OAAiC;QAExC,KAAK,CAAC,OAAO,CAAC,CAAC;QAJR,SAAI,GAAJ,IAAI,CAAqB;QAEzB,YAAO,GAAP,OAAO,CAA0B;QAGxC,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
export { listAIProfiles } from "./listAIProfiles.js";
|
|
2
|
+
export { profileMatchesTags, profileMatchesSearch, profileMatchesDiscovery, collectProfileTags, scoreProfileTags, rankProfilesByTags, pickBestProfileByTags, profileTagSetSignature, } from "./profileDiscovery.js";
|
|
3
|
+
export type { ProfileTagScore } from "./profileDiscovery.js";
|
|
4
|
+
export { resolveAIProfileByTags } from "./resolveAIProfileByTags.js";
|
|
5
|
+
export type { ResolveAIProfileByTagsOptions } from "./resolveAIProfileByTags.js";
|
|
6
|
+
export { PROFILE_CATALOG_LANES, profileCatalogLane, profileMatchesCatalogLane, inferCatalogLaneFromEntry, choiceHasOpenRouterCatalog, assertOpenRouterCatalogCoverage, assertProfileCatalogLane, } from "./profileCatalogLane.js";
|
|
2
7
|
export { listAIShortcuts } from "./listAIShortcuts.js";
|
|
3
8
|
export { getAIRegistryStatistics } from "./getAIRegistryStatistics.js";
|
|
4
9
|
export { computeProfilesStatistics, computeCatalogStatistics, computeLinkageStatistics, computeShortcutsStatistics, buildRegistryStatistics, } from "./computeRegistryStatistics.js";
|
|
5
10
|
export { formatRegistryStatistics } from "./formatRegistryStatistics.js";
|
|
6
11
|
export { resolveAIProfile } from "./resolveAIProfile.js";
|
|
12
|
+
export { validateIntentLayerName, validateProfileTagLength, FORBIDDEN_INTENT_VENDOR_TOKENS, } from "./validation/profileIntentPolicy.js";
|
|
13
|
+
export { validateUniqueProfileTagSets } from "./validation/validateModelsProfilesJson.js";
|
|
7
14
|
export { isKnownProfileOrShortcut } from "./isKnownProfileOrShortcut.js";
|
|
8
15
|
export { resolveUseOpenRouter, readUseOpenRouterFromEnv, buildOpenRouterModelId, } from "./resolveModelRouting.js";
|
|
9
16
|
export { buildModelInvocation, buildDirectInvocation, buildRegistryKey, matchOpenRouterCatalog, normalizeAnthropicVersionSlug, openRouterResolutionCandidates, } from "./modelIdentity.js";
|
|
10
17
|
export { resolveModelIdentity } from "./resolveModelIdentity.js";
|
|
11
18
|
export type { ModelVendorRef, ResolveModelIdentityOptions, } from "./resolveModelIdentity.js";
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
19
|
+
export { buildModelInvocationFromChoice, getChoiceVendorModelId, getChoiceOpenRouterModelId, getChoicePricing, flattenChoicePricing, fixVendorModelId, } from "./profileRegistryV2.js";
|
|
20
|
+
export { isModelsProfilesV3, applyVerifiedProfileDefaults, stripProfilesApiMetadata, normalizeProfileChoice, resolveChoicePricing, PREDICTED_VENDOR_MODEL_IDS, } from "./profileRegistryV3.js";
|
|
14
21
|
export { mergeCatalogSupplement } from "./mergeCatalogSupplement.js";
|
|
15
22
|
export { PROFILE_CATALOG_SUPPLEMENT } from "./profileCatalogSupplement.js";
|
|
16
23
|
export { enrichChoiceFromCatalog, findCatalogModelEntry, pricingFromCatalogEntry, limitsFromCatalogEntry, capabilitiesFromCatalogEntry, } from "./catalogEnrichment.js";
|
|
@@ -31,7 +38,7 @@ export { loadModelsCatalog, loadModelsCatalogWithWarnings } from "./loader/loadM
|
|
|
31
38
|
export { loadBundledModelsCatalog } from "./loader/loadBundledModelsCatalog.js";
|
|
32
39
|
export { buildModelsCatalogFromOpenRouterApi, buildLegacyCatalogFromOpenRouterApi, } from "./buildCatalogFromOpenRouterApi.js";
|
|
33
40
|
export { REMOTE_MODELS_CATALOG_URL, OPENROUTER_MODELS_API_URL } from "./constants.js";
|
|
34
|
-
export type { AIProfilesRegistry, AIProfileDefinition, AIProfileChoice, AIProfileShortcut, AIProfileSummary, AIShortcutSummary, ResolvedAIProfile, ListAIProfilesOptions, ResolveAIProfileOptions, AIProvider, AIModelPricing, AIRuntimeDefaults, AIProfileBackend, AIProfileWarning, InstructionTier, RegistrySourceMode, ModelInvocation, ModelInvocationEndpoint, ModelsRegistryJson, ModelRegistryEntry, ModelsCatalogJson, CatalogModelEntry, CatalogDirectSlice, CatalogOpenRouterSlice, OpenRouterModelsCatalogJson, ValidateProfileVendorCoverageResult, ProfileVendorCoverageResult, AIRegistryStatistics, GetAIRegistryStatisticsOptions, ProfileStatisticsFilter, ModelAvailabilityStatus, DeploymentType, ProfileRequiredCapabilities, ModelCapabilitiesSnapshot, ModelModality, ModalityContract, ProfileModalityMismatch, ProfileModalityCoverageResult, ValidateProfileModalityCoverageResult, CostCapPer1M, CostCapOption, } from "./types.js";
|
|
41
|
+
export type { AIProfilesRegistry, AIProfileDefinition, AIProfileChoice, AIProfileShortcut, AIProfileSummary, AIShortcutSummary, ResolvedAIProfile, ListAIProfilesOptions, ResolveAIProfileOptions, AIProvider, AIModelPricing, AIRuntimeDefaults, AIProfileBackend, AIProfileWarning, InstructionTier, RegistrySourceMode, ModelInvocation, ModelInvocationEndpoint, ModelsRegistryJson, ModelRegistryEntry, ModelsCatalogJson, CatalogModelEntry, CatalogDirectSlice, CatalogOpenRouterSlice, OpenRouterModelsCatalogJson, ValidateProfileVendorCoverageResult, ProfileVendorCoverageResult, AIRegistryStatistics, GetAIRegistryStatisticsOptions, ProfileStatisticsFilter, ModelAvailabilityStatus, DeploymentType, ProfileRequiredCapabilities, ModelCapabilitiesSnapshot, ModelModality, ModalityContract, ProfileModalityMismatch, ProfileModalityCoverageResult, ValidateProfileModalityCoverageResult, CostCapPer1M, CostCapOption, AIProfileTag, ProfileTagMatchMode, ProfileCatalogLane, } from "./types.js";
|
|
35
42
|
export type { GetAIRegistryStatisticsResult } from "./getAIRegistryStatistics.js";
|
|
36
43
|
export type { LoadCatalogResult } from "./loader/loadModelsCatalog.js";
|
|
37
44
|
export type { LoadRegistryOptions, LoadRegistryResult, } from "./types.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,6BAA6B,EAC7B,8BAA8B,GAC/B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,YAAY,EACV,cAAc,EACd,2BAA2B,GAC5B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,c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BAA2B,EAC3B,mCAAmC,EACnC,2BAA2B,EAC3B,oBAAoB,EACpB,8BAA8B,EAC9B,uBAAuB,EACvB,uBAAuB,EACvB,cAAc,EACd,2BAA2B,EAC3B,yBAAyB,EACzB,aAAa,EACb,gBAAgB,EAChB,uBAAuB,EACvB,6BAA6B,EAC7B,qCAAqC,EACrC,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAClF,YAAY,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,YAAY,EACV,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,YAAY,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
export { listAIProfiles } from "./listAIProfiles.js";
|
|
2
|
+
export { profileMatchesTags, profileMatchesSearch, profileMatchesDiscovery, collectProfileTags, scoreProfileTags, rankProfilesByTags, pickBestProfileByTags, profileTagSetSignature, } from "./profileDiscovery.js";
|
|
3
|
+
export { resolveAIProfileByTags } from "./resolveAIProfileByTags.js";
|
|
4
|
+
export { PROFILE_CATALOG_LANES, profileCatalogLane, profileMatchesCatalogLane, inferCatalogLaneFromEntry, choiceHasOpenRouterCatalog, assertOpenRouterCatalogCoverage, assertProfileCatalogLane, } from "./profileCatalogLane.js";
|
|
2
5
|
export { listAIShortcuts } from "./listAIShortcuts.js";
|
|
3
6
|
export { getAIRegistryStatistics } from "./getAIRegistryStatistics.js";
|
|
4
7
|
export { computeProfilesStatistics, computeCatalogStatistics, computeLinkageStatistics, computeShortcutsStatistics, buildRegistryStatistics, } from "./computeRegistryStatistics.js";
|
|
5
8
|
export { formatRegistryStatistics } from "./formatRegistryStatistics.js";
|
|
6
9
|
export { resolveAIProfile } from "./resolveAIProfile.js";
|
|
10
|
+
export { validateIntentLayerName, validateProfileTagLength, FORBIDDEN_INTENT_VENDOR_TOKENS, } from "./validation/profileIntentPolicy.js";
|
|
11
|
+
export { validateUniqueProfileTagSets } from "./validation/validateModelsProfilesJson.js";
|
|
7
12
|
export { isKnownProfileOrShortcut } from "./isKnownProfileOrShortcut.js";
|
|
8
13
|
export { resolveUseOpenRouter, readUseOpenRouterFromEnv, buildOpenRouterModelId, } from "./resolveModelRouting.js";
|
|
9
14
|
export { buildModelInvocation, buildDirectInvocation, buildRegistryKey, matchOpenRouterCatalog, normalizeAnthropicVersionSlug, openRouterResolutionCandidates, } from "./modelIdentity.js";
|
|
10
15
|
export { resolveModelIdentity } from "./resolveModelIdentity.js";
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
16
|
+
export { buildModelInvocationFromChoice, getChoiceVendorModelId, getChoiceOpenRouterModelId, getChoicePricing, flattenChoicePricing, fixVendorModelId, } from "./profileRegistryV2.js";
|
|
17
|
+
export { isModelsProfilesV3, applyVerifiedProfileDefaults, stripProfilesApiMetadata, normalizeProfileChoice, resolveChoicePricing, PREDICTED_VENDOR_MODEL_IDS, } from "./profileRegistryV3.js";
|
|
13
18
|
export { mergeCatalogSupplement } from "./mergeCatalogSupplement.js";
|
|
14
19
|
export { PROFILE_CATALOG_SUPPLEMENT } from "./profileCatalogSupplement.js";
|
|
15
20
|
export { enrichChoiceFromCatalog, findCatalogModelEntry, pricingFromCatalogEntry, limitsFromCatalogEntry, capabilitiesFromCatalogEntry, } from "./catalogEnrichment.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,eAA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M,+BAA+B,CAAC;AACjG,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EACL,mCAAmC,EACnC,mCAAmC,GACpC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AA0DtF,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listAIProfiles.d.ts","sourceRoot":"","sources":["../src/listAIProfiles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"listAIProfiles.d.ts","sourceRoot":"","sources":["../src/listAIProfiles.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAE1E;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,gBAAgB,EAAE,CAAC,CA8E7B"}
|
package/dist/listAIProfiles.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { loadAIProfilesRegistryWithWarnings } from "./loader/loadAIProfilesRegistry.js";
|
|
2
|
+
import { profileMatchesCatalogLane } from "./profileCatalogLane.js";
|
|
3
|
+
import { profileMatchesDiscovery, scoreProfileTags, } from "./profileDiscovery.js";
|
|
2
4
|
/**
|
|
3
5
|
* List profile capability contracts (primary keys, aliases, choices, defaults).
|
|
4
6
|
* Use for pickers and discovery; call {@link resolveAIProfile} to get model + runtime details.
|
|
@@ -10,8 +12,8 @@ export async function listAIProfiles(options = {}) {
|
|
|
10
12
|
source: options.source,
|
|
11
13
|
refresh: options.refresh,
|
|
12
14
|
});
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
const requestedTags = options.tags ?? [];
|
|
16
|
+
const filtered = Object.values(registry.profiles).filter((profile) => {
|
|
15
17
|
if (!options.includeDeprecated && profile.status === "deprecated") {
|
|
16
18
|
return false;
|
|
17
19
|
}
|
|
@@ -21,9 +23,35 @@ export async function listAIProfiles(options = {}) {
|
|
|
21
23
|
if (options.category && profile.category !== options.category) {
|
|
22
24
|
return false;
|
|
23
25
|
}
|
|
26
|
+
if (options.catalogLane &&
|
|
27
|
+
!profileMatchesCatalogLane(profile, options.catalogLane)) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
if (!profileMatchesDiscovery(profile, {
|
|
31
|
+
tags: options.tags,
|
|
32
|
+
tagMatch: options.tagMatch,
|
|
33
|
+
search: options.search,
|
|
34
|
+
})) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
24
37
|
return true;
|
|
25
|
-
})
|
|
26
|
-
|
|
38
|
+
});
|
|
39
|
+
if (requestedTags.length > 0) {
|
|
40
|
+
filtered.sort((a, b) => {
|
|
41
|
+
const aScore = scoreProfileTags(a, requestedTags).score;
|
|
42
|
+
const bScore = scoreProfileTags(b, requestedTags).score;
|
|
43
|
+
if (bScore !== aScore) {
|
|
44
|
+
return bScore - aScore;
|
|
45
|
+
}
|
|
46
|
+
const aLen = a.tags?.length ?? 0;
|
|
47
|
+
const bLen = b.tags?.length ?? 0;
|
|
48
|
+
if (aLen !== bLen) {
|
|
49
|
+
return aLen - bLen;
|
|
50
|
+
}
|
|
51
|
+
return a.profile.localeCompare(b.profile);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return filtered.map((profile) => {
|
|
27
55
|
const defaultChoice = profile.choices[profile.defaultChoice];
|
|
28
56
|
return {
|
|
29
57
|
profile: profile.profile,
|
|
@@ -31,6 +59,8 @@ export async function listAIProfiles(options = {}) {
|
|
|
31
59
|
description: profile.description,
|
|
32
60
|
category: profile.category,
|
|
33
61
|
aliases: profile.aliases ?? [],
|
|
62
|
+
tags: profile.tags ?? [],
|
|
63
|
+
catalogLane: profile.catalogLane,
|
|
34
64
|
defaultChoice: profile.defaultChoice,
|
|
35
65
|
choices: Object.keys(profile.choices),
|
|
36
66
|
defaultProvider: defaultChoice.provider,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listAIProfiles.js","sourceRoot":"","sources":["../src/listAIProfiles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"listAIProfiles.js","sourceRoot":"","sources":["../src/listAIProfiles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,oCAAoC,CAAC;AACxF,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EACL,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAG/B;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,UAAiC,EAAE;IAEnC,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,kCAAkC,CAAC;QAC5D,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,OAAO,EAAE,OAAO,CAAC,OAAO;KACzB,CAAC,CAAC;IAEH,MAAM,aAAa,GAAG,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;IAEzC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE;QACnE,IAAI,CAAC,OAAO,CAAC,iBAAiB,IAAI,OAAO,CAAC,MAAM,KAAK,YAAY,EAAE,CAAC;YAClE,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,mBAAmB,IAAI,OAAO,CAAC,MAAM,KAAK,cAAc,EAAE,CAAC;YACtE,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IAAI,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,QAAQ,EAAE,CAAC;YAC9D,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IACE,OAAO,CAAC,W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