Skip to content

fix(cli): surface local inference health in status - #1756

Merged
cv merged 2 commits into
mainfrom
fix/995-status-local-inference-health
Apr 10, 2026
Merged

cv merged 2 commits into
mainfrom
fix/995-status-local-inference-health

Conversation

@cv

@cv cv commented Apr 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Add a host-side local inference health probe to nemoclaw <name> status so users get a clear warning when Ollama or vLLM is down instead of only discovering the failure later through a silent inference.local request inside the sandbox.

Related Issue

Fixes #995.

Changes

  • add a lightweight localhost health probe helper for local inference providers
  • show Inference: healthy|unreachable in nemoclaw <name> status for local providers
  • print actionable Ollama/vLLM remediation text when the host-side probe fails
  • add unit coverage for the new probe helper and CLI coverage for the Ollama-down status path

Type of Change

  • Code change for a new feature, bug fix, or refactor.
  • Code change with doc updates.
  • Doc only. Prose changes without code sample modifications.
  • Doc only. Includes code sample changes.

Testing

  • npx prek run --all-files passes (or equivalently make check).
  • npm test passes.
  • make docs builds without warnings. (for doc-only changes)

Checklist

General

Code Changes

  • Formatters applied — npx prek run --all-files auto-fixes formatting (or make format for targeted runs).
  • Tests added or updated for new or changed behavior.
  • No secrets, API keys, or credentials committed.
  • Doc pages updated for any user-facing behavior changes (new commands, changed defaults, new features, bug fixes that contradict existing docs).

Doc Changes

  • Follows the style guide. Try running the nemoclaw-contributor-update-docs agent skill to draft changes while complying with the style guide. For example, prompt your agent with "/nemoclaw-contributor-update-docs catch up the docs for the new changes I made in this PR."
  • New pages include SPDX license header and frontmatter, if creating a new page.
  • Cross-references and links verified.

Signed-off-by: Carlos Villela [email protected]

Summary by CodeRabbit

  • New Features

    • Status command now shows local inference health (healthy vs unreachable) for Ollama and vLLM, including probed endpoint and remediation hints.
  • Tests

    • Added coverage for local provider health probing: successful probes, unreachable hosts with guidance, and unsupported-provider behavior.
  • Documentation

    • Updated status, troubleshooting, monitoring, and user guidance to describe the new local inference health checks and recommended recovery steps.

@coderabbitai

coderabbitai Bot commented Apr 10, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Added health-probing for local inference backends (Ollama, vLLM): new APIs to map provider → health endpoint and run a curl-based probe; tests, CLI integration, and documentation updated to surface probe results (healthy vs unreachable) and remediation hints in sandbox status output.

Changes

