Race / Hedging (Stable)

Launch multiple contenders simultaneously or with small delays; first successful response wins and cancels the rest.

// let race = RacePolicy::new()
//   .contender("gpt-4o", Duration::from_millis(0))
//   .contender("claude-3-haiku", Duration::from_millis(120))
//   .cancel_others(true);

Use for interactive latency-sensitive flows (chat UI). Cost increases with redundant tokens.

Build: 3de64ed · 2025-09-09T12:50:59.640Z · v0.21