Skip to content

feat(inference): add NemoClaw inference get command#3424

Merged
ericksoa merged 6 commits into
mainfrom
ericksoa/inference-get-command
May 13, 2026
Merged

feat(inference): add NemoClaw inference get command#3424
ericksoa merged 6 commits into
mainfrom
ericksoa/inference-get-command

Conversation

@ericksoa
Copy link
Copy Markdown
Contributor

@ericksoa ericksoa commented May 12, 2026

Summary

  • Add nemoclaw inference get [--json] to report the live NemoClaw-managed provider and model.
  • Share the live route lookup with list and status, preferring openshell inference get -g nemoclaw and falling back to legacy openshell inference get for older OpenShell installs.
  • Update the onboarding completion summary and docs to use NemoClaw inference commands instead of showing direct OpenShell inference commands.

Fixes #2633

Validation

  • npm run build:cli
  • npm run typecheck:cli
  • npm run checks
  • npm run docs:strict
  • python3 scripts/docs-to-skills.py docs/ .agents/skills/ --prefix nemoclaw-user --dry-run
  • npm run format:check
  • git diff --check
  • npx vitest run src/lib/inference/live.test.ts src/lib/actions/inference-get.test.ts src/lib/commands/global-oclif-command-adapters.test.ts src/lib/cli/oclif-dispatch.test.ts test/cli.test.ts test/onboard.test.ts test/root-help.test.ts --testTimeout 60000

Summary by CodeRabbit

  • New Features

    • Added CLI command: nemoclaw inference get (optional --json) to show the active inference provider and model.
  • Documentation

    • Updated onboarding, README, quickstart, and reference docs with a “To change settings later” block and examples showing inference get and inference set usage; clarified verification guidance for checking the active route.
  • Tests

    • Added unit and CLI tests validating inference get behavior and updated onboarding/output expectations.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new nemoclaw inference get feature: live gateway probing, a typed action with JSON/text output and error handling, oclif command and global dispatch, dependent wiring, docs/onboarding updates, and unit/integration tests.

Changes

nemoclaw inference get command implementation

