mirror of
https://github.com/whit3rabbit/anyllm-proxy.git
synced 2026-09-21 16:00:49 +00:00
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>
16 lines
574 B
Rust
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);
|
|
}
|