Skip to content

fix(router): correct NVIDIA routed endpoints - #3614

Merged
jyaunches merged 1 commit into
mainfrom
issue-3255-model-router-provider-routed-503
May 15, 2026
Merged

fix(router): correct NVIDIA routed endpoints#3614
jyaunches merged 1 commit into
mainfrom
issue-3255-model-router-provider-routed-503

Conversation

@jyaunches

@jyaunches jyaunches commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #3255 by correcting the Model Router pool config used by the Provider Routed path:

  • routes nvapi-* keys to https://integrate.api.nvidia.com/v1
  • fixes the Nemotron 3 Nano LiteLLM model ID
  • fixes the Nemotron 3 Super LiteLLM model ID
  • adds unit regression coverage so these config values do not drift back

Validation

  • npm test -- --run test/validate-blueprint.test.ts
  • npm test -- --run test/onboard.test.ts -t "Model Router"
  • npm run build:cli

E2E guard

Failing-test-first guard: #3594

RED evidence on main-equivalent code: https://github.com/NVIDIA/NemoClaw/actions/runs/25922557128

After this PR is open, dispatch:

gh workflow run regression-e2e.yaml \
  --repo NVIDIA/NemoClaw \
  -f jobs=model-router-provider-routed-inference-e2e \
  --ref issue-3255-model-router-provider-routed-503

Summary by CodeRabbit

  • Chores

    • Updated Nemotron model configurations with revised identifiers and API endpoint settings.
  • Tests

    • Added validation tests to ensure model routing and identifier configurations function correctly.

Review Change Stack

Fixes the Model Router pool config used by the routed provider so nvapi-* keys target the public NVIDIA Build endpoint with valid Nemotron model IDs.

Adds regression coverage for the #3255 config values.

Fixes #3255
@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR fixes three configuration errors in the Model Router that prevented inference requests from reaching NVIDIA APIs. The router pool configuration is corrected with the proper upstream endpoint and valid model identifiers, and regression tests are added to validate these fixes and prevent recurrence of issue #3255.

Changes

Model Router configuration fixes and validation

Layer / File(s) Summary
Router pool endpoint and model ID configuration fixes
nemoclaw-blueprint/router/pool-config.yaml
api_base is corrected from https://inference-api.nvidia.com to https://integrate.api.nvidia.com/v1. Model IDs are fixed: nano model corrected to lowercase nemotron-3-nano-30b-a3b, doubled nvidia/nvidia/ prefix reduced to single nvidia/, and super model ID replaced with correct nemotron-3-super-120b-a12b.
Regression test infrastructure and validation
test/validate-blueprint.test.ts
New ROUTER_POOL_CONFIG_PATH URL constant references the pool config YAML. TypeScript types RouterPoolModel and RouterPoolConfig model the configuration shape. New test block validates regression #3255 requirements: all models route to the correct NVIDIA Build API base URL and LiteLLM model identifiers match expected strings without disallowed formatting or non-existent variant suffixes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested labels

E2E

Suggested reviewers

  • cv

Poem

🐰 Hop, hop, the configs are fixed!
No more mismatched models mixed,
The endpoint's right, the IDs gleam,
And tests now guard the inference dream!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(router): correct NVIDIA routed endpoints' directly and clearly summarizes the main change: correcting NVIDIA routing endpoints in the router pool configuration.
Linked Issues check ✅ Passed The PR fully addresses all coding requirements from issue #3255: corrects the api_base endpoint to https://integrate.api.nvidia.com/v1, updates Nemotron model IDs to valid lowercase forms (nemotron-3-nano-30b-a3b, nemotron-3-super-120b-a12b), and adds regression tests validating these configurations.
Out of Scope Changes check ✅ Passed All changes are directly scoped to issue #3255: pool-config.yaml updates fix the endpoint and model IDs, and test additions validate these fixes. No unrelated modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-3255-model-router-provider-routed-503

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: cloud-inference-e2e, inference-routing-e2e
Optional E2E: None

Dispatch hint: cloud-inference-e2e,inference-routing-e2e

Auto-dispatched E2E: cloud-inference-e2e, inference-routing-e2e via nightly-e2e.yaml at d56db27bcb119524e12f18c495eef93e4ae3b15enightly run

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: medium

Required E2E

  • cloud-inference-e2e (medium): Runs a live install/onboard path and verifies sandbox → inference.local → NVIDIA Build endpoint chat completion. It is the closest existing live check for the changed NVIDIA endpoint/model surface.
  • inference-routing-e2e (medium): Touches inference routing and credential-bearing upstream calls; this existing suite checks gateway-managed inference routing, API-key isolation from the sandbox, and error classification around provider endpoints.

Optional E2E

  • None.

