f1_predict_pit_strategy
Predict recommended F1 pit-stop laps and tyre compound sequences for a driver, projecting race strategy from the current lap.
Instructions
Predict the optimal pit-stop strategy for a driver in an F1 race session.
Args: session_key: OpenF1 session identifier for a recorded race. driver_number: Driver's race number (driver numbers change by season; use f1_get_drivers). current_lap: Current lap to project from (default 1 = full race ahead). total_laps: Total race laps. If omitted, estimated from the regulation minimum race distance (305 km; Monaco 260 km) over the circuit's lap length; INVALID_INPUT when the circuit is unknown. An explicit value always wins.
Returns: data.stop_laps: recommended pit laps. data.compound_sequence: tyre compounds for each stint. data.expected_finish_position: currently always None (not modelled). data.confidence: 0.0-1.0 model confidence. data.net_saving_s: stay-out time minus the best one-stop time (seconds). data.current_tyre_age: laps on the current tyre set at current_lap. meta.total_laps: race length used. meta.total_laps_source: "explicit" or "regulation_estimate". meta.estimated: true.
Example: f1_predict_pit_strategy(session_key=11353, driver_number=1, total_laps=72) f1_predict_pit_strategy(session_key=11353, driver_number=1, current_lap=20)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| total_laps | No | Total race laps. If omitted, estimated from the regulation minimum race distance (305 km; Monaco 260 km) over the circuit's lap length; INVALID_INPUT when the circuit is unknown. An explicit value always wins. | |
| current_lap | No | Current lap to project from (default 1 = full race ahead). | |
| session_key | Yes | OpenF1 session identifier for a recorded race. | |
| driver_number | Yes | Driver's race number (driver numbers change by season; use f1_get_drivers). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| meta | No | ||
| error | No |