Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,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
}
}
}
Comment on lines +1 to +17

@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
Collaborator 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.

41 changes: 41 additions & 0 deletions test/generate-openclaw-config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1477,6 +1477,47 @@ describe("generate-openclaw-config.mts: config generation", () => {
}
}, 20_000);

// #4780: Nemotron generates invalid JS for OpenClaw's native code-based tool
// search (`tool_search_code`): CommonJS `require`, `openclaw.tools.search`
// called with an object instead of a string, `tool_describe`/`tool_call`
// invoked with bad ids. The run still succeeds via fallback, but the logs are
// flooded with `[tools] tool_search_code failed` errors. Disabling native
// tool search for this managed-inference route routes the model back to the
// structured tool-calling surface it handles correctly.
it("disables native OpenClaw Tool Search for Nemotron managed inference (#4780)", () => {
const config = runConfigScript({
NEMOCLAW_MODEL: "nvidia/nemotron-3-super-120b-a12b",
NEMOCLAW_PROVIDER_KEY: "inference",
NEMOCLAW_PRIMARY_MODEL_REF: "inference/nvidia/nemotron-3-super-120b-a12b",
NEMOCLAW_INFERENCE_BASE_URL: "https://inference.local/v1",
NEMOCLAW_INFERENCE_API: "openai-completions",
});

expect(config.tools?.toolSearch).toBe(false);
});

it("does not disable native Tool Search for Nemotron on non-matching routes (#4780)", () => {
const cases = [
{ NEMOCLAW_MODEL: "nvidia/nemotron-3-nano:30b" },
{ NEMOCLAW_PROVIDER_KEY: "nvidia" },
{ NEMOCLAW_INFERENCE_API: "responses" },
{ NEMOCLAW_INFERENCE_BASE_URL: "https://integrate.api.nvidia.com/v1" },
];

for (const envCase of cases) {
const config = runConfigScript({
NEMOCLAW_MODEL: "nvidia/nemotron-3-super-120b-a12b",
NEMOCLAW_PROVIDER_KEY: "inference",
NEMOCLAW_PRIMARY_MODEL_REF: "inference/nvidia/nemotron-3-super-120b-a12b",
NEMOCLAW_INFERENCE_BASE_URL: "https://inference.local/v1",
NEMOCLAW_INFERENCE_API: "openai-completions",
...envCase,
});

expect(config.tools?.toolSearch).toBe(true);
}
}, 20_000);

it("rejects model-specific setup manifests without a known agent", () => {
const blueprintDir = path.join(tmpDir, "fixture-blueprint");
const registryDir = writeRegistryManifest(
Expand Down
Loading