Pull requests / #963
#963 feat(server): stop unchanged completed tool-call loops
closed · @a00012025 · 0 comments · View on GitHub
Description
## Summary - Add opt-in `tool_loop_max_repeats`; the default remains disabled. - Stop unchanged single-tool cycles before loading or running the model. - Return an explicit safety notice, not a claim of task success. - Preserve changed results, exit codes, payload timestamps, and asynchronous waits. - Keep the original loading order for normal and vision requests. The configured ceiling also stops intentional identical terminal calls. Set the value to `0` to disable it. Related: #728. This guard does not claim to fix model reasoning or quantization quality. ## Verification - `python tools/test_tool_loop_guard.py`: 13 tests passed. - Parser and client-shape regressions: 16 tests passed. - Run configuration regressions: 9 tests passed. - Python compilation, Ruff, and whitespace checks passed. - Live Chat, Responses, and Anthropic replays passed with streaming enabled and disabled. - All six live replay modes returned the notice without executable calls or new engine log output. - A normal live tool request still executed and produced a final blocker report. The full API suite ran 167 tests with one error in `OverHttp.test_json_schema_text_format`. The same error occurred on unchanged commit `6f32ec0`; this patch does not remove or weaken that test.
Related on strata.com
Editorial links to help you install, pick models, or read release notes — not part of the upstream thread.