Skip to content

fix(inference): preserve Local NIM shared route during native migration - #13122

Closed
prekshivyas wants to merge 16 commits into
codex/12975-openclaw-dcode-nativefrom
fix/13116-local-nim-routing
Closed

prekshivyas wants to merge 16 commits into
codex/12975-openclaw-dcode-nativefrom
fix/13116-local-nim-routing

Conversation

@prekshivyas

@prekshivyas prekshivyas commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Outcome

Preserve experimental Local NVIDIA NIM on its existing inference.local route while supported local providers migrate to native attachments. Standalone vLLM remains eligible for native attachment. Local NIM is identified by its owned nimContainer marker.

Addresses #13116. This branch currently depends on #12977. The accepted scope decision keeps native NIM qualification separate.

Changes

  • Carry Local NIM identity through provider selection, route reservation, policy setup, resume, rebuild, deployment verification, and inference set.
  • Keep older Local NIM sandboxes on the shared route while retaining native attachment checks for standalone vLLM and other supported local providers.
  • Limit the Local NIM attachment exclusion to owned vllm-local selections; reject stale attachments and preserve managed llama.cpp attachments when its recorded receipt binds the published route.
  • Update the platform matrix and routing documentation, including generated pages, to describe the Local NIM exception.
  • Add regression tests for Local NIM versus standalone vLLM, shared-route policy proof, stale attachment handling, and inherited feat(inference): attach native local providers for OpenClaw and DCode #12977 managed llama.cpp verification.

Verification

Review notes

This PR targets #12977's feature branch so the review diff stays limited to #13116. The maintainer's four-slice amendment supersedes #12977's OpenClaw-plus-DCode delivery plan and accepts DCode first in #13197 / PR #13203. This stacked base needs a disposition before this PR can be approved. Local NIM native provider support and GPU/NGC qualification remain outside this PR. Human approval remains pending.


Signed-off-by: Prekshi Vyas [email protected]

@prekshivyas prekshivyas self-assigned this Oct 13, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 13, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/NemoClaw/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 08afea57-28d3-4039-ab98-3c4ebee91791

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions

Copy link
Copy Markdown
Contributor

@github-code-quality

github-code-quality Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage/plugin

codex/12975-openclaw... 63002cd fix/13116-local-nim-... b744f43 +/-
96% 97% +1%
View coverage of the 8 most impacted files.
File codex/12975-openclaw... 63002cd fix/13116-local-nim-... b744f43 +/-
nemoclaw/src/onboard/config.ts 98% 96% -2%
nemoclaw/src/index.ts 94% 93% -1%
nemoclaw/src/bl...print/runner.ts 95% 95% 0%
nemoclaw/src/bl...ime-identity.ts 97% 97% 0%
nemoclaw/src/bl...t-management.ts 100% 100% 0%
nemoclaw/src/co.../config-show.ts 100% 100% 0%
nemoclaw/src/commands/slash.ts 100% 100% 0%
nemoclaw/src/on...native-route.ts 0% 100% +100%

TypeScript / code-coverage/cli

codex/12975-openclaw... 63002cd fix/13116-local-nim-... b744f43 +/-
84% 86% +2%
View coverage of the 10 most impacted files.
File codex/12975-openclaw... 63002cd fix/13116-local-nim-... b744f43 +/-
src/lib/onboard.ts 62% 47% -15%
src/lib/actions...ess-recovery.ts 65% 78% +13%
src/lib/inferen...ollama/proxy.ts 41% 61% +20%
src/lib/onboard.../application.ts 55% 84% +29%
src/lib/domain/...y/dimensions.ts 0% 71% +71%
src/lib/inferen...er/lifecycle.ts 0% 72% +72%
src/lib/actions...ry/operation.ts 0% 76% +76%
src/lib/actions...try/snapshot.ts 0% 78% +78%
src/lib/inferen...ovider/index.ts 0% 88% +88%
src/lib/onboard...ternal-image.ts 0% 91% +91%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 15, 2026 00:34 UTC

@prekshivyas
prekshivyas changed the base branch from main to codex/12975-openclaw-dcode-native October 14, 2026 02:26
@copy-pr-bot

copy-pr-bot Bot commented Oct 14, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@prekshivyas
prekshivyas marked this pull request as ready for review October 14, 2026 20:44
…e' into fix/13116-local-nim-routing

Signed-off-by: Prekshi Vyas <[email protected]>

# Conflicts:
#	src/lib/onboard/sandbox-registration.test.ts
#	src/lib/onboard/sandbox-registration.ts
#	src/lib/verify-deployment.ts
…e' into fix/13116-local-nim-routing

Signed-off-by: Prekshi Vyas <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit b744f43. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

Request review only when Require no Advisor blockers is green.

All previous runs

prekshivyas added a commit that referenced this pull request Oct 16, 2026
## Outcome

Keep experimental Local NVIDIA NIM on its existing `inference.local`
route while Deep Agents Code uses native attachments for standalone
local providers. Local NIM and standalone vLLM share `vllm-local`, so
the owned `nimContainer` marker determines which route applies.

