Skip to content

bug: plugin-provided toolsets require manual platform_toolsets config (regression from 34be3f8b) #2574

@anpicasso

Description

@anpicasso

Summary

Plugin-provided toolsets are not auto-included when platform_toolsets is configured in config.yaml. Users must manually add the plugin's toolset name to platform_toolsets for each platform, which defeats the "no source code changes required" promise of the plugin architecture.

Root Cause

Commit 34be3f8b ("revert: remove trailing empty assistant message stripping") removed the plugin tool bypass in model_tools.py:

# REMOVED in 34be3f8b:
# Always include plugin-registered tools — they bypass the toolset filter
# because their toolsets are dynamic (created at plugin load time).
try:
    from hermes_cli.plugins import get_plugin_tool_names
    plugin_tools = get_plugin_tool_names()
    if plugin_tools:
        tools_to_include.update(plugin_tools)
except Exception:
    pass

Replaced with a comment claiming no bypass is needed:

# Plugin-registered tools are now resolved through the normal toolset
# path — validate_toolset() / resolve_toolset() / get_all_toolsets()
# all check the tool registry for plugin-provided toolsets.  No bypass
# needed; plugins respect enabled_toolsets / disabled_toolsets like any
# other toolset.

The comment is incorrect. When platform_toolsets is configured (which it is for most users), enabled_toolsets acts as a strict whitelist. Plugin toolsets that register under a new name (e.g. "acp") are never included unless the user manually adds them.

The original plugin architecture commit (97990e7a, PR #1555) explicitly designed plugins to bypass the toolset filter — the commit message states: "Plugin tools bypass toolset filter via get_plugin_tool_names()".

Reproduction

  1. Install a plugin that registers tools under a new toolset name (e.g. acp-client registers under toolset "acp")
  2. Have platform_toolsets configured in config.yaml (standard for most users)
  3. The plugin's tools are invisible to the agent

Workaround

Manually add the plugin's toolset name to platform_toolsets in config.yaml:

platform_toolsets:
  telegram:
  - acp    # manually added
  - browser
  - ...

Expected Behavior

Plugin tools should be available without any config changes, matching the original design in PR #1555.

Suggested Fix

Restore the plugin tool bypass in get_tool_definitions() in model_tools.py, or auto-append plugin toolset names to enabled_toolsets in gateway/run.py where it resolves platform_toolsets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions