Skip to content

fix(plugin): show actual configured model in banner (Closes #24) - #1816

Closed
WuKongAI-CMU wants to merge 1 commit into
NVIDIA:mainfrom
WuKongAI-CMU:fix/dynamic-model-banner-v2
Closed

fix(plugin): show actual configured model in banner (Closes #24)#1816
WuKongAI-CMU wants to merge 1 commit into
NVIDIA:mainfrom
WuKongAI-CMU:fix/dynamic-model-banner-v2

Conversation

@WuKongAI-CMU

@WuKongAI-CMU WuKongAI-CMU commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Summary

When the onboard config file is not available (e.g. when running inside the sandbox), the plugin banner in `nemoclaw/src/index.ts` hardcodes the model as `nvidia/nemotron-3-super-120b-a12b` and the endpoint as `build.nvidia.com` regardless of what is actually configured in OpenShell.

This PR queries the live OpenShell inference state via `openshell inference get --json` as a fallback before resorting to hardcoded defaults. The probe has a 3-second timeout and falls back cleanly to the existing defaults if anything goes wrong.

Closes #24.

Changes

  • `nemoclaw/src/index.ts` — add `probeOpenShellInference()` helper and wire it into banner resolution after onboard config lookup, before hardcoded defaults

Test plan

  • Minimal diff, existing defaults preserved as final fallback
  • 3s timeout prevents banner from hanging on a slow/broken openshell binary
  • No new runtime dependencies (uses stdlib `node:child_process`)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added automatic detection of inference configuration from OpenShell. The system now prioritizes onboard configuration settings, attempts auto-detection from OpenShell, and uses default values as a final fallback.

When the onboard config file is not available (e.g. inside the sandbox),
the plugin banner hardcodes the model as nvidia/nemotron-3-super-120b-a12b
and the endpoint as build.nvidia.com regardless of what is actually
configured in OpenShell.

Query the live OpenShell inference state via `openshell inference get
--json` as a fallback before resorting to hardcoded defaults. The probe
has a 3-second timeout and falls back to the existing defaults if
anything goes wrong.

Closes NVIDIA#24
@github-actions

Copy link
Copy Markdown
Contributor

This repository limits contributors to 10 open pull requests. Please close or merge existing PRs before opening new ones.

@github-actions github-actions Bot closed this Apr 13, 2026
@coderabbitai

coderabbitai Bot commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2f3c8145-600b-4391-ba43-c75adb6ad7ca

📥 Commits

Reviewing files that changed from the base of the PR and between d4aac4c and dbd9b9f.

📒 Files selected for processing (1)
  • nemoclaw/src/index.ts

📝 Walkthrough

Walkthrough

Added a probeOpenShellInference() helper function that executes openshell inference get --json to detect the actual configured inference provider and model. Updated register() to prioritize onboard configuration, fall back to probed values, and only use hardcoded defaults as a last resort.

Changes

Cohort / File(s) Summary
Dynamic Inference Provider Detection
nemoclaw/src/index.ts
Introduced probeOpenShellInference() helper that invokes openshell inference get --json via execFileSync, parses the JSON output, and returns endpoint and model values. Modified register() initialization logic to follow a fallback chain: prefer config-derived values, probe openshell if needed, and use hardcoded defaults only as a final fallback. Added node:child_process import.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A rabbit hops through code so bright,
No more defaults baked too tight!
We probe the shell, detect what's real,
The truthful model we now reveal! 🔍

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

cv added a commit that referenced this pull request Apr 21, 2026
## Summary
When the onboard config file is not available (e.g. when running inside
the sandbox), the plugin banner in \`nemoclaw/src/index.ts\` hardcodes
the model as \`nvidia/nemotron-3-super-120b-a12b\` and the endpoint as
\`build.nvidia.com\` regardless of what is actually configured in
OpenShell.

This PR queries the live OpenShell inference state via \`openshell
inference get --json\` as a fallback before resorting to hardcoded
defaults. The probe has a 3-second timeout and falls back cleanly to the
existing defaults if anything goes wrong.

Closes #24.

## Changes
- \`nemoclaw/src/index.ts\` — add \`probeOpenShellInference()\` helper
and wire it into banner resolution after onboard config lookup, before
hardcoded defaults

## Test plan
- [x] Minimal diff, existing defaults preserved as final fallback
- [x] 3s timeout prevents banner from hanging on a slow/broken openshell
binary
- [x] No new runtime dependencies (uses stdlib \`node:child_process\`)

(Resubmitting — prior PR #1816 was auto-closed by the 10-PR-cap check
when our open PR count briefly exceeded the limit; we're now under the
cap.)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

* **Bug Fixes**
* Improved configuration resolution for model provider, endpoint, and
model: the app now prefers onboard settings, probes live inference state
to fill missing values, and falls back to defaults for more reliable
initialization and registration.
* **Tests**
* Added test coverage verifying fallback to probed inference values and
confirming probe details are logged during registration.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Intern Dev <dev@wukongai.io>

---------

Co-authored-by: Intern Dev <dev@wukongai.io>
Co-authored-by: Carlos Villela <cvillela@nvidia.com>
@wscurran wscurran added the bug-fix PR fixes a bug or regression label Jun 8, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix hardcoded model identity shown by the in-sandbox plugin/banner so it reflects the actual configured inference provider

2 participants