## Reason

The accepted DCode-first native-local slice in #13197 would otherwise
treat an owned Local NIM selection or an older NIM sandbox as standalone
vLLM and require a native attachment that NIM does not have.

### Related issues

Fixes #13116. Stacked on #13203, which delivers the DCode-first
native-local slice. This replaces #13122, whose #12977 base contains the
superseded OpenClaw-inclusive scope.

## Changes

- Carry the Local NIM identity from selection through route
compatibility, setup, policy smoke, registration, reservation, and
deployment verification. The selection marker is needed before the NIM
container starts; the persisted `nimContainer` handles resume and
rebuild.
- Omit stale native vLLM attachments for an owned NIM route while
retaining standalone vLLM and managed llama.cpp attachment behavior.
Count owned NIM registry rows as shared-route peers even if a stale
attachment remains.
- Add regressions for NIM versus standalone vLLM, selected-agent
routing, shared-route policy proof, registration, stale attachments,
resume, managed startup, and verification.
- Carry the owned NIM selection into managed startup so it keeps the
shared endpoint without demanding a native attachment. Clarify DCode
routing and recovery documentation for that exception, including the
generated platform support claims, routing guide, local-server
comparison, quickstart, and sandbox-state reference.

## Verification

- Initial eight affected CLI test files: 146 tests passed.
- Repair-focused route and resume tests: 43 passed; adjacent registry,
selected-agent, and rebuild tests: 18 passed; managed vLLM readiness
tests: 10 passed. The managed-startup repair passed 76 focused tests
across four files.
- `npm run build:cli` and `npm run docs` passed. Generated Deep Agents
Code variants were inspected.
- Commit hooks and pre-push publication validation, including TypeScript
CLI, passed on `3b924cad250174ea9dc35bbd7a85d7094fa0065`; the docs
commits `545aaf755fe586571455f6a0442ef79d8c274e38` and
`1bd5e09a2fab14cdb32dcd85c2ffa164f48862f9` passed matrix sync where
applicable, docs validation, commit hooks, and pre-push publication
validation. The managed-startup repair
`7bfe797278d24810ce2e65a014112b5df011a801` passed its focused tests, CLI
build, commit hooks, and pre-push TypeScript and publication validation.
After merging parent #13203 at `26474e1f`, 105 focused tests across five
files passed; merge commit `af029a04` passed commit hooks and pre-push
publication validation and TypeScript CLI. After merging the newer
parent `08e5c4bd`, 165 focused tests across seven files and `npm run
docs` passed; merge commit `56be19d4` passed commit hooks, pre-push
publication validation, and TypeScript CLI. Reference-documentation
repairs `3b03be0f` and `7eebf9de` passed `npm run docs`, commit hooks,
and pre-push publication validation. NIM retry repair `c1015ddf` passed
12 focused tests, CLI build, commit hooks, pre-push publication
validation, and CLI typecheck. Health-failure repair `011d9b58` passed
45 focused tests, CLI build, commit hooks, pre-push publication
validation, and CLI typecheck. Integration-test alignment `19fb8582` and
caller-level proof `e18ff696` passed all four NIM memory-selection
tests, commit hooks, pre-push publication validation, and CLI typecheck.

## Review notes

This changes sensitive inference and onboarding paths. The first
exact-head Advisor review found shared-route, documentation, and
resume-regression gaps; commit `3b924cad` addresses those. A second
review found an ecosystem documentation claim; commit `545aaf75`
corrected it. A third review found a routing-guide claim; commit
`1bd5e09a` corrects it and aligned related guide pages. A fourth review
found an omitted managed-startup handoff; commit `7bfe7972` fixes it and
adds a regression test. Advisor cleared `7bfe7972` and the parent-merge
head `af029a04`. A second exact-head run on `af029a04` identified three
stale reference-page route descriptions; `3b03be0f` corrects them and
clarifies that `inference set` does not create native local attachments.
The next run identified matching architecture and operational-page
claims; `7eebf9de` aligns those pages. Advisor cleared that
documentation repair. The latest merge incorporates parent `08e5c4bd`
and resolves its overlapping reference edits. Advisor then found a NIM
retry path that could clear the ownership marker while the container
remained; `c1015ddf` removes the owned container before clearing that
marker and adds a retry regression. Advisor then identified a silent
cloud switch after failed NIM health check; `011d9b58` stops onboarding
after cleaning up the owned container and also removes the silent cloud
switch when no NIM model fits. The first CI run on `011d9b58` found one
stale integration test expecting cloud fallback; `19fb8582` updates it
to require cleanup and a visible stop. Advisor cleared `011d9b58`. A
verification specialist requested explicit caller-level proof;
`e18ff696` now checks that the production handler cleans up the
container returned by startup, throws, and skips model adoption and
endpoint probing. Advisor then identified one stale NIM recovery
sentence; `371d919b` aligns it with stop-after-cleanup behavior and
passed `npm run docs`, commit hooks, and pre-push publication
validation. Advisor cleared `371d919b`, and full required CI passed.
Parent #13203 advanced to `5111b16d`; merge commit `4bd23472` resolves
its documentation overlap, with 164 focused tests across nine files, CLI
build, docs validation, commit hooks, and pre-push publication
validation passing. The exact-head Advisor blocker gate, required CI,
managed-image and rootless runtime qualification, and self-hosted E2E
all passed on `4bd23472`. Parent #13203 advanced again to `b3f89d24`;
merge commit `ac009c9f` resolves the overlapping reference edits and
passed 235 focused tests across ten files, CLI build, docs validation,
commit hooks, and pre-push publication validation. Exact-head Advisor on
`ac009c9f` identified a caller-level health-failure test gap. Commit
`5ca0cd38` adds the test against the production handler, proving
container cleanup and a stop before model adoption. The focused tests,
CLI build, TypeScript check, commit hooks, and pre-push publication
validation pass; Advisor on `5ca0cd38` cleared the health-failure test
but found a stale native attachment in the Local NIM rebuild target.
Commit `3521d195` makes the owned NIM marker take precedence, with a
regression test; 41 relevant tests, TypeScript, commit hooks, and
pre-push validation pass. The exact-head Advisor rerun on `3521d195`
cleared the rebuild fix but found a stale managed NIM health-wait
timeout in troubleshooting. Commit `2776deda` corrects the documented
default to 20 minutes (1,200 seconds); the NIM test suite, docs build,
commit hooks, and pre-push validation pass. Advisor on `2776deda` found
that a failed post-start identity revalidation could prevent owned NIM
cleanup. Commit `9d961fd2` captures the exact Docker container ID at
startup and removes that ID after a failed health wait, with tests for
cleanup and retained recovery state if removal fails. Focused tests,
TypeScript, commit hooks, and pre-push validation pass. Advisor cleared
`9d961fd2`; CI shard 10 then found child-process NIM fixtures still
returning a string instead of the new startup receipt. Commit `060a0e70`
updates the fixtures and cleanup assertions; the affected tests,
TypeScript, commit hooks, and pre-push validation pass. The exact-head
Advisor on `060a0e70` found that an invalid Docker launch receipt could
leave a credential-bearing NIM container running. Commit `5ad4b3a5`
removes the named container before reporting receipt failure and reports
cleanup failure when removal fails. The focused NIM tests, full local PR
validation, commit hooks, and pre-push validation pass on `5ad4b3a5`;
exact-head CI and Advisor are running. The earlier managed-image retry
passed its image build and direct startup on `060a0e70`; its all-agent
activation jobs were still running when `5ad4b3a5` was pushed. Parent
#13203 remains draft; it must merge before this stacked PR can land.
Native NIM migration and GPU/NGC qualification remain separate.

## Current status (2026-10-15)

The latest child head is `ebf136b2964a4c698adb64c4d99fb5aa67b4cfef`,
mergeable on parent #13203 head
`81ee22de5a1fd0071e252b6fa032b720286182bc`. It preserves owned Local NIM
on `inference.local` while standalone vLLM remains eligible for the Deep
Agents native local route. The earlier fixture and integration-test
repairs are included in this head.

All 63 exact-head PR checks completed successfully, including CLI tests,
static checks, amd64 and arm64 activation, rootless Podman activation,
and the [llama.cpp generic NVIDIA GPU live
test](https://github.com/NVIDIA/NemoClaw/actions/runs/38809809000). The
[exact-head Advisor
run](https://github.com/NVIDIA/NemoClaw/actions/runs/38812422037)
completed all nine specialists with clear finding ledgers and a passing
blocker gate. CodeRabbit skips automatic reviews on this nondefault
target branch. No review threads remain open. The branch is ready for
independent review; parent #13203 remains open and draft and must merge
before this stacked PR can land. Native NIM migration and NIM GPU/NGC
qualification remain separate work.

---
Signed-off-by: Prekshi Vyas <[email protected]>

---------

Signed-off-by: Prekshi Vyas <[email protected]>
@wscurran wscurran added area: providers Inference provider integrations and provider behavior area: security Security controls, permissions, secrets, or hardening labels Oct 22, 2026
@wscurran wscurran added bug-fix PR fixes a bug or regression integration: dcode LangChain Deep Code integration behavior integration: openclaw OpenClaw integration behavior provider: nvidia NVIDIA inference endpoint, NIM, or NVIDIA provider behavior labels Oct 22, 2026
@cv
cv deleted the fix/13116-local-nim-routing branch November 21, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: providers Inference provider integrations and provider behavior area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression integration: dcode LangChain Deep Code integration behavior integration: openclaw OpenClaw integration behavior provider: nvidia NVIDIA inference endpoint, NIM, or NVIDIA provider behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decide and preserve Local NVIDIA NIM routing through native inference migration

2 participants