Skip to content

fix(blueprint): disable native tool search for Nemotron managed inference#4800

Merged
cv merged 1 commit into
mainfrom
fix/4780-nemotron-disable-native-tool-search
Jun 5, 2026
Merged

fix(blueprint): disable native tool search for Nemotron managed inference#4800
cv merged 1 commit into
mainfrom
fix/4780-nemotron-disable-native-tool-search

Conversation

@jason-ma-nv

@jason-ma-nv jason-ma-nv commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

On the NemoClaw managed inference.local route, nvidia/nemotron-3-super-120b-a12b floods otherwise-successful agent runs with repeated [tools] tool_search_code failed errors because it generates invalid JavaScript for OpenClaw's native code-based tool search. This adds a model-specific-setup manifest that disables native tool search for that route, routing the model back to the structured tool-calling surface it handles correctly.

Related Issue

Fixes #4780

Changes

  • Add nemoclaw-blueprint/model-specific-setup/openclaw/nemotron-3-super-120b-managed-inference.json setting effects.openclawTools.toolSearch: false for the Nemotron managed inference route (providerKey: inference, inferenceApi: openai-completions, baseUrl: https://inference.local/v1), mirroring the existing kimi-k2.6-managed-inference.json precedent.
  • Add regression tests in test/generate-openclaw-config.test.ts: one asserting tools.toolSearch === false for the Nemotron managed route, and one asserting non-matching routes (different model, provider, API, or base URL) keep toolSearch === true.

Root cause

scripts/generate-openclaw-config.mts defaults tools.toolSearch: true, which enables OpenClaw's native code-based tool_search_code. That surface requires the model to emit JS calling openclaw.tools.search/describe/call. Nemotron emits invalid JS for it (CommonJS require, search called with { query } instead of a string, bad describe/call ids), producing the noisy failures. The openclaw.tools.* API is OpenClaw-native, and NemoClaw's own compact-catalog patch intentionally skips when native tool search is present, so the toolSearch config flag is the correct NemoClaw-side lever — the same one used for Kimi K2.6.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Verification

  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Verification notes:

  • The commit's pre-commit hook passed. prek run on the changed files passed; I did not record a clean prek run --all-files because that hook set scans pre-existing untracked worktree directories in my local checkout that are unrelated to this change.
  • The suites that exercise this change all pass locally: generate-openclaw-config.test.ts (incl. the two new [Ubuntu 24.04][Agent&Skills] tool_search_code generates invalid JS and logs repeated errors during successful agent runs #4780 tests), validate-config-schemas.test.ts (validates the new manifest against schema.json), generate-hermes-config.test.ts, and openclaw-tool-catalog-patch.test.ts.
  • The full npm test shows 17 pre-existing, environment-dependent failures unrelated to this change (blocked network egress to api.telegram.org/Slack/OpenAI, no running Docker/gateway, and an unbuilt nemoclaw/dist for ssrf-parity.test.ts). A declarative JSON manifest plus a config-generation test cannot affect those paths. CI should run them in a complete environment.

Signed-off-by: Jason Ma jama@nvidia.com

…ence

OpenClaw's native code-based tool search (tool_search_code) requires the
model to emit JavaScript that calls openclaw.tools.search/describe/call.
nvidia/nemotron-3-super-120b-a12b generates invalid JS for this surface
(CommonJS require, search called with an object instead of a string, bad
describe/call ids), flooding otherwise-successful agent runs with repeated
"[tools] tool_search_code failed" errors.

Add a model-specific-setup manifest that sets effects.openclawTools.toolSearch
to false for the Nemotron managed inference.local route, mirroring the
existing kimi-k2.6 precedent, so the model uses the structured tool-calling
surface it handles correctly.

Fixes #4780

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jason-ma-nv jason-ma-nv self-assigned this Jun 5, 2026
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds a configuration rule and tests to disable OpenClaw's native code-based tool search for Nemotron 3 Super 120B when accessed via the managed inference endpoint, preventing invalid JavaScript generation during agent execution.

Changes

Nemotron managed inference tool search configuration

Layer / File(s) Summary
Tool search disable configuration and validation
nemoclaw-blueprint/model-specific-setup/openclaw/nemotron-3-super-120b-managed-inference.json, test/generate-openclaw-config.test.ts
New JSON configuration rule disables openclawTools.toolSearch for nvidia/nemotron-3-super-120b-a12b routed via managed inference at https://inference.local/v1. Regression tests verify tool search is disabled for matching routes and remains enabled for non-matching Nemotron configurations.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

Poem

🐰 A config and tests, both simple and small,
Silence the tools that would stumble and fall,
When Nemotron runs on the managed route,
No search code breaks—just success, resolute! 🎯

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: disabling native tool search for Nemotron managed inference to resolve the tool_search_code failures.
Linked Issues check ✅ Passed The PR fully addresses issue #4780 by adding model-specific config to disable tool search and corresponding regression tests validating the fix.
Out of Scope Changes check ✅ Passed All changes are directly scoped to resolving issue #4780: configuration file, tests, and no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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 fix/4780-nemotron-disable-native-tool-search

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

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: kimi-inference-compat-e2e
Optional E2E: openclaw-inference-switch-e2e, inference-routing-e2e

Dispatch hint: kimi-inference-compat-e2e

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • kimi-inference-compat-e2e (high): Closest existing E2E coverage for OpenClaw model-specific setup effects that disable tools.toolSearch. It onboards a sandbox through inference.local with a model-specific compatibility path and asserts generated openclaw.json toolSearch/plugin wiring plus a real OpenClaw tool-call flow against a hermetic mock.

Optional E2E

  • openclaw-inference-switch-e2e (high): Useful adjacent confidence for OpenClaw managed inference.local route generation, openclaw.json hashing, gateway restart behavior, and a live OpenClaw agent turn after nemoclaw inference set; the default job does not specifically exercise the new Nemotron manifest, so it is optional rather than merge-blocking.
  • inference-routing-e2e (medium): Adjacent coverage for inference.local gateway proxy routing, provider credentials, and route error classification. It does not validate OpenClaw toolSearch config but can catch broader managed inference routing regressions.

New E2E recommendations

  • Nemotron managed inference OpenClaw compatibility (high): No existing E2E appears to exercise nvidia/nemotron-3-super-120b-a12b specifically or assert that the new manifest disables native Tool Search on the managed inference.local OpenAI-completions route while leaving non-matching routes unchanged.
    • Suggested test: nemotron-managed-inference-tool-search-e2e

Dispatch hint

  • Workflow: nightly-e2e.yaml
  • jobs input: kimi-inference-compat-e2e

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

E2E Scenario Advisor Recommendation

Required scenario E2E: ubuntu-repo-cloud-openclaw
Optional scenario E2E: brev-launchable-cloud-openclaw

Dispatch required scenario E2E:

  • gh workflow run e2e-scenarios.yaml --ref <pr-head-ref> --field scenarios=ubuntu-repo-cloud-openclaw

Workflow run

Full scenario advisor summary

E2E Scenario Advisor

Base: origin/main
Head: HEAD
Confidence: medium

Required scenario E2E

  • ubuntu-repo-cloud-openclaw: Adds an OpenClaw model-specific setup manifest for the NVIDIA managed inference-local route. This dispatchable Ubuntu repo/current OpenClaw cloud scenario is the primary path exercising OpenClaw onboarding plus managed cloud inference behavior covered by the changed manifest surface.
    • Dispatch: gh workflow run e2e-scenarios.yaml --ref <pr-head-ref> --field scenarios=ubuntu-repo-cloud-openclaw

Optional scenario E2E

  • brev-launchable-cloud-openclaw: Adjacent OpenClaw cloud inference scenario on the launchable/Brev installation path; useful if maintainers want extra coverage that the model-specific setup still works outside the repo-checkout install path, but it uses a special/remote runner path so it is optional.
    • Dispatch: gh workflow run e2e-scenarios.yaml --ref <pr-head-ref> --field scenarios=brev-launchable-cloud-openclaw

Relevant changed files

  • nemoclaw-blueprint/model-specific-setup/openclaw/nemotron-3-super-120b-managed-inference.json

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor

Findings: 0 needs attention, 0 worth checking, 0 nice ideas
Top item: No actionable code findings

Workflow run details

This is an automated advisory review. A human maintainer must make the final merge decision.

@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
`@nemoclaw-blueprint/model-specific-setup/openclaw/nemotron-3-super-120b-managed-inference.json`:
- Around line 1-17: This new JSON manifest (id
"nemotron-3-super-120b-managed-inference") is missing the required SPDX
copyright/license header; add the standard SPDX header block (the project's
canonical copyright and license lines) at the top of the file before the JSON
object so the file conforms to the repository rule that all .json files include
the SPDX header.
🪄 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: da126afc-8627-4667-9bd0-3bf58fd6f0ff

📥 Commits

Reviewing files that changed from the base of the PR and between 3c0340a and af45cee.

📒 Files selected for processing (2)
  • nemoclaw-blueprint/model-specific-setup/openclaw/nemotron-3-super-120b-managed-inference.json
  • test/generate-openclaw-config.test.ts

Comment on lines +1 to +17
{
"$schema": "../schema.json",
"id": "nemotron-3-super-120b-managed-inference",
"agent": "openclaw",
"description": "Disables OpenClaw's native code-based tool search for nvidia/nemotron-3-super-120b-a12b on the NemoClaw managed inference.local route. The model emits invalid JavaScript for the tool_search_code surface (CommonJS require, openclaw.tools.search called with an object, bad describe/call ids), flooding successful runs with '[tools] tool_search_code failed' errors (#4780); routing it back to the structured tool-calling surface avoids the noise.",
"match": {
"modelIds": ["nvidia/nemotron-3-super-120b-a12b"],
"providerKey": "inference",
"inferenceApi": "openai-completions",
"baseUrl": "https://inference.local/v1"
},
"effects": {
"openclawTools": {
"toolSearch": false
}
}
}

@coderabbitai coderabbitai Bot Jun 5, 2026

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 | 🟠 Major | 🏗️ Heavy lift

Missing required SPDX header in this new JSON source file.

This manifest is a new .json source file but does not include the required SPDX header text.

As per coding guidelines: **/*.{js,ts,tsx,jsx,sh,md,mdx,json,yaml,yml,css,svg} files must include the specified SPDX copyright and license header.

🤖 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
`@nemoclaw-blueprint/model-specific-setup/openclaw/nemotron-3-super-120b-managed-inference.json`
around lines 1 - 17, This new JSON manifest (id
"nemotron-3-super-120b-managed-inference") is missing the required SPDX
copyright/license header; add the standard SPDX header block (the project's
canonical copyright and license lines) at the top of the file before the JSON
object so the file conforms to the repository rule that all .json files include
the SPDX header.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Declining this one — it's a false positive for this file class. Three reasons, all verifiable against the repo:

  1. The SPDX hook deliberately excludes JSON. .pre-commit-config.yaml's spdx-headers hook scopes to files: ^(nemoclaw/src/.*\.ts|scripts/export-catalog-skills\.py|scripts/.*\.ts|nemoclaw-blueprint/.*\.py|.*\.sh)$.json is not matched, so model-specific-setup manifests are intentionally out of scope. The pre-commit run on this branch passed accordingly.

  2. The established precedent has no header. The sibling manifest nemoclaw-blueprint/model-specific-setup/openclaw/kimi-k2.6-managed-inference.json (the pattern this PR mirrors) ships without an SPDX header and is green in CI.

  3. The schema forbids adding one. These manifests validate against schema.json, which sets "additionalProperties": false and allows only $schema, id, agent, description, match, effects. JSON has no comment syntax, so the only way to carry SPDX text would be an extra key (e.g. $comment), which would fail validate-config-schemas.test.ts.

So the header is unenforced for this path and, if added, would break schema validation. Leaving the manifest as-is to stay consistent with the kimi precedent.

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.

@jason-ma-nv, you're absolutely right — I apologize for the noise. All three points are valid:

  1. The spdx-headers pre-commit hook regex explicitly targets only .ts, .py, and .sh paths, not .json.
  2. The existing kimi-k2.6-managed-inference.json sibling sets the precedent with no header.
  3. The strict additionalProperties: false schema makes it physically impossible to embed SPDX text without breaking validation.

My comment was a false positive. I'll note this for future reviews.

🐇


✏️ Learnings added
Learnt from: jason-ma-nv
Repo: NVIDIA/NemoClaw PR: 4800
File: nemoclaw-blueprint/model-specific-setup/openclaw/nemotron-3-super-120b-managed-inference.json:1-17
Timestamp: 2026-06-05T05:20:41.172Z
Learning: In the NemoClaw/NemoClaw repository, `.json` files under `nemoclaw-blueprint/model-specific-setup/openclaw/` do NOT require SPDX copyright/license headers. The `spdx-headers` pre-commit hook regex (`^(nemoclaw/src/.*\.ts|scripts/export-catalog-skills\.py|scripts/.*\.ts|nemoclaw-blueprint/.*\.py|.*\.sh)$`) explicitly excludes `.json` files. Additionally, these manifests are validated against `schema.json` which enforces `"additionalProperties": false`, allowing only `$schema, id, agent, description, match, effects` — making it impossible to add any SPDX key without breaking schema validation. Do not flag missing SPDX headers on these JSON manifest files.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

@jason-ma-nv jason-ma-nv added the v0.0.60 Release target label Jun 5, 2026
@cv cv merged commit 7a029f3 into main Jun 5, 2026
38 checks passed
@cv cv deleted the fix/4780-nemotron-disable-native-tool-search branch June 5, 2026 21:18
@wscurran wscurran added area: inference Inference routing, serving, model selection, or outputs area: providers Inference provider integrations and provider behavior bug-fix PR fixes a bug or regression labels Jun 6, 2026
miyoungc added a commit that referenced this pull request Jun 6, 2026
## Summary
- Adds the `v0.0.60` section to `docs/about/release-notes.mdx` using the
dev announcement from discussion #4877.
- Fills the source-doc gaps found during release-prep review across
inference, policy tiers, command behavior, security boundaries, Hermes
dashboard/tooling, runtime context, and troubleshooting.
- Refreshes generated agent skills under `.agents/skills/` from the
current Fern docs output and upgrades Fern from `5.44.3` to `5.45.0`.

## Source summary
- #4037 -> `docs/reference/architecture.mdx`,
`docs/about/how-it-works.mdx`, `docs/about/release-notes.mdx`: Documents
system-only runtime context that stays out of visible chat.
- #4875 -> `docs/reference/architecture.mdx`,
`docs/about/how-it-works.mdx`, `docs/about/release-notes.mdx`: Documents
try-first sandbox network/filesystem guidance and clearer failure
classification.
- #4788 -> `docs/security/best-practices.mdx`,
`docs/about/release-notes.mdx`: Documents shared OpenClaw
device-approval policy for startup and connect.
- #4768 -> `docs/reference/network-policies.mdx`,
`docs/network-policy/integration-policy-examples.mdx`,
`docs/get-started/quickstart.mdx`,
`docs/get-started/quickstart-hermes.mdx`, `docs/reference/commands.mdx`:
Documents `weather`, `public-reference`, and Hermes managed-tool gateway
preset behavior.
- #3788 and #4864 -> `docs/reference/network-policies.mdx`,
`docs/reference/commands.mdx`: Documents non-interactive policy-tier
fail-fast behavior and interactive prompt fallback.
- #4756 and #4866 -> `docs/reference/commands.mdx`: Documents env-aware
default sandbox resolution for `list`, `status`, and `tunnel` commands.
- #4320 -> `docs/reference/commands.mdx`: Documents `$$nemoclaw tunnel
status` behavior.
- #4328 -> `docs/reference/commands.mdx`: Documents line-scoped policy
preset descriptions in `policy-list`.
- #4580 and #4748 -> `docs/reference/architecture.mdx`: Documents
package-managed OpenShell gateway service and Docker-driver
gateway-marker behavior.
- #4598 -> `docs/manage-sandboxes/lifecycle.mdx`: Documents concurrent
gateway/dashboard cleanup isolation by sandbox name and port.
- #4777 -> `docs/reference/troubleshooting.mdx`: Documents Docker GPU
patch rollback behavior.
- #4610 -> `docs/reference/troubleshooting.mdx`,
`docs/reference/commands.mdx`: Keeps mutable OpenClaw config permission
guidance aligned and removes skipped experimental wording.
- #4868 -> `docs/reference/commands.mdx`: Keeps `.dockerignore` handling
for custom `onboard --from <Dockerfile>` contexts in generated skills.
- #4870 -> `docs/reference/commands.mdx`,
`docs/manage-sandboxes/runtime-controls.mdx`: Documents
`NEMOCLAW_MINIMAL_BOOTSTRAP` and generated skill coverage.
- #4641 -> `docs/inference/inference-options.mdx`,
`docs/reference/troubleshooting.mdx`: Documents local NVIDIA NIM
platform-digest pulls and served-model id adoption.
- #4810 and #4867 -> `docs/inference/inference-options.mdx`: Documents
stable NGC managed-vLLM image lineage and DGX Station DeepSeek V4 Flash
coverage.
- #4852 -> `docs/inference/use-local-inference.mdx`,
`docs/reference/troubleshooting.mdx`: Documents Ollama model fit
filtering, 16K context floor, cold-load retry, and failed-model
exclusion.
- #4847 -> `docs/inference/switch-inference-providers.mdx`: Documents
API-family sync, Hermes `api_mode`, and Bedrock Runtime exception.
- #4800 -> `docs/inference/tool-calling-reliability.mdx`: Documents
Nemotron managed-inference native tool-search fallback.
- #4333 -> `docs/inference/switch-inference-providers.mdx`: Documents
interactive multimodal input prompting.
- #4086 -> `docs/reference/troubleshooting.mdx`: Keeps proxy bypass
normalization in generated troubleshooting coverage.
- #4811 and #4855 -> `docs/get-started/quickstart-hermes.mdx`: Documents
prebuilt Hermes dashboard assets and TUI recovery without runtime
rebuilds.
- #4854 -> `docs/inference/switch-inference-providers.mdx`,
`docs/reference/commands.mdx`: Documents Hermes proxy API-key
placeholder preservation during inference switches.
- #4248 -> `docs/manage-sandboxes/messaging-channels.mdx`,
`.agents/skills/`: Keeps messaging enrollment behavior aligned with
manifest-hook implementation.
- #4771 -> `docs/security/best-practices.mdx`,
`docs/security/credential-storage.mdx`: Documents Hermes
placeholder-only secret boundary for sandbox-visible runtime files.
- #4787 -> `docs/security/best-practices.mdx`,
`docs/about/release-notes.mdx`: Documents expanded memory scanner
examples for OpenAI project keys and Slack app-level tokens.
- #4848 -> `docs/reference/commands.mdx`: Documents OpenClaw skill
install mirroring into the agent home directory.
- #4790 -> `docs/about/release-notes.mdx`: Uses the prior release-prep
structure and generated `.agents/skills/` refresh as the template for
this release.

## Verification
- `python3 scripts/docs-to-skills.py docs/ .agents/skills/ --prefix
nemoclaw-user --doc-platform fern-mdx`
- `python3 scripts/docs-to-skills.py docs/ .agents/skills/ skills/
--prefix nemoclaw-user --doc-platform fern-mdx --dry-run`
- `npm run docs`
- `git diff --check`
- skip-term scan across `docs/`, `.agents/skills/`, and `skills/`
- `npm run build:cli`
- `npm run typecheck:cli`
- Commit and pre-push hook suites, including markdownlint, gitleaks,
env-var docs gate, docs-to-skills verification, and skills YAML tests

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

## Summary by CodeRabbit

## Release Notes

* **New Features**
* DeepSeek-V4-Flash now available as default inference model for DGX
Station.
* Hermes dashboard improved with dedicated port and OAuth-authenticated
tool gateway selection.
* Added weather and public-reference policy presets for expanded agent
capabilities.
* Enhanced Ollama model selection with GPU memory filtering and
automatic retry for timeouts.

* **Bug Fixes**
  * Improved policy tier validation to prevent invalid configurations.
* Better sandbox cleanup scoping by port to prevent conflicts across
deployments.
  * Added GPU patch failure recovery with automatic rollback.

* **Documentation**
* Expanded troubleshooting guides for inference, security, and sandbox
lifecycle.
  * Added .dockerignore best practices for custom deployments.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Carlos Villela <cvillela@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: inference Inference routing, serving, model selection, or outputs area: providers Inference provider integrations and provider behavior bug-fix PR fixes a bug or regression v0.0.60 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Ubuntu 24.04][Agent&Skills] tool_search_code generates invalid JS and logs repeated errors during successful agent runs

3 participants