Files
hermes-agent/tests/tools
Brooklyn Nicholson a4c31d592b fix(tools): reject all-blank and over-limit clarify choices instead of dropping them silently
A choices list whose entries were all blank quietly became an open-ended
question, so the model never learned its options were gone and Desktop
showed a free-text card for a choice prompt (#73152). A choice longer
than a surface renders was dropped downstream while choices_offered still
reported it as shown (#124127).

_normalize_questions now returns a tool error for both: a non-empty
choices list with no surviving label names the question, and a choice
over MAX_CHOICE_CHARS (8000, also declared as maxLength in the schema)
names its position and the limit. An omitted or empty choices list stays
open-ended, which is still the documented way to ask free-text.

Co-authored-by: Konstantin Khlopkov <47825603+kokhlo@users.noreply.github.com>
Co-authored-by: JonthanaHanh <92574114+JonthanaHanh@users.noreply.github.com>
2026-09-29 19:44:05 -05:00
..