Skip to content

Onboarding injects invalid 'providers' key into openclaw.json, breaking all CLI commands #1134

@eferrao

Description

@eferrao

Bug description

During onboarding with an NVIDIA cloud provider (nemoclaw onboard --resume), NemoClaw writes a providers key into the sandbox's /sandbox/.openclaw/openclaw.json configuration file. However, OpenClaw's config schema does not recognize this key at the root level, causing every subsequent openclaw command to emit:

Invalid config at /sandbox/.openclaw/openclaw.json:
- <root>: Unrecognized key: "providers"

This includes openclaw config validate, openclaw models status, openclaw agent, etc.

Steps to reproduce

  1. Run nemoclaw onboard and select the NVIDIA Endpoints cloud provider
  2. Complete onboarding (may require the skipVerify: true fix from Onboarding fails at inference step: NVIDIA provider missing skipVerify flag #1130)
  3. SSH into the sandbox: openshell sandbox ssh-config <name>ssh ...
  4. Run any openclaw command, e.g. openclaw config validate
  5. Observe the "Unrecognized key: providers" error on every invocation

Expected behavior

The inference provider configuration should be written to the correct location. Based on investigation, it appears:

  • The agent-level models.json at ~/.openclaw/agents/main/agent/models.json is the correct place for provider definitions (baseUrl, api, models list)
  • The agent-level auth-profiles.json is the correct place for auth credentials
  • The root openclaw.json config schema does not accept a providers key

Root cause

In bin/lib/onboard.js, the patchStagedDockerfile function correctly writes provider config as Dockerfile ARGs (NEMOCLAW_INFERENCE_BASE_URL, NEMOCLAW_PROVIDER_KEY, etc.). However, when the sandbox is created from the community image (ghcr.io/nvidia/openshell-community/sandboxes/openclaw:latest) rather than a custom-built Dockerfile, these ARGs are never processed. The resulting sandbox ends up with a providers block injected into openclaw.json instead of being routed through the proper models.json + auth-profiles.json mechanism.

Workaround

  1. Remove the providers key from /sandbox/.openclaw/openclaw.json
  2. Add the inference provider definition to ~/.openclaw/agents/main/agent/models.json:
    {
      "providers": {
        "inference": {
          "baseUrl": "https://inference.local/v1",
          "api": "openai-completions",
          "apiKey": "NVIDIA_API_KEY",
          "models": [{
            "id": "nvidia/nemotron-3-super-120b-a12b",
            "name": "NVIDIA Nemotron 3 Super 120B",
            "reasoning": false,
            "input": ["text"],
            "contextWindow": 131072,
            "maxTokens": 4096
          }]
        }
      }
    }
  3. Create ~/.openclaw/agents/main/agent/auth-profiles.json:
    {
      "version": 1,
      "profiles": {
        "inference:manual": {
          "type": "api_key",
          "provider": "inference",
          "key": "gateway-proxied"
        }
      },
      "order": {
        "inference": ["inference:manual"]
      }
    }

Related

Environment

  • NemoClaw version: latest (installed via install script)
  • OpenClaw version: 2026.3.11 (29dc654)
  • OpenShell version: 0.0.16
  • OS: macOS (Apple Silicon)
  • Sandbox image: ghcr.io/nvidia/openshell-community/sandboxes/openclaw:latest

Metadata

Metadata

Assignees

Labels

area: cliCommand line interface, flags, terminal UX, or output

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions