Conversation
…Research#59470) The honcho_reasoning tool used to forward whatever reasoning_level the calling model chose, including 'minimal'. Honcho's minimal dialectic tier hard-caps output at 250 tokens (MAX_OUTPUT_TOKENS=250, MAX_TOOL_ITERATIONS=1), and on reasoning-capable backend models that budget is shared between hidden reasoning tokens and visible output. For multi-fact prompts the model routinely picks minimal and the answer truncates mid chain-of-thought before any synthesized result. Add a deterministic complexity heuristic (sentence count, clause separators, numbered-list markers, distinct content tokens) and a selector that: - bumps 'no override' picks to medium for multi-sentence prompts and to high for multi-topic / multi-clause prompts, - floors explicit 'minimal' / 'low' picks up to the complexity tier (caller can still raise the tier above the floor, but can't drop below it), - clamps everything to the configured reasoning_level_cap. The existing _apply_reasoning_heuristic still drives the auto-injected dialectic; this fix is scoped to the explicit honcho_reasoning tool call path where the model picks the tier per call. Tests cover the classifier, the selector with and without explicit overrides, cap clamping, invalid-input handling, and an end-to-end regression pinning issue NousResearch#59470's minimal-on-complex-query scenario. AI-assisted fix by https://github.com/SquabbyZ/peaks-loop
Competing with #59472 for the same issue #59470. Different mechanism: this PR adds a deterministic complexity heuristic that auto-bumps a |
teknium1
left a comment
There was a problem hiding this comment.
Thanks for targeting a real current-main path: plugins/memory/honcho/__init__.py:1352-1362 still forwards a model-selected reasoning_level unchanged.
Problems
plugins/memory/honcho/__init__.py:1050acceptsdefault, but the no-explicit return at:1087-1089never uses it. WithdialecticDynamic=true, an omitted level on a simple query becomesminimal, replacing the configureddialecticReasoningLevel; current schema text says omission uses that configured default (plugins/memory/honcho/__init__.py:110-112).- The explicit branch at
plugins/memory/honcho/__init__.py:1081-1084also clampsmaxtoreasoningLevelCap. Current docs define that cap for automaticreasoningHeuristicscaling, whiledialecticDynamicallows per-call model overrides (plugins/memory/honcho/README.md:266-269). The new test attests/plugins/test_honcho_tier_selection.py:302-314codifies the regression.
Suggested changes
- Preserve
Nonefor omission, or use the configured default as the selector base without lowering it; add coverage withdialecticReasoningLevel=high. - Floor explicit low/minimal choices for complex prompts without capping higher explicit choices under the auto-heuristic cap.
Automated hermes-sweeper review.
| chosen_idx = min(chosen_idx, cap_idx) | ||
| return cls._LEVEL_ORDER[chosen_idx] | ||
|
|
||
| # No explicit override — complexity heuristic picks the floor. |
There was a problem hiding this comment.
default is validated above but never participates in selection. This makes an omitted level on a simple query become minimal; with dialecticDynamic=true, the session manager will honor that value instead of the configured dialecticReasoningLevel. Preserve None for omission or use default as the non-explicit base.
| if explicit and explicit in cls._LEVEL_ORDER: | ||
| explicit_idx = cls._LEVEL_ORDER.index(explicit) | ||
| chosen_idx = max(explicit_idx, target_idx) | ||
| chosen_idx = min(chosen_idx, cap_idx) |
There was a problem hiding this comment.
This newly caps explicit higher choices such as max. Current Honcho documentation defines reasoningLevelCap as the ceiling for automatic reasoningHeuristic scaling, while dialecticDynamic permits per-call overrides. Do not apply this cap to explicit choices unless that public contract is deliberately changed and documented.
|
Closing after review against current main (post #62290 + #66052). The issue you targeted (#59470 — We went with guidance over enforcement deliberately: overriding an explicit Appreciate the thorough test coverage in this one — the diagnosis helped confirm the issue was worth fixing. Thanks @SquabbyZ! |
Fixes #59470
Problem
The
honcho_reasoningtool used to forward whateverreasoning_levelthe calling model chose, including
minimal. Honcho's minimal dialectictier hard-caps output at 250 tokens (
MAX_OUTPUT_TOKENS=250,MAX_TOOL_ITERATIONS=1). On reasoning-capable backend models (OpenAIgpt-5.x / o-series and similar) that 250-token budget is shared between
hidden reasoning tokens and visible output — so a multi-fact prompt that
needed real synthesis would exhaust the budget mid chain-of-thought and
return no synthesized answer.
The
minimalframing in the tool description read as "fast/cheap" —a normal quality dial — rather than "hard output cap that can
truncate before answering". So the model reliably picked
minimalforqueries that weren't suited to it.
Fix
Add a deterministic complexity heuristic in
plugins/memory/honcho/__init__.pyand route everyhoncho_reasoningtool call through it:
_classify_query_complexity) — counts sentences,clause separators (
;/commas), numbered-list markers, and distinctcontent tokens (after stopword removal) to bucket the prompt into
simple/moderate/complex._select_reasoning_level) — maps the bucket to a tier(
minimal/medium/high), honors an explicit caller overrideunless it would fall below the complexity floor (so
minimalon acomplex query is bumped to
high), and clamps everything to theconfigured
reasoningLevelCap.handle_tool_call("honcho_reasoning", ...)so everyexplicit tool call now benefits. The existing
_apply_reasoning_heuristicfor the auto-injected dialectic is leftuntouched — it still scales by query length for the implicit cadence
path.
This is a heuristic, not an LLM classifier, matching the issue's
expected behavior.
Tests
tests/plugins/test_honcho_tier_selection.py— 30 tests covering:multi-sentence / numbered-list / semicolon / comma-separated inputs,
distinct-topic counting, and stopword handling,
handle_tool_call, including a regression for[Bug]: honcho_reasoning picks Honcho's minimal reasoning tier for multi-fact queries → answers cut off at the 250-token combined budget #59470's "model picks
minimalfor a multi-fact query" scenario(asserts the call ends up at
high, notminimal).All 30 tests pass:
pytest tests/plugins/test_honcho_tier_selection.py.Relationship to existing PR #52395
That PR rewrites the tool-level
descriptionofhoncho_reasoningand the other tools. It does not touch the
reasoning_levelparameter description or add runtime tier selection, so it's orthogonal.
This fix is at the handler level — the model can still see whatever
description we give it, but even if it picks
minimalfor a complexquery, the runtime promotes the tier so Honcho's hard cap can't
silently truncate the answer.
Environment
Verified locally on Windows / Python 3.11 against a self-hosted Honcho
backend (the same reproduction as #59470).
AI-assisted fix by https://github.com/SquabbyZ/peaks-loop