@eve-horizon/cli 0.2.32 → 0.2.33
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/index.js +15 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -78105,6 +78105,15 @@ function asBoolean(flags, key) {
|
|
|
78105
78105
|
function normalizeManagedModelRows(payload) {
|
|
78106
78106
|
return Array.isArray(payload) ? payload : payload.data;
|
|
78107
78107
|
}
|
|
78108
|
+
function looksLikeGatewayPath(baseUrl) {
|
|
78109
|
+
try {
|
|
78110
|
+
const parsed = new URL(baseUrl);
|
|
78111
|
+
const path6 = parsed.pathname.toLowerCase();
|
|
78112
|
+
return path6.includes("/inference/v1") || path6.endsWith("/v1");
|
|
78113
|
+
} catch {
|
|
78114
|
+
return false;
|
|
78115
|
+
}
|
|
78116
|
+
}
|
|
78108
78117
|
function printTable(headers, rows) {
|
|
78109
78118
|
const widths = headers.map((header, idx) => Math.max(header.length, ...rows.map((row) => row[idx]?.length ?? 0)));
|
|
78110
78119
|
const line = `+${widths.map((w) => "-".repeat(w + 2)).join("+")}+`;
|
|
@@ -78517,6 +78526,11 @@ async function handleOllama(subcommand, positionals, flags, context2) {
|
|
|
78517
78526
|
};
|
|
78518
78527
|
const requiresWarmStart = asBoolean(flags, "requires-warm-start");
|
|
78519
78528
|
const enabled = asBoolean(flags, "enabled");
|
|
78529
|
+
const targetId = body.target_id;
|
|
78530
|
+
const target = await requestJson(context2, `/inference/targets/${targetId}`);
|
|
78531
|
+
if (target.transport_profile === "openai_compat" && looksLikeGatewayPath(target.base_url)) {
|
|
78532
|
+
console.log("warning: openai_compat target base_url appears to include /v1-like gateway path.");
|
|
78533
|
+
}
|
|
78520
78534
|
if (requiresWarmStart !== void 0) {
|
|
78521
78535
|
body.requires_warm_start = requiresWarmStart;
|
|
78522
78536
|
}
|
|
@@ -78530,7 +78544,7 @@ async function handleOllama(subcommand, positionals, flags, context2) {
|
|
|
78530
78544
|
outputJson(result, json);
|
|
78531
78545
|
if (!json) {
|
|
78532
78546
|
console.log(
|
|
78533
|
-
`Published managed model ${result.data.canonical_model_id} (install ${result.created_install ? "created" : "already present"})
|
|
78547
|
+
`Published managed model ${result.data.canonical_model_id} (install ${result.created_install ? "created" : "already present"}), target ${result.data.target_id}`
|
|
78534
78548
|
);
|
|
78535
78549
|
}
|
|
78536
78550
|
return;
|