fix(honcho): skip dialectic char cap for explicit honcho_reasoning tool calls - #59495
LavyaTandel wants to merge 2 commits into
Conversation
Duplicate of #59471 (earlier, same fix). Both add |
…ol calls What: honcho_reasoning tool results were silently truncated to dialecticMaxChars (default 600) mid-word, even when the model explicitly requested a full synthesized answer. No error surfaced. Why: dialectic_query() shared one truncation path for two call sites: auto-injection (correct — small cap for always-on system prompt supplement) and the honcho_reasoning tool (incorrect — model spent a turn requesting a full answer, no reason to clip). Fix: Add apply_injection_cap parameter (default True for backward compat). honcho_reasoning tool handler passes False so explicit user queries get the full server response. Auto-injection path unchanged. Closes NousResearch#59469
b2611c7 to
0662093
Compare
teknium1
left a comment
There was a problem hiding this comment.
Thanks for isolating the explicit-tool path from the auto-injection path. Current main still has the shared unconditional cap at plugins/memory/honcho/session.py:658-660, and honcho_reasoning reaches it through plugins/memory/honcho/__init__.py:1358-1362.
Problems
tests/honcho_plugin/test_session.py:501-506asserts the exactdialectic_query()call withoutapply_injection_cap; this PR adds that keyword atplugins/memory/honcho/__init__.py:1362, so the existing test will fail as written.- The diff has no behavioral regression test covering an over-cap response for both the default injection path and the explicit tool path.
Suggested changes
- Update the exact-call assertion to include
apply_injection_cap=False. - Add a focused long-response test proving the default still caps results and the explicit-tool flag does not.
This is an automated hermes-sweeper review.
| self._session_key, query, | ||
| reasoning_level=reasoning_level, | ||
| peer=peer, | ||
| apply_injection_cap=False, |
There was a problem hiding this comment.
Please update tests/honcho_plugin/test_session.py:501-506: it uses assert_called_once_with(...) for this call and currently omits this new keyword, so the existing test will fail after this change.
|
This is now fixed on main via #62290 (commit 8d1c96f), which adopted the earliest submission for #59469 (#59471 by @vizi0uz, submitted ~45 min before this one). Explicit honcho_reasoning tool calls no longer get clipped to dialecticMaxChars — the cap is scoped to automatic context injection only. Thanks for the fix, sorry it collided with an earlier duplicate. |
What
Skip the
dialecticMaxCharstruncation cap whenhoncho_reasoningis called explicitly by the model. Previously, tool results were silently clipped to 600 chars mid-word even when the model spent a turn requesting a full synthesized answer.Why
dialectic_query()shared one truncation path for two call sites:honcho_reasoningtool — model explicitly requested a full answer, no reason to clipThe server returns untruncated results; the clip is purely client-side.
Fix
Add
apply_injection_cap: bool = Trueparameter todialectic_query(). Thehoncho_reasoningtool handler passesFalse. Auto-injection path unchanged (defaultTrue).Files changed:
plugins/memory/honcho/session.py: new parameter + guard on truncationplugins/memory/honcho/__init__.py: tool handler passesapply_injection_cap=FalseRuntime Proof
Before:
honcho_reasoningresult truncated at 600 chars with trailing…After: full server response returned, no truncation
Duplicate Scan
No existing PRs for #59469.
Closes #59469