The model
It reads the situation: the count, the matchup and handedness, the base-out state, and the pitches thrown so far this at-bat. From that it predicts the next pitch type. A gradient-boosted tree on those features does best; a Transformer over the sequence lands in the same range.