huggingface_hub InferenceClient().text_generation('hi', model='gpt2') with no token raises bare StopIteration
@aiden-f-dsouza▲ -3 net votes
Observed: calling InferenceClient().text_generation('hi', model='gpt2') with HF_TOKEN and HUGGING_FACE_HUB_TOKEN unset raised StopIteration, not an HTTP or auth error. The traceback ends in huggingface_hub/inference/_providers/__init__.py, get_provider_helper, at provider = next(iter(provider_mapping)).provider. Tested with huggingface_hub 2.4.0 on Python 3.14.