New E2E recommendations

  • model-router-inference-routing (high): No existing E2E appears to onboard with NEMOCLAW_PROVIDER=routed or exercise nemoclaw-blueprint/router/pool-config.yaml through the host-side Model Router. The current required tests validate adjacent NVIDIA inference paths but not the actual router pool config changed here.
    • Suggested test: Add a model-router E2E that onboards with NEMOCLAW_PROVIDER=routed, starts the host-side router, verifies /v1/models and /v1/chat/completions through https://inference.local from inside the sandbox, and confirms NVIDIA_API_KEY remains outside the sandbox.

Dispatch hint

  • Workflow: nightly-e2e.yaml
  • jobs input: cloud-inference-e2e,inference-routing-e2e

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/validate-blueprint.test.ts`:
- Around line 189-202: The test builds modelsByName from (pool.models ?? [])
which can silently drop duplicate model.name entries and hide missing fields;
modify the test so it first validates pool.models is present and then asserts
uniqueness of model.name (e.g., collect names and fail if any duplicate) and
asserts each model has the required litellm_model field before constructing
modelsByName; after those checks proceed with the existing expectations on
modelsByName and litellmModel to ensure duplicate/missing entries produce
deterministic test failures (referencing modelsByName, pool.models, model.name,
and litellm_model).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b2560d4f-6da8-4e90-83ad-a9e113807bd3

📥 Commits

Reviewing files that changed from the base of the PR and between 456a8c8 and d56db27.

📒 Files selected for processing (2)
  • nemoclaw-blueprint/router/pool-config.yaml
  • test/validate-blueprint.test.ts

Comment on lines +189 to +202
const modelsByName = new Map(
(pool.models ?? []).map((model) => [model.name, model.litellm_model]),
);
expect(modelsByName.get("nemotron-3-nano-reasoning")).toBe(
"openai/nvidia/nemotron-3-nano-30b-a3b",
);
expect(modelsByName.get("nemotron-3-super")).toBe(
"openai/nvidia/nemotron-3-super-120b-a12b",
);
for (const litellmModel of modelsByName.values()) {
expect(litellmModel).not.toMatch(/nvidia\/nvidia\//);
expect(litellmModel).not.toContain("Nemotron-3-Nano-30B-A3B");
expect(litellmModel).not.toContain("nemotron-3-super-v3");
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Harden regression checks against duplicate/missing model entries.

Building modelsByName via Map can mask duplicate name rows, and optional fields make failures less explicit. Add a uniqueness/assertion step before the value checks so this test catches malformed pool entries deterministically.

Suggested patch
   it("regression `#3255`: uses valid LiteLLM NVIDIA model identifiers", () => {
-    const modelsByName = new Map(
-      (pool.models ?? []).map((model) => [model.name, model.litellm_model]),
-    );
+    const models = pool.models ?? [];
+    const names = models.map((model) => model.name);
+    expect(names.every((name) => typeof name === "string" && name.length > 0)).toBe(true);
+    expect(new Set(names).size).toBe(names.length);
+
+    const modelsByName = new Map(models.map((model) => [model.name, model.litellm_model]));
@@
-    for (const litellmModel of modelsByName.values()) {
+    for (const litellmModel of modelsByName.values()) {
+      expect(typeof litellmModel).toBe("string");
       expect(litellmModel).not.toMatch(/nvidia\/nvidia\//);
       expect(litellmModel).not.toContain("Nemotron-3-Nano-30B-A3B");
       expect(litellmModel).not.toContain("nemotron-3-super-v3");
     }
   });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/validate-blueprint.test.ts` around lines 189 - 202, The test builds
modelsByName from (pool.models ?? []) which can silently drop duplicate
model.name entries and hide missing fields; modify the test so it first
validates pool.models is present and then asserts uniqueness of model.name
(e.g., collect names and fail if any duplicate) and asserts each model has the
required litellm_model field before constructing modelsByName; after those
checks proceed with the existing expectations on modelsByName and litellmModel
to ensure duplicate/missing entries produce deterministic test failures
(referencing modelsByName, pool.models, model.name, and litellm_model).

@cv cv added the v0.0.44 label May 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 25932461604
Target ref: d56db27bcb119524e12f18c495eef93e4ae3b15e
Workflow ref: main
Requested jobs: cloud-inference-e2e,inference-routing-e2e
Summary: 2 passed, 0 failed, 0 skipped

Job Result
cloud-inference-e2e ✅ success
inference-routing-e2e ✅ success

@jyaunches
jyaunches merged commit 8eea455 into main May 15, 2026
35 checks passed
@miyoungc miyoungc mentioned this pull request May 16, 2026
12 tasks
@wscurran wscurran added the bug-fix PR fixes a bug or regression label Jun 8, 2026
@jyaunches
jyaunches deleted the issue-3255-model-router-provider-routed-503 branch June 12, 2026 13:53
@wscurran wscurran added NV QA Bugs found by the NVIDIA QA Team UAT Issues flagged for User Acceptance Testing. labels Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix PR fixes a bug or regression NV QA Bugs found by the NVIDIA QA Team UAT Issues flagged for User Acceptance Testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Brev][Onboard] Model Router (Provider Routed) inference broken — TUI returns HTTP 503 after successful onboard

3 participants