Skip to content

[Bug]: parseStaticModelRef strips provider prefix, breaks NVIDIA NIM (and OpenRouter-style ids) on direct invocation #73014

Description

@bautrey

Symptom

openclaw infer model run --model nvidia/nemotron-3-super-120b-a12b ...

fails with 404 page not found from NVIDIA NIM.

NIM requires the full nvidia/<model> form in the request body,
but parseStaticModelRef (line 28-52 of model-ref-shared-DcLkozLZ.js)
splits on the first / and yields:

  • provider = "nvidia"
  • modelId = "nemotron-3-super-120b-a12b" (bare — prefix stripped)

The OpenAI-completions client then posts
{"model": "nemotron-3-super-120b-a12b", ...} — wrong shape for NIM,
because nemotron-3-super-120b-a12b (without the nvidia/ prefix)
isn't a valid NIM model identifier.

Reproduction

  1. Install plugin, register nvidia/<model> correctly in models.json
    (workaround for the related apiKey bug — see companion issue).
  2. Invoke: openclaw infer model run --model nvidia/nemotron-3-super-120b-a12b --prompt hi
  3. NIM responds with 404 page not found.

Direct curl against NIM with the full nvidia/<model> id in the body
returns 200 OK, confirming credentials and connectivity are fine — the
bug is purely in how the model ref gets split before reaching the wire.

Root cause

parseStaticModelRef assumes:

  1. Provider id and model id are separable by /.
  2. The wire body should contain only the model id (the suffix after the
    first /).

Both assumptions break for providers whose model ids embed the provider
name. NIM is one example; OpenRouter-style ids (e.g.
anthropic/claude-3-opus) have the same shape.

Suggested fix

A per-provider config option that tells the parser to send the full id
in the wire body when the parsed prefix matches a provider that needs
it. Something like:

"models": {
  "providers": {
    "nvidia": {
      "modelIdPrefix": "preserve"
    }
  }
}

Or a plugin-manifest flag: supportsBareModelRef: false.

Environment

  • OpenClaw 2026.4.23 (commit a979721)
  • Linux container
  • Node 22.22.1

Workaround

Register the model under a different provider id (e.g.
nvidia-endpoints) so the parsed model id becomes the full
nvidia/<model> form (correct shape for NIM). Awkward but functional —
we ship this in production today. Worked example available in our
internal docs/operations/nvidia-routing.md writeup; happy to share
the relevant patches.


Reported by FortiumPartners after running into both bugs while wiring
NVIDIA NIM into a multi-agent NemoClaw deployment. Happy to test patches.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions