You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: cap context-compaction output length to prevent unbounded hangs
Compaction summarization had no output-length limit, so a slow or
degenerate completion from a local model could run unbounded and hang
the soul loop indefinitely (observed as a stuck "Compacting..." /
"Bloviating..." state). Add capped_chat_provider() to cap the summary
call via the correct provider-specific kwarg (max_tokens or
max_output_tokens), and wire it into SimpleCompaction.
Also fixes ScriptedEchoChatProvider, which was missing
with_generation_kwargs entirely.
* fix: send Qwen3.x's binary enable_thinking toggle instead of tiered effort
Qwen3.x models expose a binary enable_thinking chat-template toggle,
not the tiered low/medium/high reasoning_effort values OpenAI/Anthropic
providers use. Self-hosted openai_legacy endpoints (llama.cpp/vLLM/LM
Studio) were rejecting the tiered value for these models and silently
promoting every configured effort level to full reasoning. Detect
Qwen3.x models (mirroring the existing Kimi/GLM special-casing) and
send chat_template_kwargs.enable_thinking instead.
* feat: add identical-tool-call stuck-loop backstop independent of errors
The existing max_consecutive_failures backstop only trips when every
tool call in a batch reports is_error=True, so it can't catch a
degenerate loop where a tool falsely reports success on a call that
never made progress (observed: a stuck agent burning 15 minutes and
142k tokens of context with no backstop firing).
Add max_consecutive_identical_calls (default 10), tracked from the
toolset's own identical-argument repeat streak rather than each call's
reported success/failure, as a second independent backstop.
* fix: address CodeRabbit review findings on PR #188
- Add openai_codex to the max_output_tokens kwarg-override map: it
builds the same OpenAIResponses provider as openai_responses, so the
compaction cap was silently no-op'ing (falling back to max_tokens)
for ChatGPT/Codex-backed sessions.
- Add direct capped_chat_provider coverage for all provider-type ->
kwarg mappings, including the openai_codex case above.
- Extract the duplicated Runtime(...) rebuild in
test_pythinkersoul_stuck_loop.py into a shared helper.
* fix: assert on capped_chat_provider's return value, not the mutated fake
_FakeChatProvider.with_generation_kwargs mutated self and returned self,
so the new provider-type-mapping test only observed the fake's internal
state rather than capped_chat_provider's actual return value -- a
regression that discarded the capped copy would have passed unnoticed.
Make the fake return a fresh instance (matching the real providers'
copy-on-write contract) and assert on the returned/used provider in
both the mapping test and test_compaction_caps_output_tokens.
0 commit comments