@makine/cli 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +34 -0
- package/dist/index.d.ts +63 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +380 -0
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +31 -0
- package/dist/main.js.map +1 -0
- package/dist/migrate/command.d.ts +39 -0
- package/dist/migrate/command.d.ts.map +1 -0
- package/dist/migrate/command.js +257 -0
- package/dist/migrate/command.js.map +1 -0
- package/dist/migrate/credentials.d.ts +29 -0
- package/dist/migrate/credentials.d.ts.map +1 -0
- package/dist/migrate/credentials.js +56 -0
- package/dist/migrate/credentials.js.map +1 -0
- package/dist/migrate/litellm.d.ts +13 -0
- package/dist/migrate/litellm.d.ts.map +1 -0
- package/dist/migrate/litellm.js +454 -0
- package/dist/migrate/litellm.js.map +1 -0
- package/dist/migrate/nodes.d.ts +7 -0
- package/dist/migrate/nodes.d.ts.map +1 -0
- package/dist/migrate/nodes.js +17 -0
- package/dist/migrate/nodes.js.map +1 -0
- package/dist/migrate/paths.d.ts +17 -0
- package/dist/migrate/paths.d.ts.map +1 -0
- package/dist/migrate/paths.js +94 -0
- package/dist/migrate/paths.js.map +1 -0
- package/dist/migrate/portkey.d.ts +22 -0
- package/dist/migrate/portkey.d.ts.map +1 -0
- package/dist/migrate/portkey.js +371 -0
- package/dist/migrate/portkey.js.map +1 -0
- package/dist/migrate/render.d.ts +22 -0
- package/dist/migrate/render.d.ts.map +1 -0
- package/dist/migrate/render.js +124 -0
- package/dist/migrate/render.js.map +1 -0
- package/dist/migrate/runtime-rules.d.ts +55 -0
- package/dist/migrate/runtime-rules.d.ts.map +1 -0
- package/dist/migrate/runtime-rules.js +203 -0
- package/dist/migrate/runtime-rules.js.map +1 -0
- package/dist/migrate/translate.d.ts +96 -0
- package/dist/migrate/translate.d.ts.map +1 -0
- package/dist/migrate/translate.js +305 -0
- package/dist/migrate/translate.js.map +1 -0
- package/dist/migrate/types.d.ts +63 -0
- package/dist/migrate/types.d.ts.map +1 -0
- package/dist/migrate/types.js +9 -0
- package/dist/migrate/types.js.map +1 -0
- package/package.json +40 -0
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LiteLLM proxy `config.yaml` → Makine slots.
|
|
3
|
+
*
|
|
4
|
+
* Read from `https://docs.litellm.ai/docs/proxy/configs` on 2026-09-24. Keys this file does not
|
|
5
|
+
* list come out as `unknown_key`: the walk is over the file, not over a list of sections the tool
|
|
6
|
+
* hopes to find.
|
|
7
|
+
*
|
|
8
|
+
* `model_list` entries are independent deployments — unlike Portkey's `targets`, which are one
|
|
9
|
+
* fallback chain — so each is considered on its own and each can claim a different slot.
|
|
10
|
+
*/
|
|
11
|
+
import { isCredentialKey, readCredentialSource } from "./credentials.js";
|
|
12
|
+
import { isPlainObject, MigrateInputError, readString, UNKNOWN_KEY_REASON } from "./nodes.js";
|
|
13
|
+
import { normalizeModelAlias } from "./runtime-rules.js";
|
|
14
|
+
/** Prefixes that name an OpenAI-compatible server the caller runs themselves. */
|
|
15
|
+
const LOCAL_MODEL_PREFIXES = new Set(["ollama", "ollama_chat", "hosted_vllm", "lm_studio"]);
|
|
16
|
+
const SECTION_REASONS = {
|
|
17
|
+
routing_strategy: "Makine has no configurable routing strategy. The Gateway chooses an executor itself, and " +
|
|
18
|
+
"there is no environment variable that selects a strategy, so latency-based, least-busy and " +
|
|
19
|
+
"the rest have no equivalent.",
|
|
20
|
+
num_retries: "Retry counts are not configurable through the environment file. The Gateway's own repair and " +
|
|
21
|
+
"reroute behaviour is fixed.",
|
|
22
|
+
timeout: "Request timeouts are not configurable through the environment file.",
|
|
23
|
+
allowed_fails: "Failure budgets before cooldown have no equivalent setting.",
|
|
24
|
+
allowed_fails_policy: "Failure budgets before cooldown have no equivalent setting.",
|
|
25
|
+
disable_cooldowns: "Provider cooldown has no equivalent setting.",
|
|
26
|
+
cooldown_time: "Provider cooldown has no equivalent setting.",
|
|
27
|
+
retry_after: "Retry-after handling is not configurable through the environment file.",
|
|
28
|
+
routing_strategy_args: "Makine has no configurable routing strategy to parameterise.",
|
|
29
|
+
enable_pre_call_checks: "Makine has no pre-call context-window check to enable or disable.",
|
|
30
|
+
model_group_alias: "Aliasing one model group onto another has no equivalent. Makine resolves the model name an " +
|
|
31
|
+
"application sends directly to one registered slot; there is no second layer of naming.",
|
|
32
|
+
redis_host: "Makine's on-prem deployment has no Redis. Router state that LiteLLM keeps in Redis has no " +
|
|
33
|
+
"equivalent, because there is no configurable router.",
|
|
34
|
+
redis_port: "Makine's on-prem deployment has no Redis.",
|
|
35
|
+
redis_password: "Makine's on-prem deployment has no Redis. The value was not copied.",
|
|
36
|
+
fallbacks: "Fallback chains are not configurable through the environment file. The Gateway decides " +
|
|
37
|
+
"reroute and repair itself, and there is no setting that names an ordered list of models to " +
|
|
38
|
+
"try. This is the single largest gap for a migrating deployment: the chain is lost.",
|
|
39
|
+
context_window_fallbacks: "Fallback chains are not configurable through the environment file.",
|
|
40
|
+
content_policy_fallbacks: "Fallback chains are not configurable through the environment file.",
|
|
41
|
+
drop_params: "Makine's adapters decide for themselves which request parameters a provider supports; there " +
|
|
42
|
+
"is no setting that turns silent dropping on or off.",
|
|
43
|
+
cache: "Makine has no response cache. Nothing is stored and replayed, so there is no setting to " +
|
|
44
|
+
"turn on and no cache to configure.",
|
|
45
|
+
cache_params: "Makine has no response cache to configure.",
|
|
46
|
+
success_callback: "Makine reports through OpenTelemetry (the OTEL_* variables the compose file already sets), " +
|
|
47
|
+
"not through per-provider callback hooks. A Langfuse or Helicone callback has no equivalent.",
|
|
48
|
+
failure_callback: "Makine reports through OpenTelemetry, not through callback hooks.",
|
|
49
|
+
callbacks: "Makine reports through OpenTelemetry, not through callback hooks.",
|
|
50
|
+
set_verbose: "Log verbosity is not configurable through these settings.",
|
|
51
|
+
json_logs: "Log format is not configurable through these settings.",
|
|
52
|
+
request_timeout: "Request timeouts are not configurable through the environment file.",
|
|
53
|
+
turn_off_message_logging: "Makine does not log message bodies, so there is nothing to turn off.",
|
|
54
|
+
redact_user_api_key_info: "Makine redacts credentials unconditionally; there is no switch.",
|
|
55
|
+
telemetry: "Makine has no vendor telemetry switch of this kind.",
|
|
56
|
+
modify_params: "Makine does not rewrite request parameters on a switch.",
|
|
57
|
+
default_internal_user_params: "Makine has no equivalent notion of default user parameters.",
|
|
58
|
+
max_budget: "The nearest Makine setting is MAKINE_GATEWAY_SPEND_LIMIT_USD, and it does not mean the same " +
|
|
59
|
+
"thing: it is one all-time total for the whole workspace across every model, it never resets, " +
|
|
60
|
+
"and it counts only calls Makine has a USD price for " +
|
|
61
|
+
"(packages/runtime/src/gateway-ingress.ts:1079-1104). A budget with a reset window cannot be " +
|
|
62
|
+
"expressed.",
|
|
63
|
+
budget_duration: "Makine's spend limit has no reset window. MAKINE_GATEWAY_SPEND_LIMIT_USD is an all-time " +
|
|
64
|
+
"total, so a daily or monthly budget cannot be expressed.",
|
|
65
|
+
master_key: "LiteLLM authenticates its callers with one proxy master key. Makine issues a per-workspace " +
|
|
66
|
+
"API key through the API instead, so there is no environment variable to put this in. The " +
|
|
67
|
+
"value was not copied.",
|
|
68
|
+
database_url: "Makine's on-prem deployment keeps its own SQLite database, at the path the compose file sets " +
|
|
69
|
+
"(MAKINE_DB_PATH). It does not read a connection string, and the one here was not copied — a " +
|
|
70
|
+
"connection string carrying a password is a secret " +
|
|
71
|
+
"(system-governance/security-compliance/secrets-policy.md:134-135).",
|
|
72
|
+
alerting: "Makine has no alerting destinations configured through these settings.",
|
|
73
|
+
alerting_threshold: "Makine has no alerting destinations configured through these settings.",
|
|
74
|
+
store_model_in_db: "Makine registers executors at boot from the environment; there is no database-backed model " +
|
|
75
|
+
"registry to switch on.",
|
|
76
|
+
disable_spend_logs: "Makine's usage accounting is not configurable through these settings.",
|
|
77
|
+
max_parallel_requests: "The nearest Makine setting is MAKINE_GATEWAY_REQUESTS_PER_MINUTE, which is a rate for the " +
|
|
78
|
+
"whole workspace rather than a concurrency cap.",
|
|
79
|
+
global_max_parallel_requests: "The nearest Makine setting is MAKINE_GATEWAY_REQUESTS_PER_MINUTE, which is a rate for the " +
|
|
80
|
+
"whole workspace rather than a concurrency cap.",
|
|
81
|
+
background_health_checks: "Makine's readiness probe is not configurable through these settings.",
|
|
82
|
+
health_check_interval: "Makine's readiness probe is not configurable through these settings.",
|
|
83
|
+
ui_access_mode: "Makine's console access is governed by workspace API keys, not by this setting.",
|
|
84
|
+
key_management_system: "Makine resolves secrets from the process environment only.",
|
|
85
|
+
custom_auth: "Makine has no pluggable authentication hook.",
|
|
86
|
+
infer_model_from_keys: "Makine registers only the slots its variables name explicitly.",
|
|
87
|
+
database_connection_pool_limit: "Makine's on-prem deployment uses SQLite, with no pool to size.",
|
|
88
|
+
proxy_budget_rescheduler_min_time: "Makine's spend limit has no reset window to schedule.",
|
|
89
|
+
proxy_budget_rescheduler_max_time: "Makine's spend limit has no reset window to schedule.",
|
|
90
|
+
allow_requests_on_db_unavailable: "Makine has no equivalent degraded-database mode.",
|
|
91
|
+
};
|
|
92
|
+
const ROUTER_SETTINGS_KEYS = new Set([
|
|
93
|
+
"routing_strategy",
|
|
94
|
+
"routing_strategy_args",
|
|
95
|
+
"num_retries",
|
|
96
|
+
"timeout",
|
|
97
|
+
"allowed_fails",
|
|
98
|
+
"allowed_fails_policy",
|
|
99
|
+
"cooldown_time",
|
|
100
|
+
"disable_cooldowns",
|
|
101
|
+
"retry_after",
|
|
102
|
+
"enable_pre_call_checks",
|
|
103
|
+
"model_group_alias",
|
|
104
|
+
"redis_host",
|
|
105
|
+
"redis_port",
|
|
106
|
+
"redis_password",
|
|
107
|
+
"fallbacks",
|
|
108
|
+
"context_window_fallbacks",
|
|
109
|
+
"content_policy_fallbacks",
|
|
110
|
+
]);
|
|
111
|
+
const LITELLM_SETTINGS_KEYS = new Set([
|
|
112
|
+
"drop_params",
|
|
113
|
+
"cache",
|
|
114
|
+
"cache_params",
|
|
115
|
+
"fallbacks",
|
|
116
|
+
"context_window_fallbacks",
|
|
117
|
+
"success_callback",
|
|
118
|
+
"failure_callback",
|
|
119
|
+
"callbacks",
|
|
120
|
+
"set_verbose",
|
|
121
|
+
"json_logs",
|
|
122
|
+
"request_timeout",
|
|
123
|
+
"num_retries",
|
|
124
|
+
"max_budget",
|
|
125
|
+
"budget_duration",
|
|
126
|
+
"telemetry",
|
|
127
|
+
"modify_params",
|
|
128
|
+
"default_internal_user_params",
|
|
129
|
+
"turn_off_message_logging",
|
|
130
|
+
"redact_user_api_key_info",
|
|
131
|
+
]);
|
|
132
|
+
const GENERAL_SETTINGS_KEYS = new Set([
|
|
133
|
+
"master_key",
|
|
134
|
+
"database_url",
|
|
135
|
+
"alerting",
|
|
136
|
+
"alerting_threshold",
|
|
137
|
+
"store_model_in_db",
|
|
138
|
+
"disable_spend_logs",
|
|
139
|
+
"allow_requests_on_db_unavailable",
|
|
140
|
+
"custom_auth",
|
|
141
|
+
"max_parallel_requests",
|
|
142
|
+
"global_max_parallel_requests",
|
|
143
|
+
"infer_model_from_keys",
|
|
144
|
+
"background_health_checks",
|
|
145
|
+
"health_check_interval",
|
|
146
|
+
"ui_access_mode",
|
|
147
|
+
"key_management_system",
|
|
148
|
+
"database_connection_pool_limit",
|
|
149
|
+
"proxy_budget_rescheduler_min_time",
|
|
150
|
+
"proxy_budget_rescheduler_max_time",
|
|
151
|
+
]);
|
|
152
|
+
const LITELLM_PARAMS_REASONS = {
|
|
153
|
+
rpm: "A per-deployment request-rate cap. The nearest Makine setting, " +
|
|
154
|
+
"MAKINE_GATEWAY_REQUESTS_PER_MINUTE, is one limit for the whole workspace across every model " +
|
|
155
|
+
"(apps/api/src/index.ts:556-572) — not per deployment — so setting it from this number would " +
|
|
156
|
+
"cap traffic the upstream config never capped.",
|
|
157
|
+
tpm: "A per-deployment token-rate cap. Makine has no token-rate limit at all; its only rate " +
|
|
158
|
+
"setting counts requests for the whole workspace.",
|
|
159
|
+
temperature: "Makine takes temperature from each chat request, not from configuration " +
|
|
160
|
+
"(packages/executors/src/model-adapter.ts:243-250), so a per-model default cannot be set. " +
|
|
161
|
+
"MAKINE_LOCAL_PROVIDER_TEMPERATURE looks like the answer and is not: it configures document " +
|
|
162
|
+
"extraction only (apps/api/src/index.ts:279-294) and would not touch chat.",
|
|
163
|
+
max_tokens: "Makine takes the output-token cap from each chat request, not from configuration. " +
|
|
164
|
+
"MAKINE_LOCAL_PROVIDER_MAX_TOKENS configures document extraction only, not chat.",
|
|
165
|
+
top_p: "Makine takes sampling parameters from each request, not from configuration.",
|
|
166
|
+
timeout: "Per-deployment timeouts are not configurable through the environment file.",
|
|
167
|
+
stream_timeout: "Per-deployment timeouts are not configurable through the environment file.",
|
|
168
|
+
max_retries: "Per-deployment retry counts are not configurable through the environment file.",
|
|
169
|
+
weight: "Load-balancing weights have no equivalent: Makine registers one model per slot.",
|
|
170
|
+
organization: "Makine sends no OpenAI organization header.",
|
|
171
|
+
api_version: "An Azure OpenAI API version. Makine has no Azure chat slot, so there is nothing to version.",
|
|
172
|
+
input_cost_per_token: "Custom per-token pricing cannot be set through the environment file. Makine reports cost as " +
|
|
173
|
+
"unavailable rather than inventing a price.",
|
|
174
|
+
output_cost_per_token: "Custom per-token pricing cannot be set through the environment file. Makine reports cost as " +
|
|
175
|
+
"unavailable rather than inventing a price.",
|
|
176
|
+
mock_response: "Makine has no mock-response mode in a deployed configuration.",
|
|
177
|
+
aws_region_name: "Makine has no AWS Bedrock chat slot.",
|
|
178
|
+
aws_access_key_id: "Makine has no AWS Bedrock chat slot. The value was not copied.",
|
|
179
|
+
aws_secret_access_key: "Makine has no AWS Bedrock chat slot. The value was not copied.",
|
|
180
|
+
vertex_project: "Makine has no Google Vertex chat slot.",
|
|
181
|
+
vertex_location: "Makine has no Google Vertex chat slot.",
|
|
182
|
+
vertex_credentials: "Makine has no Google Vertex chat slot. The value was not copied.",
|
|
183
|
+
};
|
|
184
|
+
export function translateLiteLlm(root, builder) {
|
|
185
|
+
if (!isPlainObject(root)) {
|
|
186
|
+
throw new MigrateInputError("This does not look like a LiteLLM proxy config: the top level is not a mapping.");
|
|
187
|
+
}
|
|
188
|
+
for (const key of Object.keys(root)) {
|
|
189
|
+
const value = root[key];
|
|
190
|
+
const path = [key];
|
|
191
|
+
switch (key) {
|
|
192
|
+
case "model_list":
|
|
193
|
+
translateModelList(value, path, builder);
|
|
194
|
+
break;
|
|
195
|
+
case "router_settings":
|
|
196
|
+
reportSection(value, path, ROUTER_SETTINGS_KEYS, builder);
|
|
197
|
+
break;
|
|
198
|
+
case "litellm_settings":
|
|
199
|
+
reportSection(value, path, LITELLM_SETTINGS_KEYS, builder);
|
|
200
|
+
break;
|
|
201
|
+
case "general_settings":
|
|
202
|
+
reportSection(value, path, GENERAL_SETTINGS_KEYS, builder);
|
|
203
|
+
break;
|
|
204
|
+
case "environment_variables":
|
|
205
|
+
builder.note(path, "not_expressible", "LiteLLM injects these into its own process environment. Makine reads only the " +
|
|
206
|
+
"variables listed above and ignores everything else, so nothing here carries over. " +
|
|
207
|
+
"The values are treated as secrets and none was copied.");
|
|
208
|
+
break;
|
|
209
|
+
default:
|
|
210
|
+
builder.note(path, "unknown_key", UNKNOWN_KEY_REASON);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
function translateModelList(value, path, builder) {
|
|
215
|
+
if (!Array.isArray(value)) {
|
|
216
|
+
builder.note(path, "invalid_value", "`model_list` is expected to be a list of deployments. Nothing was read from it.");
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
if (value.length === 0) {
|
|
220
|
+
builder.note(path, "not_expressible", "`model_list` is empty, so there was nothing to translate.");
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
/** Normalized `model_name` → the deployment index that already holds it. */
|
|
224
|
+
const groups = new Map();
|
|
225
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
226
|
+
translateDeployment(value[index], [...path, index], index, groups, builder);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
function translateDeployment(entry, path, index, groups, builder) {
|
|
230
|
+
const analysed = analyseDeployment(entry, path);
|
|
231
|
+
if (!analysed.ok) {
|
|
232
|
+
builder.note(path, analysed.category, analysed.reason);
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
const { candidate, leftovers, group } = analysed.analysis;
|
|
236
|
+
const holder = groups.get(group);
|
|
237
|
+
if (holder !== undefined) {
|
|
238
|
+
builder.note(path, "not_expressible", `Deployment ${String(holder)} already uses the name "${candidate.alias.value}". In LiteLLM ` +
|
|
239
|
+
`several deployments sharing one model_name are a load-balancing group; Makine registers ` +
|
|
240
|
+
`one model per slot and has no way to spread requests across several. Only the first was ` +
|
|
241
|
+
`translated. Everything this deployment would have served now goes to that one.`);
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
const claim = builder.claimSlot(candidate);
|
|
245
|
+
if (!claim.ok) {
|
|
246
|
+
builder.note(path, claim.category, claim.reason);
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
groups.set(group, index);
|
|
250
|
+
for (const leftover of leftovers) {
|
|
251
|
+
builder.note(leftover.path, leftover.category, leftover.reason);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
function analyseDeployment(entry, path) {
|
|
255
|
+
if (!isPlainObject(entry)) {
|
|
256
|
+
return {
|
|
257
|
+
ok: false,
|
|
258
|
+
category: "invalid_value",
|
|
259
|
+
reason: "A `model_list` entry is expected to be a mapping. Nothing was read from it.",
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
const leftovers = [];
|
|
263
|
+
for (const key of Object.keys(entry)) {
|
|
264
|
+
if (key === "model_name" || key === "litellm_params")
|
|
265
|
+
continue;
|
|
266
|
+
if (key === "model_info") {
|
|
267
|
+
leftovers.push({
|
|
268
|
+
path: [...path, key],
|
|
269
|
+
category: "not_expressible",
|
|
270
|
+
reason: "LiteLLM per-deployment metadata — access groups, ids, declared context windows. " +
|
|
271
|
+
"Makine's executor definition carries none of it, and this tool did not examine the " +
|
|
272
|
+
"individual fields.",
|
|
273
|
+
});
|
|
274
|
+
continue;
|
|
275
|
+
}
|
|
276
|
+
leftovers.push({ path: [...path, key], category: "unknown_key", reason: UNKNOWN_KEY_REASON });
|
|
277
|
+
}
|
|
278
|
+
const modelName = readString(entry.model_name);
|
|
279
|
+
if (modelName === undefined) {
|
|
280
|
+
return {
|
|
281
|
+
ok: false,
|
|
282
|
+
category: "invalid_value",
|
|
283
|
+
reason: "The deployment has no usable `model_name`. That is the name an application sends as its " +
|
|
284
|
+
"model, and Makine needs it to register an alias.",
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
const params = entry.litellm_params;
|
|
288
|
+
if (!isPlainObject(params)) {
|
|
289
|
+
return {
|
|
290
|
+
ok: false,
|
|
291
|
+
category: "invalid_value",
|
|
292
|
+
reason: "The deployment has no `litellm_params` mapping, so there is nothing to translate.",
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
const paramsPath = [...path, "litellm_params"];
|
|
296
|
+
const upstream = readString(params.model);
|
|
297
|
+
if (upstream === undefined) {
|
|
298
|
+
return {
|
|
299
|
+
ok: false,
|
|
300
|
+
category: "invalid_value",
|
|
301
|
+
reason: "`litellm_params.model` is missing, so the provider and model are both unknown.",
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
const routed = routeUpstreamModel(upstream, readString(params.api_base));
|
|
305
|
+
if (!routed.ok)
|
|
306
|
+
return routed;
|
|
307
|
+
const consumedParamKeys = new Set(["model"]);
|
|
308
|
+
const candidate = {
|
|
309
|
+
slot: routed.slot,
|
|
310
|
+
alias: { value: modelName, path: [...path, "model_name"] },
|
|
311
|
+
model: { value: routed.model, path: [...paramsPath, "model"] },
|
|
312
|
+
};
|
|
313
|
+
if (routed.slot === "local") {
|
|
314
|
+
const apiBase = readString(params.api_base);
|
|
315
|
+
if (apiBase === undefined) {
|
|
316
|
+
return {
|
|
317
|
+
ok: false,
|
|
318
|
+
category: "invalid_value",
|
|
319
|
+
reason: `"${upstream}" names a model server you run yourself, but the deployment gives no ` +
|
|
320
|
+
`api_base. Makine's local slot needs an explicit endpoint URL.`,
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
candidate.baseUrl = { value: apiBase, path: [...paramsPath, "api_base"] };
|
|
324
|
+
consumedParamKeys.add("api_base");
|
|
325
|
+
}
|
|
326
|
+
if (params.api_key !== undefined) {
|
|
327
|
+
candidate.credential = {
|
|
328
|
+
path: [...paramsPath, "api_key"],
|
|
329
|
+
source: readCredentialSource(params.api_key),
|
|
330
|
+
};
|
|
331
|
+
consumedParamKeys.add("api_key");
|
|
332
|
+
}
|
|
333
|
+
for (const key of Object.keys(params)) {
|
|
334
|
+
if (consumedParamKeys.has(key))
|
|
335
|
+
continue;
|
|
336
|
+
// `Object.hasOwn`, not a plain lookup: the key comes from somebody else's file, so
|
|
337
|
+
// `constructor`, `toString` and `valueOf` are all reachable key names, and a plain lookup hands
|
|
338
|
+
// back `Object.prototype`'s function as the reason.
|
|
339
|
+
const reason = Object.hasOwn(LITELLM_PARAMS_REASONS, key) ? LITELLM_PARAMS_REASONS[key] : undefined;
|
|
340
|
+
if (reason !== undefined) {
|
|
341
|
+
leftovers.push({ path: [...paramsPath, key], category: "not_expressible", reason });
|
|
342
|
+
continue;
|
|
343
|
+
}
|
|
344
|
+
if (key === "api_base") {
|
|
345
|
+
leftovers.push({
|
|
346
|
+
path: [...paramsPath, key],
|
|
347
|
+
category: "not_expressible",
|
|
348
|
+
reason: "Makine's OpenAI and Anthropic slots always call the vendor's own endpoint " +
|
|
349
|
+
"(apps/api/src/index.ts:389, :405); there is no variable that re-points them, so this " +
|
|
350
|
+
"value is not carried into a setting.",
|
|
351
|
+
});
|
|
352
|
+
continue;
|
|
353
|
+
}
|
|
354
|
+
if (isCredentialKey(key)) {
|
|
355
|
+
leftovers.push({
|
|
356
|
+
path: [...paramsPath, key],
|
|
357
|
+
category: "not_expressible",
|
|
358
|
+
reason: "This tool does not know this key, and its name says it holds a secret, so the value " +
|
|
359
|
+
"was not copied or quoted. Nothing was translated from it.",
|
|
360
|
+
});
|
|
361
|
+
continue;
|
|
362
|
+
}
|
|
363
|
+
leftovers.push({ path: [...paramsPath, key], category: "unknown_key", reason: UNKNOWN_KEY_REASON });
|
|
364
|
+
}
|
|
365
|
+
return {
|
|
366
|
+
ok: true,
|
|
367
|
+
analysis: { candidate, leftovers, group: normalizeModelAlias(modelName) },
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* LiteLLM's `provider/model` prefix decides the slot.
|
|
372
|
+
*
|
|
373
|
+
* `openai/` splits two ways: with no `api_base`, or one on the vendor's own host, it is the OpenAI
|
|
374
|
+
* slot; with any other `api_base` it is somebody's own OpenAI-compatible server and belongs in the
|
|
375
|
+
* local slot.
|
|
376
|
+
*/
|
|
377
|
+
function routeUpstreamModel(upstream, apiBase) {
|
|
378
|
+
const separator = upstream.indexOf("/");
|
|
379
|
+
if (separator <= 0) {
|
|
380
|
+
return {
|
|
381
|
+
ok: false,
|
|
382
|
+
category: "unsupported_provider",
|
|
383
|
+
reason: `"${upstream}" names no provider. LiteLLM infers one from the model name; Makine needs ` +
|
|
384
|
+
`the provider stated, because the slot decides which endpoint and protocol are used. ` +
|
|
385
|
+
`Write it as openai/${upstream} or anthropic/${upstream} if that is what it is.`,
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
const prefix = upstream.slice(0, separator);
|
|
389
|
+
const model = upstream.slice(separator + 1).trim();
|
|
390
|
+
if (model.length === 0 || model.includes("*")) {
|
|
391
|
+
return {
|
|
392
|
+
ok: false,
|
|
393
|
+
category: "unsupported_provider",
|
|
394
|
+
reason: `"${upstream}" is a wildcard or has no model name. Makine registers one named model per ` +
|
|
395
|
+
`slot and cannot pass an arbitrary model through to a provider.`,
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
if (prefix === "openai") {
|
|
399
|
+
if (apiBase === undefined)
|
|
400
|
+
return { ok: true, slot: "openai", model };
|
|
401
|
+
const host = hostOf(apiBase);
|
|
402
|
+
if (host === "api.openai.com")
|
|
403
|
+
return { ok: true, slot: "openai", model };
|
|
404
|
+
return { ok: true, slot: "local", model };
|
|
405
|
+
}
|
|
406
|
+
if (prefix === "anthropic") {
|
|
407
|
+
return { ok: true, slot: "anthropic", model };
|
|
408
|
+
}
|
|
409
|
+
if (LOCAL_MODEL_PREFIXES.has(prefix)) {
|
|
410
|
+
return { ok: true, slot: "local", model };
|
|
411
|
+
}
|
|
412
|
+
return {
|
|
413
|
+
ok: false,
|
|
414
|
+
category: "unsupported_provider",
|
|
415
|
+
reason: `Makine has no chat slot for "${prefix}". A deployment reaches Makine's Gateway through ` +
|
|
416
|
+
`one of three slots only: OpenAI, Anthropic, and one OpenAI-compatible endpoint you run ` +
|
|
417
|
+
`yourself (apps/api/src/index.ts:365-449). Nothing was translated from this deployment. If ` +
|
|
418
|
+
`"${prefix}" serves an OpenAI-compatible API on a host you control, re-point it through a ` +
|
|
419
|
+
`gateway of your own and write it as openai/<model> with that api_base.`,
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
function hostOf(value) {
|
|
423
|
+
try {
|
|
424
|
+
return new URL(value).hostname.toLowerCase();
|
|
425
|
+
}
|
|
426
|
+
catch {
|
|
427
|
+
return undefined;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
/** Reports every key of a section, so an unknown one inside it is still named. */
|
|
431
|
+
function reportSection(value, path, known, builder) {
|
|
432
|
+
if (!isPlainObject(value)) {
|
|
433
|
+
builder.note(path, "invalid_value", "This section is expected to be a mapping. Nothing was read from it.");
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
const keys = Object.keys(value);
|
|
437
|
+
if (keys.length === 0) {
|
|
438
|
+
builder.note(path, "not_expressible", "The section is empty; there was nothing to translate.");
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
441
|
+
for (const key of keys) {
|
|
442
|
+
const reason = SECTION_REASONS[key];
|
|
443
|
+
if (known.has(key) && reason !== undefined) {
|
|
444
|
+
builder.note([...path, key], "not_expressible", reason);
|
|
445
|
+
continue;
|
|
446
|
+
}
|
|
447
|
+
if (known.has(key)) {
|
|
448
|
+
builder.note([...path, key], "not_expressible", "A LiteLLM proxy setting with no Makine equivalent in the environment file.");
|
|
449
|
+
continue;
|
|
450
|
+
}
|
|
451
|
+
builder.note([...path, key], "unknown_key", UNKNOWN_KEY_REASON);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
//# sourceMappingURL=litellm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"litellm.js","sourceRoot":"","sources":["../../src/migrate/litellm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAIzD,iFAAiF;AACjF,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC;AAE5F,MAAM,eAAe,GAAqC;IACxD,gBAAgB,EACd,2FAA2F;QAC3F,6FAA6F;QAC7F,8BAA8B;IAChC,WAAW,EACT,+FAA+F;QAC/F,6BAA6B;IAC/B,OAAO,EAAE,qEAAqE;IAC9E,aAAa,EAAE,6DAA6D;IAC5E,oBAAoB,EAAE,6DAA6D;IACnF,iBAAiB,EAAE,8CAA8C;IACjE,aAAa,EAAE,8CAA8C;IAC7D,WAAW,EAAE,wEAAwE;IACrF,qBAAqB,EAAE,8DAA8D;IACrF,sBAAsB,EAAE,mEAAmE;IAC3F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AAO,CAAC,IAAI,CACV,IAAI,EACJ,eAAe,EACf,qEAAqE,CACtE,CAAC;QACF,OAAO;IACT,CAAC;IACD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,iBAAiB,EAAE,uDAAuD,CAAC,CAAC;QAC/F,OAAO;IACT,CAAC;IACD,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,MAAM,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;QACpC,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YAC3C,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC,EAAE,iBAAiB,EAAE,MAAM,CAAC,CAAC;YACxD,SAAS;QACX,CAAC;QACD,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACnB,OAAO,CAAC,IAAI,CACV,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC,EACd,iBAAiB,EACjB,4EAA4E,CAC7E,CAAC;YACF,SAAS;QACX,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC,EAAE,aAAa,EAAE,kBAAkB,CAAC,CAAC;IAClE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Thrown when the file parsed but is not a config of the shape `--from` named. Exits `EXIT.USAGE`. */
|
|
2
|
+
export declare class MigrateInputError extends Error {
|
|
3
|
+
}
|
|
4
|
+
export declare function isPlainObject(value: unknown): value is Record<string, unknown>;
|
|
5
|
+
export declare function readString(value: unknown): string | undefined;
|
|
6
|
+
export declare const UNKNOWN_KEY_REASON: string;
|
|
7
|
+
//# sourceMappingURL=nodes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../src/migrate/nodes.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,qBAAa,iBAAkB,SAAQ,KAAK;CAAG;AAE/C,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE9E;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAI7D;AAED,eAAO,MAAM,kBAAkB,QAIF,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Thrown when the file parsed but is not a config of the shape `--from` named. Exits `EXIT.USAGE`. */
|
|
2
|
+
export class MigrateInputError extends Error {
|
|
3
|
+
}
|
|
4
|
+
export function isPlainObject(value) {
|
|
5
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6
|
+
}
|
|
7
|
+
export function readString(value) {
|
|
8
|
+
if (typeof value !== "string")
|
|
9
|
+
return undefined;
|
|
10
|
+
const trimmed = value.trim();
|
|
11
|
+
return trimmed.length === 0 ? undefined : trimmed;
|
|
12
|
+
}
|
|
13
|
+
export const UNKNOWN_KEY_REASON = "This tool does not know this key. It did not examine it and translated nothing from it — " +
|
|
14
|
+
"which is the point of reporting it: the tool walks whatever is in the file rather than only " +
|
|
15
|
+
"the sections it recognises. Check the upstream documentation for what it does, and whether " +
|
|
16
|
+
"losing it matters to you.";
|
|
17
|
+
//# sourceMappingURL=nodes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../src/migrate/nodes.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,MAAM,OAAO,iBAAkB,SAAQ,KAAK;CAAG;AAE/C,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAc;IACvC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAChD,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC;AACpD,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAC7B,2FAA2F;IAC3F,8FAA8F;IAC9F,6FAA6F;IAC7F,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { InputPath } from "./types.js";
|
|
2
|
+
/** Segment-by-segment prefix test. Never compare joined paths: see `InputPath`. */
|
|
3
|
+
export declare function isPathPrefix(prefix: InputPath, path: InputPath): boolean;
|
|
4
|
+
export declare function pathsEqual(left: InputPath, right: InputPath): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* The same path with every credential-shaped key replaced, for renderings that print segments as
|
|
7
|
+
* data rather than as one formatted string.
|
|
8
|
+
*/
|
|
9
|
+
export declare function withholdPath(path: InputPath): InputPath;
|
|
10
|
+
/**
|
|
11
|
+
* Human rendering for the readable report.
|
|
12
|
+
*
|
|
13
|
+
* A key that is not a bare identifier is bracket-quoted rather than dotted, so the rendered form of
|
|
14
|
+
* `router_settings.model_group_alias."gpt-4.1"` cannot be read as one more level of nesting.
|
|
15
|
+
*/
|
|
16
|
+
export declare function formatPath(path: InputPath): string;
|
|
17
|
+
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/migrate/paths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAe,MAAM,YAAY,CAAC;AAEzD,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAMxE;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,GAAG,OAAO,CAErE;AA4DD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,CAIvD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAMlD"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/** Segment-by-segment prefix test. Never compare joined paths: see `InputPath`. */
|
|
2
|
+
export function isPathPrefix(prefix, path) {
|
|
3
|
+
if (prefix.length > path.length)
|
|
4
|
+
return false;
|
|
5
|
+
for (let index = 0; index < prefix.length; index += 1) {
|
|
6
|
+
if (prefix[index] !== path[index])
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
return true;
|
|
10
|
+
}
|
|
11
|
+
export function pathsEqual(left, right) {
|
|
12
|
+
return left.length === right.length && isPathPrefix(left, right);
|
|
13
|
+
}
|
|
14
|
+
const BARE_KEY = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
15
|
+
/**
|
|
16
|
+
* A key name that may itself be the credential.
|
|
17
|
+
*
|
|
18
|
+
* A secret can reach the report as a KEY rather than a value — a JSON object whose key is the
|
|
19
|
+
* whole credential, or a YAML key that swallowed one and still carries a value, as
|
|
20
|
+
* `{master_key=sk-…: 1}` does. A report that prints paths then prints the secret. Nothing a real
|
|
21
|
+
* config uses looks like that — `model_name`, `litellm_params`, `api_base` and even a model-group
|
|
22
|
+
* alias such as `"gpt-4.1"` are all short and separator-free — so withholding costs the reader
|
|
23
|
+
* nothing, and the placeholder still says where the construct was and how big it was.
|
|
24
|
+
*
|
|
25
|
+
* This guards the keys that HAVE a value. A YAML pair with no value node is a different accident
|
|
26
|
+
* with a different answer: it is refused outright in `command.ts`, because a flow mapping missing
|
|
27
|
+
* the space after its colon — `{master_key:sk-…}` — is one key in LiteLLM's own loader too, so that
|
|
28
|
+
* file runs the proxy with no master key at all.
|
|
29
|
+
*
|
|
30
|
+
* The separator need not be ASCII. A CJK input method types `:` (U+FF1A) and `=` (U+FF1D) where
|
|
31
|
+
* the user meant `:` and `=`, `∶` (U+2236) arrives from a document, and U+200B arrives from a copy
|
|
32
|
+
* out of a web console — each produces the same one-key parse while looking like two. So the test
|
|
33
|
+
* is the whole printable-ASCII range rather than a list of separators: the runtime's own alias
|
|
34
|
+
* pattern (`runtime-rules.ts`) is ASCII-only, so no key Makine could accept is withheld by it.
|
|
35
|
+
*/
|
|
36
|
+
const CREDENTIAL_SHAPED_KEY = /[:=]|[^\x21-\x7e]/;
|
|
37
|
+
const MAX_PRINTED_KEY_LENGTH = 64;
|
|
38
|
+
/**
|
|
39
|
+
* Prefixes a provider stamps on its own keys, which a key name never carries by accident.
|
|
40
|
+
*
|
|
41
|
+
* Neither length nor the separator test reaches these: a key that is nothing but a pasted secret —
|
|
42
|
+
* a Portkey config's root key `{"sk-…": 1}`, or a LiteLLM block line `sk-…: 1` — is 27 characters
|
|
43
|
+
* with no separator in it. Every prefix here is issued by a provider LiteLLM or Portkey routes to
|
|
44
|
+
* (OpenAI and compatibles, Groq, Google, Perplexity, Replicate), and none of them begins a key name
|
|
45
|
+
* either product defines.
|
|
46
|
+
*/
|
|
47
|
+
const CREDENTIAL_KEY_PREFIXES = ["sk-", "sk_", "gsk_", "AIza", "pplx-", "r8_"];
|
|
48
|
+
/**
|
|
49
|
+
* Hugging Face is the one prefix a user-named key can plausibly start with — `hf_token` and
|
|
50
|
+
* `hf_model_id` are ordinary names — so it is matched on the shape of the token instead. A real
|
|
51
|
+
* one is 37 characters: `hf_` and 34 letters and digits. Unanchored at the end, so a token with
|
|
52
|
+
* anything appended is still withheld; no user-named key reaches 30 unbroken letters and digits.
|
|
53
|
+
*/
|
|
54
|
+
const HUGGING_FACE_TOKEN = /^hf_[A-Za-z0-9]{30,}/;
|
|
55
|
+
function isWithheld(key) {
|
|
56
|
+
return (CREDENTIAL_SHAPED_KEY.test(key) ||
|
|
57
|
+
key.length > MAX_PRINTED_KEY_LENGTH ||
|
|
58
|
+
CREDENTIAL_KEY_PREFIXES.some((prefix) => key.startsWith(prefix)) ||
|
|
59
|
+
HUGGING_FACE_TOKEN.test(key));
|
|
60
|
+
}
|
|
61
|
+
function placeholder(key) {
|
|
62
|
+
return `<key withheld, ${String(key.length)} characters>`;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The same path with every credential-shaped key replaced, for renderings that print segments as
|
|
66
|
+
* data rather than as one formatted string.
|
|
67
|
+
*/
|
|
68
|
+
export function withholdPath(path) {
|
|
69
|
+
return path.map((segment) => typeof segment === "string" && isWithheld(segment) ? placeholder(segment) : segment);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Human rendering for the readable report.
|
|
73
|
+
*
|
|
74
|
+
* A key that is not a bare identifier is bracket-quoted rather than dotted, so the rendered form of
|
|
75
|
+
* `router_settings.model_group_alias."gpt-4.1"` cannot be read as one more level of nesting.
|
|
76
|
+
*/
|
|
77
|
+
export function formatPath(path) {
|
|
78
|
+
let rendered = "";
|
|
79
|
+
for (const segment of path) {
|
|
80
|
+
rendered += formatSegment(segment, rendered.length === 0);
|
|
81
|
+
}
|
|
82
|
+
return rendered === "" ? "<root>" : rendered;
|
|
83
|
+
}
|
|
84
|
+
function formatSegment(segment, first) {
|
|
85
|
+
if (typeof segment === "number")
|
|
86
|
+
return `[${String(segment)}]`;
|
|
87
|
+
// Before the bare-key test, so a 65-character identifier is withheld rather than dotted.
|
|
88
|
+
if (isWithheld(segment))
|
|
89
|
+
return `[${JSON.stringify(placeholder(segment))}]`;
|
|
90
|
+
if (BARE_KEY.test(segment))
|
|
91
|
+
return first ? segment : `.${segment}`;
|
|
92
|
+
return `[${JSON.stringify(segment)}]`;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL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