Skip to content

fix: add explicit hermes-api-server toolset for API server platform#3304

Merged
teknium1 merged 1 commit intomainfrom
hermes/hermes-5ef8201d
Mar 27, 2026
Merged

fix: add explicit hermes-api-server toolset for API server platform#3304
teknium1 merged 1 commit intomainfrom
hermes/hermes-5ef8201d

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

Summary

Updated version of PR #3284 — adds config-driven toolset resolution to the API server adapter, matching how every other gateway platform works.

Problem

The API server adapter created agents without enabled_toolsets, loading ALL tools — including clarify, send_message, and text_to_speech which don't work without interactive callbacks or gateway dispatch. This confused models by presenting irrelevant tools, and meant platform_toolsets config overrides didn't work for the API server.

Reported by thatwolfieguy on Discord: asking for a live USD/JPY exchange rate via the API server returned stale training data instead of using web_search.

Changes

  • toolsets.py: Add hermes-api-server toolset — same as _HERMES_CORE_TOOLS minus clarify, send_message, text_to_speech
  • gateway/platforms/api_server.py: Resolve toolsets from config.yaml via _get_platform_tools() — same code path as Telegram, Discord, Slack, etc. Falls back to hermes-api-server default when no config override exists.
  • hermes_cli/tools_config.py: Add api_server to PLATFORMS dict so users can customize via hermes tools or directly in config.yaml:
platform_toolsets:
  api_server:
    - web
    - terminal
    - file
    - browser
    - vision
    - ...
  • Tests: 12 tests covering toolset definition, tool inclusion/exclusion, platform config, adapter wiring, and config override

Validation

  • python -m pytest tests/gateway/test_api_server_toolset.py -n0 -q → 12 passed
  • python -m pytest tests/test_model_tools.py tests/gateway/test_api_server.py tests/hermes_cli/test_tools_config.py -n0 -q → 123 passed
  • Full suite: 6285 passed, 5 pre-existing failures (unrelated)

Supersedes #3284

The API server adapter was creating agents without specifying
enabled_toolsets, causing ALL tools to load — including clarify,
send_message, and text_to_speech which don't work without interactive
callbacks or gateway dispatch.

Changes:
- toolsets.py: Add hermes-api-server toolset (core tools minus clarify,
  send_message, text_to_speech)
- api_server.py: Resolve toolsets from config.yaml platform_toolsets
  via _get_platform_tools() — same path as all other gateway platforms.
  Falls back to hermes-api-server default when no override configured.
- tools_config.py: Add api_server to PLATFORMS dict so users can
  customize via 'hermes tools' or platform_toolsets.api_server in
  config.yaml
- 12 tests covering toolset definition, config resolution, and
  user override

Reported by thatwolfieguy on Discord.
@teknium1 teknium1 merged commit 18d28c6 into main Mar 27, 2026
3 of 4 checks passed
StreamOfRon pushed a commit to StreamOfRon/hermes-agent that referenced this pull request Mar 29, 2026
…ousResearch#3304)

The API server adapter was creating agents without specifying
enabled_toolsets, causing ALL tools to load — including clarify,
send_message, and text_to_speech which don't work without interactive
callbacks or gateway dispatch.

Changes:
- toolsets.py: Add hermes-api-server toolset (core tools minus clarify,
  send_message, text_to_speech)
- api_server.py: Resolve toolsets from config.yaml platform_toolsets
  via _get_platform_tools() — same path as all other gateway platforms.
  Falls back to hermes-api-server default when no override configured.
- tools_config.py: Add api_server to PLATFORMS dict so users can
  customize via 'hermes tools' or platform_toolsets.api_server in
  config.yaml
- 12 tests covering toolset definition, config resolution, and
  user override

Reported by thatwolfieguy on Discord.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant