Skip to main content

chat_turn_with_deadline

Function chat_turn_with_deadline 

Source
pub async fn chat_turn_with_deadline(
    transport: &dyn ModelTransport,
    model: &ModelId,
    conversation: &Conversation,
    tools: &[ToolSpec],
    choice: ToolChoicePolicy,
    deadline_secs: u64,
) -> Result<TurnOutput>
Expand description

One transport call under a hard wall-clock deadline — the one door every actor’s model turn goes through. A finite turn count alone never bounds wall time; the deadline does. Exceeding it is an ordinary transport failure (it consumes sticky failover like a provider outage), and dropping the timed future cancels the underlying request.