Skip to content

fix(cli): deduplicate plugin toolsets against built-in keys in hermes tools (Closes #13640) - #13804

Closed
ms-alan wants to merge 2 commits into
NousResearch:mainfrom
ms-alan:fix/13640-dedupe-plugin-toolsets
Closed

fix(cli): deduplicate plugin toolsets against built-in keys in hermes tools (Closes #13640)#13804
ms-alan wants to merge 2 commits into
NousResearch:mainfrom
ms-alan:fix/13640-dedupe-plugin-toolsets

Conversation

@ms-alan

@ms-alan ms-alan commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Summary

When a plugin registers a tool into an existing built-in toolset (e.g. toolset="web"), hermes tools showed duplicate rows for the same toolset key. The built-in row and plugin-derived row both appeared, even though they mapped to the same underlying web key.

Fix: In _get_effective_configurable_toolsets(), skip plugin toolsets whose key already exists in CONFIGURABLE_TOOLSETS. Plugin-added tools now extend the existing toolset instead of creating a second top-level row.

Changes

  • hermes_cli/tools_config.py: Filter plugin toolsets against built-in keys before appending

Testing

Install a plugin that registers a tool with toolset="web"hermes tools now shows only one web row (not two)

Closes #13640

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins comp/tools Tool registry, model_tools, toolsets labels Apr 22, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for this fix! The toolset deduplication you proposed in _get_effective_configurable_toolsets() has already landed on main independently.

This is an automated hermes-sweeper review.

  • The same seen-set dedup logic was added by commit ac05daa18 via PR fix(tools): dedupe bundled plugin toolsets with built-in entries #15634 (merged 2026-04-25), which fixed the same root cause (Spotify plugin key duplicating its CONFIGURABLE_TOOLSETS entry after the plugins/spotify/ refactor).
  • hermes_cli/tools_config.py line ~108 on main already has seen = {ts_key for ts_key, _, _ in result} and if entry[0] in seen: continue — identical to your fix.
  • The PR also reports mergeable: CONFLICTING, consistent with those lines already being changed.

Note: this PR also touches agent/prompt_builder.py and hermes_cli/model_normalize.py — if those changes address separate issues they may be worth re-submitting in a focused PR against current main.

@teknium1 teknium1 closed this Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins comp/tools Tool registry, model_tools, toolsets P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hermes tools duplicates built-in toolset rows for plugins attached to existing toolsets

3 participants