Layer / File(s) Summary
Live gateway inference discovery
src/lib/inference/live.ts, src/lib/inference/live.test.ts
getLiveGatewayInference probes OpenShell (-g nemoclaw then fallback), strips ANSI, parses/normalizes provider/model, and returns status/output. Tests verify managed-route preference and fallback.
Action layer: runInferenceGet
src/lib/actions/inference-get.ts, src/lib/actions/inference-get.test.ts
runInferenceGet wraps live probes with DI, InferenceGetOptions, InferenceGetResult, and InferenceGetError; supports --json output and text fallback. Tests cover parsing, JSON output, and error handling.
oclif command definition and CLI adapter
src/lib/commands/inference/get.ts, src/commands/inference/get.ts
Defines inference:get command class with --json flag; adapter exposes nemoclaw inference get usage and invokes runInferenceGet, exiting with InferenceGetError.exitCode on failures.
CLI dispatch routing
src/lib/cli/oclif-dispatch.ts, src/lib/cli/oclif-dispatch.test.ts
Global inference handler recognizes inference get [--json], routes to inference:get, and includes the new usage in unsupported-subcommand messages.
Dependent command integration
src/lib/list-command-deps.ts, src/lib/status-command-deps.ts, src/lib/commands/global-oclif-command-adapters.test.ts
List/status wiring now uses getLiveGatewayInference(...).inference with probe timeout; adapter tests mock runInferenceGet and verify flag mapping.
Documentation and reference
docs/reference/commands.md, docs/inference/switch-inference-providers.md, docs/reference/cli-selection-guide.md, README.md, docs/get-started/quickstart.md
Adds nemoclaw inference get reference and examples, updates provider-switch guidance to use inference get before set, and updates onboarding/quickstart/README snippets.
Help text and onboarding
src/lib/actions/root-help.ts, src/lib/onboard.ts
Root help adds a "Check inference route" bullet pointing to inference get; onboarding post-install snippet now shows inference get and reformats the inference set sample.
End-to-end validation
test/cli.test.ts, test/onboard.test.ts, src/lib/cli/command-registry.test.ts
Adds CLI test stubbing openshell to verify text and --json outputs, onboarding test asserting the get/set example presence and absence of openshell commands, and updates command-registry tests for command counts.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I hopped a CLI path, soft and spry,
To fetch the model beneath the sky,
JSON or plain, the probe I sing,
Docs and tests tied to the string,
A tiny rabbit gives a wink!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% 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 PR title clearly and accurately summarizes the main change: adding a new NemoClaw inference get command to the codebase.
Linked Issues check ✅ Passed The PR implements the core requirement from issue #2633 by adding the nemoclaw inference get command that returns the current live provider and model, matching the acceptance criteria.
Out of Scope Changes check ✅ Passed All changes directly support implementing the nemoclaw inference get command and updating related documentation and dependencies; no unrelated changes 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 ericksoa/inference-get-command

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/lib/actions/root-help.ts`:
- Around line 76-78: The help text currently hardcodes "nemoclaw" in the
reconfiguration hints; update those template strings to use the CLI_NAME
constant (e.g., `${CLI_NAME}`) so alias entrypoints are reflected correctly.
Locate the help string entries in root-help.ts (the lines constructing the
inference hints) and replace the literal "nemoclaw" tokens with CLI_NAME
interpolations, ensuring CLI_NAME is in scope/imported where these strings are
built.

In `@src/lib/onboard.ts`:
- Around line 10695-10698: The two adjacent console.log calls that print the CLI
usage (the lines that reference cliName() and sandboxName and show "inference
get" and the wrapped "inference set ..." usage) add a net +1 line; collapse them
into a single console.log (or remove a nearby redundant blank/comment line) so
the output remains identical but the file line count is reduced by one—locate
the console.log calls referencing cliName() and sandboxName and combine the
messages into one call (or delete an adjacent nonfunctional blank/comment) to
meet the budget.
🪄 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: b0a09d34-f6b5-4e0c-8829-348b796733c8

📥 Commits

Reviewing files that changed from the base of the PR and between fc4a227 and 88b3ae6.

📒 Files selected for processing (20)
  • README.md
  • docs/get-started/quickstart.md
  • docs/inference/switch-inference-providers.md
  • docs/reference/cli-selection-guide.md
  • docs/reference/commands.md
  • src/commands/inference/get.ts
  • src/lib/actions/inference-get.test.ts
  • src/lib/actions/inference-get.ts
  • src/lib/actions/root-help.ts
  • src/lib/cli/oclif-dispatch.test.ts
  • src/lib/cli/oclif-dispatch.ts
  • src/lib/commands/global-oclif-command-adapters.test.ts
  • src/lib/commands/inference/get.ts
  • src/lib/inference/live.test.ts
  • src/lib/inference/live.ts
  • src/lib/list-command-deps.ts
  • src/lib/onboard.ts
  • src/lib/status-command-deps.ts
  • test/cli.test.ts
  • test/onboard.test.ts

Comment thread src/lib/actions/root-help.ts Outdated
Comment thread src/lib/onboard.ts Outdated
@ericksoa ericksoa added the v0.0.40 Release target label May 12, 2026
@ericksoa ericksoa changed the title Add NemoClaw inference get command feat(inference): add NemoClaw inference get command May 12, 2026
@ericksoa ericksoa requested a review from cv May 12, 2026 23:09
@github-actions
Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: None
Optional E2E: None

Workflow run

Full advisor summary

Pi Semantic E2E Advisor

Failed: pi exited with status 1; see /home/runner/work/NemoClaw/NemoClaw/artifacts/e2e-advisor/e2e-advisor-pi-raw-output.txt

@ericksoa ericksoa merged commit 81ae477 into main May 13, 2026
27 of 28 checks passed
@ericksoa ericksoa deleted the ericksoa/inference-get-command branch May 13, 2026 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v0.0.40 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[All Platforms] Add nemoclaw inference CLI wrapper for runtime provider/model switching

2 participants