This PR has now been merged and released with Transformers 4.50 https://github.com/huggingface/transformers/pull/36415 Given that [smolagents only supports Python 3.10 and above](https://github.com/huggingface/smolagents/issues/915), will need to decide how to handle this change.