Skip to content

[Bug]: Cross-provider fallback model ID gets provider prefix doubled (e.g. nvidia/nvidia/nemotron-3-super-120b-a12b) #77167

Description

@ndagle73

Bug type

Regression (likely introduced by the fix for #62390)

Beta release blocker

No

Summary

buildQualifiedChatModelValue (or whatever function resolves fallback model IDs at agent runtime) now doubles the provider prefix when a fallback string already contains the qualifying nvidia/ prefix in the model ID. This appears to be a regression of the fix that landed for #62390 — the previous behavior dropped the prefix when one was already present, and the over-correction now unconditionally prepends.

Current behavior

With:

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "openai-codex/gpt-5.5",
        "fallbacks": [
          "openai-codex/gpt-5.2",
          "nvidia/nemotron-3-super-120b-a12b"
        ]
      }
    }
  }
}

When the primary and gpt-5.2 fallback exhaust (e.g. ChatGPT plan rate-limit), the third fallback fires with this exact failure:

[model-fallback/decision] decision=candidate_failed
  candidate=nvidia/nvidia/nemotron-3-super-120b-a12b
  reason=model_not_found
  detail=Unknown model: nvidia/nvidia/nemotron-3-super-120b-a12b

The fallback string nvidia/nemotron-3-super-120b-a12b was already qualified — provider=nvidia, id=nemotron-3-super-120b-a12b. But the resolver appears to invoke buildQualifiedChatModelValue("nvidia/nemotron-3-super-120b-a12b", "nvidia") and now returns nvidia/nvidia/nemotron-3-super-120b-a12b instead of nvidia/nemotron-3-super-120b-a12b.

Workaround attempted (unsuccessful)

Removing the nvidia/ prefix in the fallback config:

"fallbacks": ["openai-codex/gpt-5.2", "nemotron-3-super-120b-a12b"]

makes the system inherit the primary's provider:

candidate=openai-codex/nemotron-3-super-120b-a12b
detail=Unknown model: openai-codex/nemotron-3-super-120b-a12b

So neither form succeeds. There appears to be no working syntax for cross-provider fallback in the current build.

Expected behavior

Either form should resolve to nvidia/nemotron-3-super-120b-a12b:

  • nvidia/nemotron-3-super-120b-a12b → recognized as provider=nvidia, id=nemotron-3-super-120b-a12b, no prefix prepended
  • nemotron-3-super-120b-a12b → looked up across all providers; nvidia plugin claims it (since models list shows it's owned by nvidia)

Reproduction

  1. Configure primary + fallback chain crossing providers as above
  2. Force primary + same-provider fallback to fail (rate-limit a ChatGPT plan or invalidate OAuth)
  3. Observe the third fallback fail with Unknown model: <provider>/<provider>/<id>

Environment

  • OpenClaw 2026.5.2 (8b2a6e5) — gateway running in agent-sandbox pod
  • nvidia plugin enabled, NVIDIA_API_KEY set in env, Auth: yes shown in openclaw models list
  • Relevant catalog entry: nvidia/nemotron-3-super-120b-a12b (text, 195k ctx)

Suspected location

ui/src/ui/chat-model-ref.ts buildQualifiedChatModelValue — same function modified for #62390. The fix may need to detect that the model ID already starts with ${provider}/ and skip prepending in that case, while still prepending when the slash separates non-provider segments (e.g. deepseek-ai/deepseek-v3.2 should still become nvidia/deepseek-ai/deepseek-v3.2).

Related issues

Metadata

Metadata

Assignees

No one assigned

    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