Symptom
Any custom provider entry in ~/.openclaw/agents/<id>/agent/models.json
without an apiKey field causes pi-coding-agent's validateConfig() to
throw, which silently drops the entire models.json. The runtime
falls through to built-in models only — every other custom provider
(codex, xai, github-copilot, etc.) registered in the same file is also
dropped if any single entry lacks apiKey.
This is a silent failure: nothing logs at warn/error level, the file
just stops loading.
Reproduction
- Install OpenClaw
2026.4.23 (commit a979721).
- Set
NVIDIA_API_KEY env var.
- Run
openclaw models list.
Expected: nvidia/nemotron-3-super-120b-a12b row tagged configured.
Actual: row tagged configured,missing.
Direct probe:
ModelRegistry.find('nvidia', 'nemotron-3-super-120b-a12b')
// => null
// Underlying error: Failed to load models.json:
// Provider nvidia: "apiKey" is required when defining custom models
Root cause
@openclaw/nvidia-provider's catalog.buildProvider writes
{ baseUrl, api, models, ... } to models.json without an apiKey
field.
pi-coding-agent's validateConfig() (line 373-380 of
model-registry.js) requires apiKey for any non-built-in provider
that declares custom models. When apiKey is missing it throws, and
the registry falls back to built-in models only — silently discarding
every other custom provider entry in the file.
Suggested fix
The plugin should write apiKey: "NVIDIA_API_KEY" (matching the env
var name declared in the plugin's auth manifest) when persisting
catalog.buildProvider output. OpenClaw's
resolveUsableCustomProviderApiKey already recognizes the bare env-var
name and resolves to process.env.NVIDIA_API_KEY at infer time.
Alternatively: don't write to models.json at all and let runtime
resolution use the catalog hook. The same fix likely applies to any
other plugin whose provider id matches the model id prefix.
Environment
- OpenClaw
2026.4.23 (commit a979721)
- Linux container
- Node
22.22.1
Workaround
Configure the provider with an explicit apiKey field in models.json,
or in openclaw.json under models.providers.<id>.
Reported by FortiumPartners after running into both bugs while wiring
NVIDIA NIM into a multi-agent NemoClaw deployment. Happy to test patches.
Symptom
Any custom provider entry in
~/.openclaw/agents/<id>/agent/models.jsonwithout an
apiKeyfield causes pi-coding-agent'svalidateConfig()tothrow, which silently drops the entire
models.json. The runtimefalls through to built-in models only — every other custom provider
(codex, xai, github-copilot, etc.) registered in the same file is also
dropped if any single entry lacks
apiKey.This is a silent failure: nothing logs at warn/error level, the file
just stops loading.
Reproduction
2026.4.23(commita979721).NVIDIA_API_KEYenv var.openclaw models list.Expected:
nvidia/nemotron-3-super-120b-a12brow taggedconfigured.Actual: row tagged
configured,missing.Direct probe:
Root cause
@openclaw/nvidia-provider'scatalog.buildProviderwrites{ baseUrl, api, models, ... }tomodels.jsonwithout anapiKeyfield.
pi-coding-agent's
validateConfig()(line 373-380 ofmodel-registry.js) requiresapiKeyfor any non-built-in providerthat declares custom models. When
apiKeyis missing it throws, andthe registry falls back to built-in models only — silently discarding
every other custom provider entry in the file.
Suggested fix
The plugin should write
apiKey: "NVIDIA_API_KEY"(matching the envvar name declared in the plugin's auth manifest) when persisting
catalog.buildProvideroutput. OpenClaw'sresolveUsableCustomProviderApiKeyalready recognizes the bare env-varname and resolves to
process.env.NVIDIA_API_KEYat infer time.Alternatively: don't write to
models.jsonat all and let runtimeresolution use the catalog hook. The same fix likely applies to any
other plugin whose provider id matches the model id prefix.
Environment
2026.4.23(commita979721)22.22.1Workaround
Configure the provider with an explicit
apiKeyfield inmodels.json,or in
openclaw.jsonundermodels.providers.<id>.Reported by FortiumPartners after running into both bugs while wiring
NVIDIA NIM into a multi-agent NemoClaw deployment. Happy to test patches.