mirror of
https://github.com/Jeuners/ECC.git
synced 2026-09-09 15:02:30 +02:00
feat: connect ECC to canonical Ito compute CLI (#2558)
This commit is contained in:
parent
9d54ee222d
commit
bc774282e6
32 changed files with 1043 additions and 1275 deletions
|
|
@ -6,8 +6,11 @@ function getComputeSponsorCopy() {
|
|||
return "Run or self-host any open-source model. Itô is ECC's preferred compute sponsor: "
|
||||
+ 'open its dashboard to sign in and rent or manage GPUs at '
|
||||
+ ITO_COMPUTE_URL
|
||||
+ '. Any GPU provider works. ECC only provides this link; it does not provision '
|
||||
+ 'compute or serving. Managed inference through Itô is not live yet.';
|
||||
+ '. Any GPU provider works. This sponsorship link is passive: it does not invoke '
|
||||
+ 'an RFQ, reserve capacity, provision compute, or configure serving. Separately, '
|
||||
+ 'the opt-in "ecc ito find" bridge invokes the explicitly configured canonical '
|
||||
+ 'Itô CLI and submits a live authenticated RFQ; it does not reserve capacity. '
|
||||
+ 'Managed inference through Itô is not live yet.';
|
||||
}
|
||||
|
||||
module.exports = Object.freeze({
|
||||
|
|
|
|||
|
|
@ -23,6 +23,18 @@ const SYSTEM_ENVIRONMENT_KEYS = Object.freeze([
|
|||
"XDG_RUNTIME_DIR",
|
||||
]);
|
||||
|
||||
const ITO_RUNTIME_ENVIRONMENT_KEYS = Object.freeze([
|
||||
"ITO_API_KEY",
|
||||
"ITO_API_URL",
|
||||
"ITO_INVENTORY_URL",
|
||||
]);
|
||||
|
||||
const ECC_ITO_CONTROL_KEYS = Object.freeze([
|
||||
"ECC_DRY_RUN",
|
||||
"ECC_ITO_CLI_EXECUTABLE",
|
||||
"NODE_ENV",
|
||||
]);
|
||||
|
||||
function copyDefined(source, target, key) {
|
||||
if (typeof source[key] === "string") {
|
||||
target[key] = source[key];
|
||||
|
|
@ -38,11 +50,15 @@ function createSafeItoEnvironment(source = process.env, options = {}) {
|
|||
if (key.startsWith("LC_")) copyDefined(source, safe, key);
|
||||
}
|
||||
|
||||
if (options.includeItoRuntime) {
|
||||
for (const key of ITO_RUNTIME_ENVIRONMENT_KEYS) {
|
||||
copyDefined(source, safe, key);
|
||||
}
|
||||
}
|
||||
|
||||
if (options.includeControls) {
|
||||
copyDefined(source, safe, "ECC_DRY_RUN");
|
||||
copyDefined(source, safe, "NODE_ENV");
|
||||
if (source.NODE_ENV === "test") {
|
||||
copyDefined(source, safe, "ECC_ITO_BROWSER_EXECUTABLE");
|
||||
for (const key of ECC_ITO_CONTROL_KEYS) {
|
||||
copyDefined(source, safe, key);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -50,6 +66,8 @@ function createSafeItoEnvironment(source = process.env, options = {}) {
|
|||
}
|
||||
|
||||
module.exports = Object.freeze({
|
||||
ECC_ITO_CONTROL_KEYS,
|
||||
ITO_RUNTIME_ENVIRONMENT_KEYS,
|
||||
SYSTEM_ENVIRONMENT_KEYS,
|
||||
createSafeItoEnvironment,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue