TypeError: InferenceClient.text_generation() got an unexpected keyword argument 'token'

Yea. max_new_tokens is better if you need.