revert: remove trailing empty assistant message stripping
Reverts the sanitizer addition from PR #2466 (originally #2129). We already have _empty_content_retries handling for reasoning-only responses. The trailing strip risks silently eating valid messages and is redundant with existing empty-content handling.
This commit is contained in:
parent
5407d12bc6
commit
34be3f8be6
8 changed files with 220 additions and 152 deletions
|
|
@ -293,15 +293,11 @@ def get_tool_definitions(
|
|||
for ts_name in get_all_toolsets():
|
||||
tools_to_include.update(resolve_toolset(ts_name))
|
||||
|
||||
# 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
|
||||
# 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.
|
||||
|
||||
# Ask the registry for schemas (only returns tools whose check_fn passes)
|
||||
filtered_tools = registry.get_definitions(tools_to_include, quiet=quiet_mode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue