fix(model-ref): re-add nvidia/ prefix in normalizeStaticProviderModelId (#71552)#71660
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Greptile SummaryThis PR fixes a bug where nvidia model IDs lose their Confidence Score: 4/5Safe to merge — the fix is minimal and correct, with one minor test-description inaccuracy. Only P2 findings; the core logic change is correct and consistent with the existing openrouter pattern. The second test case uses a misleading fixture but doesn't affect correctness of the implementation. src/agents/model-ref-shared.test.ts — second test fixture could be more representative of the double-prefix scenario. Prompt To Fix All With AIThis is a comment left during a code review.
Path: src/agents/model-ref-shared.test.ts
Line: 11-15
Comment:
**Misleading test description and model fixture**
The test is named "does not double-prefix already prefixed models", suggesting the input is `nvidia/nemotron-3-super-120b-a12b` (already carrying the `nvidia/` prefix). Instead it uses `moonshotai/kimi-k2.5`, which is a third-party model hosted on NVIDIA's platform — a slightly different scenario. The guard works either way because it only checks for `/`, but the test doesn't actually prove the double-prefix case. Consider using `nvidia/nemotron-3-super-120b-a12b` as the fixture to make the intent unambiguous.
```suggestion
it("does not double-prefix already prefixed models", () => {
expect(normalizeStaticProviderModelId("nvidia", "nvidia/nemotron-3-super-120b-a12b")).toBe(
"nvidia/nemotron-3-super-120b-a12b",
);
});
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "fix(model-ref): re-add nvidia/ prefix in..." | Re-trigger Greptile |
db9486f to
4f42db5
Compare
fabianwilliams
left a comment
There was a problem hiding this comment.
Mirrors the existing openrouter prefix handling pattern right above. Tests cover both bare and pre-prefixed input. LGTM. Approving + merging per @pSteiny's fix-and-merge directive.
…Id (openclaw#71552) (openclaw#71660) * fix(model-ref): re-add nvidia/ prefix in normalizeStaticProviderModelId (openclaw#71552) * fix(test): use nvidia-prefixed model fixture for double-prefix guard --------- Co-authored-by: Sudhindra Tatti <sudhi@sudhindras-mini.lan>
…Id (openclaw#71552) (openclaw#71660) * fix(model-ref): re-add nvidia/ prefix in normalizeStaticProviderModelId (openclaw#71552) * fix(test): use nvidia-prefixed model fixture for double-prefix guard --------- Co-authored-by: Sudhindra Tatti <sudhi@sudhindras-mini.lan>
…Id (openclaw#71552) (openclaw#71660) * fix(model-ref): re-add nvidia/ prefix in normalizeStaticProviderModelId (openclaw#71552) * fix(test): use nvidia-prefixed model fixture for double-prefix guard --------- Co-authored-by: Sudhindra Tatti <sudhi@sudhindras-mini.lan>
…Id (openclaw#71552) (openclaw#71660) * fix(model-ref): re-add nvidia/ prefix in normalizeStaticProviderModelId (openclaw#71552) * fix(test): use nvidia-prefixed model fixture for double-prefix guard --------- Co-authored-by: Sudhindra Tatti <sudhi@sudhindras-mini.lan>
…Id (openclaw#71552) (openclaw#71660) * fix(model-ref): re-add nvidia/ prefix in normalizeStaticProviderModelId (openclaw#71552) * fix(test): use nvidia-prefixed model fixture for double-prefix guard --------- Co-authored-by: Sudhindra Tatti <sudhi@sudhindras-mini.lan>
…Id (openclaw#71552) (openclaw#71660) * fix(model-ref): re-add nvidia/ prefix in normalizeStaticProviderModelId (openclaw#71552) * fix(test): use nvidia-prefixed model fixture for double-prefix guard --------- Co-authored-by: Sudhindra Tatti <sudhi@sudhindras-mini.lan>
…Id (openclaw#71552) (openclaw#71660) * fix(model-ref): re-add nvidia/ prefix in normalizeStaticProviderModelId (openclaw#71552) * fix(test): use nvidia-prefixed model fixture for double-prefix guard --------- Co-authored-by: Sudhindra Tatti <sudhi@sudhindras-mini.lan>
Fix: Nvidia provider drops vendor model prefix (#71552)
Root cause:
parseStaticModelRefsplitsnvidia/nemotron-3-super-120b-a12bon the first/→ provider=nvidia, modelRaw=nemotron-3-super-120b-a12b.normalizeStaticProviderModelIdhas a re-prefixing case foropenrouterbut notnvidia, so the bare model id reachesintegrate.api.nvidia.com→ HTTP 404.Fix: Added the missing nvidia re-prefixing case in
normalizeStaticProviderModelId:Test: Added
src/agents/model-ref-shared.test.tscovering:nvidiamodel ids get the prefix restored (nemotron-3-super-120b-a12b→nvidia/nemotron-3-super-120b-a12b)Closes #71552