Skip to content

fix: keep Kimi compat off OpenClaw tool search - #4120

Merged
ericksoa merged 1 commit into
mainfrom
fix/kimi-toolsearch-compat
May 23, 2026
Merged

fix: keep Kimi compat off OpenClaw tool search#4120
ericksoa merged 1 commit into
mainfrom
fix/kimi-toolsearch-compat

Conversation

@ericksoa

@ericksoa ericksoa commented May 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a narrow model-specific OpenClaw tools override so Kimi K2.6 managed inference disables native Tool Search while other OpenClaw routes keep it enabled
  • validate effects.openclawTools.toolSearch in the model-specific setup schema/generator
  • tighten the Kimi E2E so it checks tools.toolSearch === false and validates the final assistant response instead of matching prompt text in logs

Tests

  • python3 -m json.tool nemoclaw-blueprint/model-specific-setup/schema.json
  • python3 -m json.tool nemoclaw-blueprint/model-specific-setup/openclaw/kimi-k2.6-managed-inference.json
  • python3 -m py_compile scripts/generate-openclaw-config.py
  • bash -n test/e2e/test-kimi-inference-compat.sh
  • git diff --check
  • npx vitest run test/generate-openclaw-config.test.ts test/validate-config-schemas.test.ts test/kimi-inference-compat-plugin.test.ts
  • npm run build:cli
  • npm run typecheck:cli
  • npm run source-shape:check
  • npm run checks
  • npm run lint

Summary by CodeRabbit

  • New Features

    • Added per-model tool configuration override support for enhanced model-specific optimization.
  • Configuration Updates

    • Kimi K2.6 managed inference now has tool search disabled by default.
  • Tests

    • Improved test validation for tool search configuration and agent response parsing.

Review Change Stack

@ericksoa ericksoa added v0.0.50 integration: openclaw OpenClaw integration behavior provider: nvidia NVIDIA inference endpoint, NIM, or NVIDIA provider behavior labels May 23, 2026
@coderabbitai

coderabbitai Bot commented May 23, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The PR introduces per-model OpenClaw tool search configuration overrides. A new openclawTools effect field is added to the schema with toolSearch boolean validation. The generator parses and merges these overrides across matching setups, defaulting to toolSearch: true, and emits the computed configuration. Kimi model configuration disables tool search explicitly. Tests validate schema constraints, generator override collection, and E2E config inspection.

Changes

OpenClaw Tool Search Configuration Override

Layer / File(s) Summary
Schema definition and validation contract
nemoclaw-blueprint/model-specific-setup/schema.json
Schema extended with effects.openclawCompat.openclawTools object containing toolSearch boolean, and agent: "hermes" conditional exclusion updated to disallow this field.
Generator implementation for tool overrides
scripts/generate-openclaw-config.py
Generator adds openclawTools to allowed effect keys, validates manifest toolSearch fields as booleans with unknown key rejection, extends _apply_openclaw_setup_effects to accept and merge openclaw_tools parameter with conflict detection, and computes merged tool settings in build_config then emits to final config.
Kimi model configuration with tool override
nemoclaw-blueprint/model-specific-setup/openclaw/kimi-k2.6-managed-inference.json
Kimi managed inference manifest adds effects.openclawCompat.openclawTools block with toolSearch: false.
Test validation for tool override feature
test/generate-openclaw-config.test.ts, test/e2e/test-kimi-inference-compat.sh
Unit tests assert config.tools?.toolSearch is false for Kimi matching routes and true for non-matching routes, validate schema rejection of non-boolean toolSearch values, and increase test timeouts to 20 seconds. E2E tests enhance check_openclaw_config to validate and display tools.toolSearch and upgrade run_agent_prompt to use Python-based JSON parsing for extracting final assistant text instead of grep-based matching.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • NVIDIA/NemoClaw#4096: Overlaps with this PR on scripts/generate-openclaw-config.py changes related to config.tools.toolSearch handling and model-specific override behavior.

Poem

🐰 A carrot config for each model fine,
Tool search toggles in perfect line,
Kimi shuts tools down with grace,
Generator merges with style and space,
Tests validate what's right and true,
Now your tools do what they're meant to do!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% 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 directly and specifically describes the main change: disabling OpenClaw tool search for Kimi K2.6, which is reflected across all modified files (config, schema, generator, and tests).
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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/kimi-toolsearch-compat

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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

@github-actions

Copy link
Copy Markdown
Contributor

PR Review Advisor

Findings: 0 needs attention, 1 worth checking, 0 nice ideas
Top item: Reconcile concurrent generator/test overlap before landing

Review findings

🛠️ Needs attention

  • None.

🔎 Worth checking

🌱 Nice ideas

  • None.

Workflow run details

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

@github-actions

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: kimi-inference-compat-e2e
Optional E2E: messaging-compatible-endpoint-e2e, openclaw-inference-switch-e2e

