Skip to content

fix: ensure tool schema always includes name field - #3811

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-b2abefdf
Mar 29, 2026
Merged

fix: ensure tool schema always includes name field#3811
teknium1 merged 1 commit into
mainfrom
hermes/hermes-b2abefdf

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Ensures get_definitions() always includes the name field in tool schemas, using the registered entry.name as authoritative source. Prevents KeyError crash when plugins or external tools register schemas without a name key.

Cherry-picked from PR #3740 by @ekkoitac. Closes #3729.

Supersedes #3730, #3744, #3762 (all fix the same issue — this is the smallest/cleanest approach).

When a tool plugin registers a schema without an explicit 'name' key,
get_definitions() crashes with KeyError:

    available_tool_names = {t["function"]["name"] for t in filtered_tools}

Fix: always merge entry.name into schema so 'name' is never missing.

Refs: #3729
@teknium1
teknium1 merged commit bf84cdf into main Mar 29, 2026
2 of 3 checks passed
angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 27, 2026
…NousResearch#3811)

When a tool plugin registers a schema without an explicit 'name' key,
get_definitions() crashes with KeyError:

    available_tool_names = {t["function"]["name"] for t in filtered_tools}

Fix: always merge entry.name into schema so 'name' is never missing.

Refs: NousResearch#3729

Co-authored-by: ekkoitac <ekko.itac@gmail.com>
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…NousResearch#3811)

When a tool plugin registers a schema without an explicit 'name' key,
get_definitions() crashes with KeyError:

    available_tool_names = {t["function"]["name"] for t in filtered_tools}

Fix: always merge entry.name into schema so 'name' is never missing.

Refs: NousResearch#3729

Co-authored-by: ekkoitac <ekko.itac@gmail.com>
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…NousResearch#3811)

When a tool plugin registers a schema without an explicit 'name' key,
get_definitions() crashes with KeyError:

    available_tool_names = {t["function"]["name"] for t in filtered_tools}

Fix: always merge entry.name into schema so 'name' is never missing.

Refs: NousResearch#3729

Co-authored-by: ekkoitac <ekko.itac@gmail.com>
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…NousResearch#3811)

When a tool plugin registers a schema without an explicit 'name' key,
get_definitions() crashes with KeyError:

    available_tool_names = {t["function"]["name"] for t in filtered_tools}

Fix: always merge entry.name into schema so 'name' is never missing.

Refs: NousResearch#3729

Co-authored-by: ekkoitac <ekko.itac@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KeyError: 'name' in get_tool_definitions when tool schema missing name field

2 participants