Cohort / File(s) Summary
Local inference core
src/lib/local-inference.ts
New types and exports: LocalProviderHealthStatus, LocalProviderHealthProbeOptions, getLocalProviderHealthEndpoint(), probeLocalProviderHealth(). Updated getLocalProviderLabel() to return human-readable labels. Uses runCurlProbe (./http-probe) and formats probe detail text.
Local inference tests
src/lib/local-inference.test.ts
Added tests for endpoint mapping and labels for ollama-local/vllm-local; added success/failure/null cases for probeLocalProviderHealth(), including unreachable-host messaging and probe detail assertions.
CLI integration & tests
src/nemoclaw.ts, test/cli.test.ts
nemoclaw status now calls probeLocalProviderHealth() for local providers and prints an Inference line with health, endpoint, and detail on failure. New CLI test simulates an unreachable Ollama endpoint and asserts the unreachable + remediation output.
Docs & help text
.agents/skills/.../SKILL.md, .agents/skills/.../references/*.md, docs/.../*.md
Documentation and troubleshooting updated to document that nemoclaw <name> status probes host-side endpoints for Ollama/vLLM and reports Inference: unreachable with the probed URL and restart guidance.

Sequence Diagram

sequenceDiagram
    participant CLI as nemoclaw (status)
    participant Probe as probeLocalProviderHealth()
    participant Curl as runCurlProbeImpl()
    participant Host as Local Provider (Ollama / vLLM)

    CLI->>Probe: probeLocalProviderHealth(provider)
    Probe->>Probe: getLocalProviderHealthEndpoint(provider)
    Probe->>Curl: runCurlProbeImpl(curl argv)
    Curl->>Host: HTTP GET /api/tags or /v1/models
    Host-->>Curl: (response / connection refused / timeout)
    Curl-->>Probe: CurlProbeResult { ok, httpStatus, stdout, stderr }
    Probe->>Probe: buildLocalProviderProbeDetail(result, providerLabel, endpoint)
    Probe-->>CLI: LocalProviderHealthStatus { ok, providerLabel, endpoint, detail }
    CLI->>CLI: print Inference status line (healthy/unreachable + detail)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

Poem

🐰 Hop-hop, I sniff the host and peep,
I tap the tags and models while you sleep,
If Ollama naps or vLLM is mute,
I blink an "unreachable" and suggest a reboot,
Little rabbit hops—status tidy and neat.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding local inference health probing that surfaces in the status command output.
Linked Issues check ✅ Passed The PR directly addresses issue #995 by implementing host-side health probing for local Ollama/vLLM providers, displaying clear status messages when backends are unreachable.
Out of Scope Changes check ✅ Passed All changes are focused on adding local inference health probing and integrating it into the status command; no unrelated modifications detected.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/995-status-local-inference-health

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

@cv cv added the v0.0.13 label Apr 10, 2026

@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: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.agents/skills/nemoclaw-user-monitor-sandbox/SKILL.md:
- Line 22: Take the manual edits made to the skill markdown (e.g., the "Run the
status command to view the sandbox state, gateway health, and active inference
configuration:" line and the other edited sections) out of the generated
SKILL.md and instead apply those content changes to the canonical docs source
used to generate skills; then run the skill-generation step to regenerate the
SKILL.md artifact so the file is back to its generated state and the change is
tracked in docs rather than edited in-place.

In @.agents/skills/nemoclaw-user-reference/references/commands.md:
- Around line 147-148: This file is generated and must not be edited directly;
revert changes in .agents/skills/nemoclaw-user-reference/references/commands.md
and instead update the canonical docs source under docs/ (the source that feeds
skill generation), then run the docs-to-skills regeneration step (the project’s
doc build or skill generation script) so the updated content flows into the
generated .agents/skills output; reference the generated file name
(.agents/skills/nemoclaw-user-reference/references/commands.md) when locating
the regression and ensure edits are applied only in docs/ before regenerating.
🪄 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: Pro

Run ID: 0c279c55-01d2-4da8-a6ff-7be7e7b13a6d

📥 Commits

Reviewing files that changed from the base of the PR and between d2356fe and c52e7c3.

📒 Files selected for processing (6)
  • .agents/skills/nemoclaw-user-monitor-sandbox/SKILL.md
  • .agents/skills/nemoclaw-user-reference/references/commands.md
  • .agents/skills/nemoclaw-user-reference/references/troubleshooting.md
  • docs/monitoring/monitor-sandbox-activity.md
  • docs/reference/commands.md
  • docs/reference/troubleshooting.md
✅ Files skipped from review due to trivial changes (2)
  • .agents/skills/nemoclaw-user-reference/references/troubleshooting.md
  • docs/reference/commands.md

@cv
cv requested review from brandonpelfrey and miyoungc April 10, 2026 18:47
@cv
cv merged commit 33ea1ef into main Apr 10, 2026
15 checks passed
ericksoa pushed a commit to cheese-head/NemoClaw that referenced this pull request Apr 14, 2026
## Summary
Add a host-side local inference health probe to `nemoclaw <name> status`
so users get a clear warning when Ollama or vLLM is down instead of only
discovering the failure later through a silent `inference.local` request
inside the sandbox.

## Related Issue
Fixes NVIDIA#995.

## Changes
- add a lightweight localhost health probe helper for local inference
providers
- show `Inference: healthy|unreachable` in `nemoclaw <name> status` for
local providers
- print actionable Ollama/vLLM remediation text when the host-side probe
fails
- add unit coverage for the new probe helper and CLI coverage for the
Ollama-down status path

## Type of Change
- [x] Code change for a new feature, bug fix, or refactor.
- [ ] Code change with doc updates.
- [ ] Doc only. Prose changes without code sample modifications.
- [ ] Doc only. Includes code sample changes.

## Testing
- [ ] `npx prek run --all-files` passes (or equivalently `make check`).
- [x] `npm test` passes.
- [ ] `make docs` builds without warnings. (for doc-only changes)

## Checklist

### General

- [x] I have read and followed the [contributing
guide](https://github.com/NVIDIA/NemoClaw/blob/main/CONTRIBUTING.md).
- [ ] I have read and followed the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md).
(for doc-only changes)

### Code Changes
- [x] Formatters applied — `npx prek run --all-files` auto-fixes
formatting (or `make format` for targeted runs).
- [x] Tests added or updated for new or changed behavior.
- [x] No secrets, API keys, or credentials committed.
- [ ] Doc pages updated for any user-facing behavior changes (new
commands, changed defaults, new features, bug fixes that contradict
existing docs).

### Doc Changes
- [ ] Follows the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md).
Try running the `nemoclaw-contributor-update-docs` agent skill to draft
changes while complying with the style guide. For example, prompt your
agent with "`/nemoclaw-contributor-update-docs` catch up the docs for
the new changes I made in this PR."
- [ ] New pages include SPDX license header and frontmatter, if creating
a new page.
- [ ] Cross-references and links verified.

---
Signed-off-by: Carlos Villela <[email protected]>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Status command now shows local inference health (healthy vs
unreachable) for Ollama and vLLM, including probed endpoint and
remediation hints.

* **Tests**
* Added coverage for local provider health probing: successful probes,
unreachable hosts with guidance, and unsupported-provider behavior.

* **Documentation**
* Updated status, troubleshooting, monitoring, and user guidance to
describe the new local inference health checks and recommended recovery
steps.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@cv
cv deleted the fix/995-status-local-inference-health branch May 27, 2026 21:16
@wscurran wscurran added the bug-fix PR fixes a bug or regression label Jun 8, 2026
@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.

[MacOS] No clear error message when Ollama backend is stopped

3 participants