Dispatch hint: kimi-inference-compat-e2e

Auto-dispatched E2E: kimi-inference-compat-e2e via nightly-e2e.yaml at e0d2d39b6f73812401b982bf28dd8a8e6926f14fnightly run

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • kimi-inference-compat-e2e (medium; 45 minute timeout, hermetic mock plus sandbox onboard/build): Direct coverage for the changed Kimi K2.6 managed inference manifest and generate-openclaw-config behavior. It onboards a sandbox against a hermetic OpenAI-compatible Kimi mock, verifies openclaw.json compat/plugin/tool wiring, checks inference.local routing, and runs an OpenClaw agent tool-call flow.

Optional E2E

  • messaging-compatible-endpoint-e2e (medium; 45 minute timeout, hermetic endpoint plus sandbox onboard): Adjacent confidence for the generic OpenAI-compatible endpoint and inference.local route path used by managed compatible endpoints, though it does not exercise the Kimi-specific model setup or tool override.
  • openclaw-inference-switch-e2e (medium; 45 minute timeout, requires live NVIDIA_API_KEY): Optional broader OpenClaw config/routing confidence because the generator changes openclaw.json tools output; this verifies OpenClaw config patching and live inference after route changes, but is not specific to model-specific setup manifests.

New E2E recommendations

  • None.

Dispatch hint

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

@github-actions

Copy link
Copy Markdown
Contributor

E2E Scenario Advisor Recommendation

Required scenario E2E: None
Optional scenario E2E: None

Workflow run

Full scenario advisor summary

E2E Scenario Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required scenario E2E

  • None. No scenario workflow, scenario metadata, scenario runtime, or validation-suite files changed.

Optional scenario E2E

  • None.

Relevant changed files

  • None.

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 26322973647
Target ref: e0d2d39b6f73812401b982bf28dd8a8e6926f14f
Workflow ref: main
Requested jobs: kimi-inference-compat-e2e
Summary: 0 passed, 0 failed, 0 skipped

Job Result
kimi-inference-compat-e2e ⚠️ cancelled

@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/kimi-k2.6-managed-inference.json`:
- Around line 18-20: Add a top-of-file SPDX license header to this JSON
manifest: insert a single-line comment-style SPDX header (e.g., including
copyright owner and "SPDX-License-Identifier: Apache-2.0") at the very top of
the file that contains the "openclawTools" object so the file complies with the
required SPDX header rule for JSON sources.
🪄 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: 6d06e495-13a8-4043-a5b3-c20f56b8f7c4

📥 Commits

Reviewing files that changed from the base of the PR and between 82514c8 and e0d2d39.

📒 Files selected for processing (5)
  • nemoclaw-blueprint/model-specific-setup/openclaw/kimi-k2.6-managed-inference.json
  • nemoclaw-blueprint/model-specific-setup/schema.json
  • scripts/generate-openclaw-config.py
  • test/e2e/test-kimi-inference-compat.sh
  • test/generate-openclaw-config.test.ts

Comment on lines +18 to +20
"openclawTools": {
"toolSearch": false
},

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 | ⚡ Quick win

Add the required SPDX license header to this manifest.

This JSON source file is missing the required SPDX copyright/license header.

💡 Suggested update
 {
+  "$comment": "SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. SPDX-License-Identifier: Apache-2.0",
   "$schema": "../schema.json",
   "id": "kimi-k2.6-managed-inference",

As per coding guidelines, **/*.{js,ts,tsx,jsx,sh,yaml,yml,json,md,mdx}: Every source file must include an SPDX license header for copyright and Apache-2.0 license.

🤖 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/kimi-k2.6-managed-inference.json`
around lines 18 - 20, Add a top-of-file SPDX license header to this JSON
manifest: insert a single-line comment-style SPDX header (e.g., including
copyright owner and "SPDX-License-Identifier: Apache-2.0") at the very top of
the file that contains the "openclawTools" object so the file complies with the
required SPDX header rule for JSON sources.

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 26322994830
Target ref: e0d2d39b6f73812401b982bf28dd8a8e6926f14f
Workflow ref: main
Requested jobs: kimi-inference-compat-e2e
Summary: 1 passed, 0 failed, 0 skipped

Job Result
kimi-inference-compat-e2e ✅ success

@ericksoa
ericksoa merged commit 14b2be2 into main May 23, 2026
30 checks passed
@ericksoa
ericksoa deleted the fix/kimi-toolsearch-compat branch May 23, 2026 04:13
@wscurran wscurran added area: cli Command line interface, flags, terminal UX, or output bug-fix PR fixes a bug or regression and removed NemoClaw CLI labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Command line interface, flags, terminal UX, or output bug-fix PR fixes a bug or regression integration: openclaw OpenClaw integration behavior provider: nvidia NVIDIA inference endpoint, NIM, or NVIDIA provider behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants