diff --git a/app/api/sandbox/create/route.ts b/app/api/sandbox/create/route.ts index f741edf..0439acf 100644 --- a/app/api/sandbox/create/route.ts +++ b/app/api/sandbox/create/route.ts @@ -129,9 +129,10 @@ function applyCreateInferenceEnv(env: NodeJS.ProcessEnv, settings: CreateInferen settings.envSummary.push("NEMOCLAW_PROVIDER=nim-local") const apiKey = typeof body?.createInference?.apiKey === "string" ? body.createInference.apiKey.trim() : "" if (apiKey) { + env.NVIDIA_INFERENCE_API_KEY = apiKey env.NVIDIA_API_KEY = apiKey env.NEMOCLAW_PROVIDER_KEY = apiKey - settings.envSummary.push("NVIDIA_API_KEY=", "NEMOCLAW_PROVIDER_KEY=") + settings.envSummary.push("NVIDIA_INFERENCE_API_KEY=", "NVIDIA_API_KEY=", "NEMOCLAW_PROVIDER_KEY=") } } @@ -790,7 +791,8 @@ export async function POST(request: Request) { }) if (!enableTailscale) { - env.NVIDIA_API_KEY = env.NVIDIA_API_KEY || "optional-local-mode" + env.NVIDIA_INFERENCE_API_KEY = env.NVIDIA_INFERENCE_API_KEY || env.NVIDIA_API_KEY || "optional-local-mode" + env.NVIDIA_API_KEY = env.NVIDIA_API_KEY || env.NVIDIA_INFERENCE_API_KEY } applyCreateInferenceEnv(env, createInference, body) diff --git a/app/components/ConfigurationPanel.tsx b/app/components/ConfigurationPanel.tsx index 70f89c9..d825ef3 100644 --- a/app/components/ConfigurationPanel.tsx +++ b/app/components/ConfigurationPanel.tsx @@ -251,7 +251,7 @@ export default function ConfigurationPanel({ sandboxId, mode = 'existing', onCre setEnableTailscale(e.target.checked)} /> Enable Tailscale )} - {enableTailscale &&
Tailscale-enabled creation requires NVIDIA_API_KEY in the dashboard process environment.
} + {enableTailscale &&
Tailscale-enabled creation requires NVIDIA_INFERENCE_API_KEY (or legacy NVIDIA_API_KEY) in the dashboard process environment.
} {isNemoClawOnboardBlueprint &&
Inference at Create
diff --git a/install_versioned_nemoclaw_openshell.sh b/install_versioned_nemoclaw_openshell.sh index 508c41f..6bcbcb1 100755 --- a/install_versioned_nemoclaw_openshell.sh +++ b/install_versioned_nemoclaw_openshell.sh @@ -30,7 +30,7 @@ Usage: ./install_versioned_nemoclaw_openshell.sh [options] Options: - --nvidia-api-key KEY Pass NVIDIA_API_KEY to the NemoClaw installer + --nvidia-api-key KEY Pass NVIDIA_INFERENCE_API_KEY (and legacy NVIDIA_API_KEY) to the NemoClaw installer --skip-openshell Do not install OpenShell --skip-nemoclaw Do not install NemoClaw --help Show this help @@ -60,7 +60,8 @@ Environment overrides: OPENSHELL_GATEWAY_HOST OPENSHELL_GATEWAY_PORT OPENSHELL_GATEWAY_URL - NVIDIA_API_KEY + NVIDIA_INFERENCE_API_KEY + NVIDIA_API_KEY (legacy alias) EOF } @@ -68,7 +69,8 @@ while [[ $# -gt 0 ]]; do case "$1" in --nvidia-api-key) [[ $# -ge 2 ]] || { echo -e "${RED}ERROR:${NC} --nvidia-api-key requires a value" >&2; exit 1; } - export NVIDIA_API_KEY="$2" + export NVIDIA_INFERENCE_API_KEY="$2" + export NVIDIA_API_KEY="${NVIDIA_API_KEY:-$2}" shift 2 ;; --skip-openshell) @@ -134,8 +136,14 @@ install_nemoclaw() { git -C "$source_dir" -c advice.detachedHead=false checkout --quiet --detach FETCH_HEAD [[ -n "$source_dir" && -f "$source_dir/install.sh" ]] || fail "Could not find NemoClaw install.sh in source checkout." - if [[ -z "${NVIDIA_API_KEY:-}" ]]; then - warn "NVIDIA_API_KEY is not set. NemoClaw may require it for non-local provider setup." + if [[ -z "${NVIDIA_INFERENCE_API_KEY:-}" && -n "${NVIDIA_API_KEY:-}" ]]; then + export NVIDIA_INFERENCE_API_KEY="$NVIDIA_API_KEY" + elif [[ -z "${NVIDIA_API_KEY:-}" && -n "${NVIDIA_INFERENCE_API_KEY:-}" ]]; then + export NVIDIA_API_KEY="$NVIDIA_INFERENCE_API_KEY" + fi + + if [[ -z "${NVIDIA_INFERENCE_API_KEY:-}" ]]; then + warn "NVIDIA_INFERENCE_API_KEY is not set. NemoClaw may require it for non-local provider setup." fi log "Installing NemoClaw $NEMOCLAW_INSTALL_REF" @@ -147,6 +155,7 @@ install_nemoclaw() { NEMOCLAW_NON_INTERACTIVE="$NEMOCLAW_NON_INTERACTIVE" \ NEMOCLAW_EXPERIMENTAL="$NEMOCLAW_EXPERIMENTAL" \ NEMOCLAW_PROVIDER="$NEMOCLAW_PROVIDER" \ + NVIDIA_INFERENCE_API_KEY="${NVIDIA_INFERENCE_API_KEY:-}" \ NVIDIA_API_KEY="${NVIDIA_API_KEY:-}" \ ./install.sh ) diff --git a/tests/portable-install-check.mjs b/tests/portable-install-check.mjs index a1652d9..beba18e 100644 --- a/tests/portable-install-check.mjs +++ b/tests/portable-install-check.mjs @@ -71,7 +71,11 @@ assert.match(versionedInstallSource, /NEMOCLAW_EXPERIMENTAL="\$\{NEMOCLAW_EXPERI assert.match(versionedInstallSource, /NEMOCLAW_PROVIDER="\$\{NEMOCLAW_PROVIDER:-vllm\}"/, 'versioned installer must default NemoClaw to the vLLM provider') assert.match(versionedInstallSource, /NEMOCLAW_EXPERIMENTAL="\$NEMOCLAW_EXPERIMENTAL"/, 'versioned installer must pass experimental mode through to NemoClaw install') assert.match(versionedInstallSource, /NEMOCLAW_PROVIDER="\$NEMOCLAW_PROVIDER"/, 'versioned installer must pass the provider through to NemoClaw install') -assert.match(versionedInstallSource, /NVIDIA_API_KEY="\$\{NVIDIA_API_KEY:-\}"/, 'versioned installer must pass NVIDIA_API_KEY through to NemoClaw install') +assert.match(versionedInstallSource, /NVIDIA_INFERENCE_API_KEY="\$\{NVIDIA_INFERENCE_API_KEY:-\}"/, 'versioned installer must pass NVIDIA_INFERENCE_API_KEY through to NemoClaw install') +assert.match(versionedInstallSource, /NVIDIA_API_KEY="\$\{NVIDIA_API_KEY:-\}"/, 'versioned installer must continue passing legacy NVIDIA_API_KEY through to NemoClaw install') +assert.match(createRouteSource, /env\.NVIDIA_INFERENCE_API_KEY = apiKey/, 'create-time inference must export NemoClaw current NVIDIA inference credential env') +assert.match(createRouteSource, /env\.NVIDIA_API_KEY = apiKey/, 'create-time inference must retain the legacy NVIDIA_API_KEY alias for older NemoClaw builds') +assert.match(createRouteSource, /NVIDIA_INFERENCE_API_KEY=/, 'create-time inference summaries must mention the current credential env without printing secrets') assert.match(hostCommandsSource, /export const HOST_PATH/, 'host command resolution must centralize PATH construction') assert.match(hostCommandsSource, /OPENSHELL_CONTROL_VENV/, 'host command resolution must include the installer-managed virtual environment')