openclaw - 💡(How to fix) Fix [Bug]: Cross-provider fallback model ID gets provider prefix doubled (e.g. `nvidia/nvidia/nemotron-3-super-120b-a12b`) [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#77167Fetched 2026-05-05 05:51:28
View on GitHub
Comments
2
Participants
2
Timeline
4
Reactions
2
Author
Timeline (top)
commented ×2closed ×1unsubscribed ×1

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.

Root Cause

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.

Fix Action

Fix / Workaround

Workaround attempted (unsuccessful)

Code Example

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

---

[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

---

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

---

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

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

  • #62390 (closed COMPLETED 2026-04-25) — fix likely introduced this regression
  • #49369, #38256, #71552 — earlier prefix-handling issues in the same area

extent analysis

TL;DR

The most likely fix is to modify the buildQualifiedChatModelValue function to check if the model ID already starts with the provider prefix before prepending it.

Guidance

  • Review the buildQualifiedChatModelValue function in ui/src/ui/chat-model-ref.ts to ensure it correctly handles model IDs with existing provider prefixes.
  • Update the function to skip prepending the provider prefix if the model ID already starts with it.
  • Test the updated function with different model ID formats to ensure correct behavior.
  • Consider adding a check to handle cases where the model ID has a slash separating non-provider segments.

Example

function buildQualifiedChatModelValue(modelId: string, provider: string) {
  if (modelId.startsWith(`${provider}/`)) {
    return modelId;
  } else {
    return `${provider}/${modelId}`;
  }
}

Notes

The fix should be applied to the buildQualifiedChatModelValue function, which was modified for issue #62390. The updated function should correctly handle model IDs with and without existing provider prefixes.

Recommendation

Apply the workaround by modifying the buildQualifiedChatModelValue function to correctly handle model IDs with existing provider prefixes, as this will resolve the current issue and prevent similar problems in the future.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

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)

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: Cross-provider fallback model ID gets provider prefix doubled (e.g. `nvidia/nvidia/nemotron-3-super-120b-a12b`) [2 comments, 2 participants]