Files
whit3rabbitandClaude Sonnet 4.6 72ba916241 fix: streaming tool execution iterates up to max_iterations like non-streaming path
The single follow-up pass after initial stream tool calls is replaced with
a loop bounded by engine.loop_config.max_iterations. Each iteration collects
new tool calls from the follow-up stream, builds growing current_messages,
and breaks early if no new tool calls appear or total_timeout is reached.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 20:30:13 -05:00

16 lines
574 B
Rust

//! Smoke test: verify the tool engine loop config is structurally correct.
use std::time::Duration;
#[test]
fn tool_loop_config_max_iterations_above_one() {
// LoopConfig with max_iterations = 3 can be constructed and holds the value.
// This confirms the streaming path has the plumbing to loop.
let cfg = anyllm_proxy::tools::execution::LoopConfig {
max_iterations: 3,
tool_timeout: Duration::from_secs(30),
total_timeout: Duration::from_secs(300),
max_tool_calls_per_turn: 16,
};
assert_eq!(cfg.max_iterations, 3);
}