Skip to content

Conversation

@alexander-alderman-webb
Copy link
Contributor

Description

The CI fails when you generate tox.ini, as huggingface_hub complains about a missing API key. See https://github.com/getsentry/sentry-python/actions/runs/18707992581/job/53349699759.

Always use HFInferenceConversational() for chat completions, which is the behavior prior to version 1.0.0rc7 of huggingface_hub due to our mock:

with responses.RequestsMock(assert_all_requests_are_fired=False) as rsps:
model_name = "test-model"
_add_mock_response(
httpx_mock,
rsps,
"GET",
re.compile(
MODEL_ENDPOINT.format(model_name=model_name)
+ r"(\?expand=inferenceProviderMapping)?"
),
json={
"id": model_name,
"pipeline_tag": "text-generation",
"inferenceProviderMapping": {
"hf-inference": {
"status": "live",
"providerId": model_name,
"task": "text-generation",
}
},
},
status=200,
)

We know we have always tested only HFInferenceConversational() because it's the only provider which does not raise an exception when the API key is missing:

https://github.com/huggingface/huggingface_hub/blob/61bc87eb4d774c477ee87c9bf14aa9557ccb4e34/src/huggingface_hub/inference/_providers/hf_inference.py#L31

Issues

Closes #4978

Reminders

@alexander-alderman-webb alexander-alderman-webb requested a review from a team as a code owner October 22, 2025 09:31
@codecov
Copy link

codecov bot commented Oct 22, 2025

❌ 54 Tests Failed:

Tests completed Failed Passed Skipped
25475 54 25421 1851
View the top 3 failed test(s) by shortest run time
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming_with_tools[False-True]
Stack Traces | 0.063s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:941: in test_chat_completion_streaming_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.8-huggingface_hub-v0.24.7/lib/python3.8.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: __init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion[True-True]
Stack Traces | 0.072s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:619: in test_chat_completion
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.10-huggingface_hub-v0.24.7/lib/python3.10.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_api_error
Stack Traces | 0.072s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:755: in test_chat_completion_api_error
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.10-huggingface_hub-v0.24.7/lib/python3.10.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming[False-False]
Stack Traces | 0.072s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:691: in test_chat_completion_streaming
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.10-huggingface_hub-v0.24.7/lib/python3.10.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming[True-False]
Stack Traces | 0.072s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:691: in test_chat_completion_streaming
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.10-huggingface_hub-v0.24.7/lib/python3.10.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming_with_tools[True-False]
Stack Traces | 0.072s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:941: in test_chat_completion_streaming_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.10-huggingface_hub-v0.24.7/lib/python3.10.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming_with_tools[True-True]
Stack Traces | 0.072s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:941: in test_chat_completion_streaming_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.10-huggingface_hub-v0.24.7/lib/python3.10.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_with_tools[True-False]
Stack Traces | 0.072s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:852: in test_chat_completion_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.10-huggingface_hub-v0.24.7/lib/python3.10.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_with_tools[True-True]
Stack Traces | 0.072s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:852: in test_chat_completion_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.10-huggingface_hub-v0.24.7/lib/python3.10.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion[False-False]
Stack Traces | 0.073s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:619: in test_chat_completion
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.10-huggingface_hub-v0.24.7/lib/python3.10.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion[False-True]
Stack Traces | 0.073s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:619: in test_chat_completion
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.10-huggingface_hub-v0.24.7/lib/python3.10.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion[True-False]
Stack Traces | 0.073s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:619: in test_chat_completion
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.10-huggingface_hub-v0.24.7/lib/python3.10.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming[False-True]
Stack Traces | 0.073s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:691: in test_chat_completion_streaming
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.10-huggingface_hub-v0.24.7/lib/python3.10.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming[True-True]
Stack Traces | 0.073s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:691: in test_chat_completion_streaming
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.10-huggingface_hub-v0.24.7/lib/python3.10.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming_with_tools[False-False]
Stack Traces | 0.073s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:941: in test_chat_completion_streaming_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.10-huggingface_hub-v0.24.7/lib/python3.10.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming_with_tools[False-True]
Stack Traces | 0.073s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:941: in test_chat_completion_streaming_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.10-huggingface_hub-v0.24.7/lib/python3.10.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_span_status_error
Stack Traces | 0.073s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:807: in test_span_status_error
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.10-huggingface_hub-v0.24.7/lib/python3.10.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion[True-True]
Stack Traces | 0.074s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:619: in test_chat_completion
    client = InferenceClient(model="test-model", provider="hf-inference")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py3.11-huggingface_hub-v0.24.7/lib/python3.11.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming[False-True]
Stack Traces | 0.074s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:691: in test_chat_completion_streaming
    client = InferenceClient(model="test-model", provider="hf-inference")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py3.11-huggingface_hub-v0.24.7/lib/python3.11.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming_with_tools[False-False]
Stack Traces | 0.074s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:941: in test_chat_completion_streaming_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.8-huggingface_hub-v0.24.7/lib/python3.8.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: __init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming_with_tools[False-False]
Stack Traces | 0.074s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:941: in test_chat_completion_streaming_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py3.11-huggingface_hub-v0.24.7/lib/python3.11.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_with_tools[False-True]
Stack Traces | 0.074s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:852: in test_chat_completion_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.10-huggingface_hub-v0.24.7/lib/python3.10.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion[False-False]
Stack Traces | 0.075s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:619: in test_chat_completion
    client = InferenceClient(model="test-model", provider="hf-inference")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py3.11-huggingface_hub-v0.24.7/lib/python3.11.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion[False-True]
Stack Traces | 0.075s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:619: in test_chat_completion
    client = InferenceClient(model="test-model", provider="hf-inference")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py3.11-huggingface_hub-v0.24.7/lib/python3.11.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion[True-False]
Stack Traces | 0.075s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:619: in test_chat_completion
    client = InferenceClient(model="test-model", provider="hf-inference")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py3.11-huggingface_hub-v0.24.7/lib/python3.11.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_api_error
Stack Traces | 0.075s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:755: in test_chat_completion_api_error
    client = InferenceClient(model="test-model", provider="hf-inference")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py3.11-huggingface_hub-v0.24.7/lib/python3.11.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming[False-False]
Stack Traces | 0.075s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:691: in test_chat_completion_streaming
    client = InferenceClient(model="test-model", provider="hf-inference")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py3.11-huggingface_hub-v0.24.7/lib/python3.11.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming[True-False]
Stack Traces | 0.075s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:691: in test_chat_completion_streaming
    client = InferenceClient(model="test-model", provider="hf-inference")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py3.11-huggingface_hub-v0.24.7/lib/python3.11.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming[True-True]
Stack Traces | 0.075s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:691: in test_chat_completion_streaming
    client = InferenceClient(model="test-model", provider="hf-inference")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py3.11-huggingface_hub-v0.24.7/lib/python3.11.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming_with_tools[True-False]
Stack Traces | 0.075s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:941: in test_chat_completion_streaming_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py3.11-huggingface_hub-v0.24.7/lib/python3.11.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming_with_tools[True-True]
Stack Traces | 0.075s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:941: in test_chat_completion_streaming_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py3.11-huggingface_hub-v0.24.7/lib/python3.11.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_with_tools[False-False]
Stack Traces | 0.075s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:852: in test_chat_completion_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py3.11-huggingface_hub-v0.24.7/lib/python3.11.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_with_tools[False-True]
Stack Traces | 0.075s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:852: in test_chat_completion_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py3.11-huggingface_hub-v0.24.7/lib/python3.11.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_span_status_error
Stack Traces | 0.075s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:807: in test_span_status_error
    client = InferenceClient(model="test-model", provider="hf-inference")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py3.11-huggingface_hub-v0.24.7/lib/python3.11.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_with_tools[True-False]
Stack Traces | 0.076s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:852: in test_chat_completion_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py3.11-huggingface_hub-v0.24.7/lib/python3.11.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_with_tools[True-True]
Stack Traces | 0.076s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:852: in test_chat_completion_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py3.11-huggingface_hub-v0.24.7/lib/python3.11.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming_with_tools[False-True]
Stack Traces | 0.077s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:941: in test_chat_completion_streaming_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py3.11-huggingface_hub-v0.24.7/lib/python3.11.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_with_tools[False-False]
Stack Traces | 0.077s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:852: in test_chat_completion_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.10-huggingface_hub-v0.24.7/lib/python3.10.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: InferenceClient.__init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming_with_tools[True-False]
Stack Traces | 0.089s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:941: in test_chat_completion_streaming_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.8-huggingface_hub-v0.24.7/lib/python3.8.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: __init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion[False-True]
Stack Traces | 0.096s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:619: in test_chat_completion
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.8-huggingface_hub-v0.24.7/lib/python3.8.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: __init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion[True-False]
Stack Traces | 0.096s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:619: in test_chat_completion
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.8-huggingface_hub-v0.24.7/lib/python3.8.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: __init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming[False-True]
Stack Traces | 0.097s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:691: in test_chat_completion_streaming
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.8-huggingface_hub-v0.24.7/lib/python3.8.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: __init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion[False-False]
Stack Traces | 0.098s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:619: in test_chat_completion
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.8-huggingface_hub-v0.24.7/lib/python3.8.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: __init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_api_error
Stack Traces | 0.098s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:755: in test_chat_completion_api_error
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.8-huggingface_hub-v0.24.7/lib/python3.8.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: __init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming[False-False]
Stack Traces | 0.098s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:691: in test_chat_completion_streaming
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.8-huggingface_hub-v0.24.7/lib/python3.8.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: __init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming[True-False]
Stack Traces | 0.098s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:691: in test_chat_completion_streaming
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.8-huggingface_hub-v0.24.7/lib/python3.8.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: __init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_with_tools[False-False]
Stack Traces | 0.098s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:852: in test_chat_completion_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.8-huggingface_hub-v0.24.7/lib/python3.8.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: __init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_with_tools[True-True]
Stack Traces | 0.098s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:852: in test_chat_completion_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.8-huggingface_hub-v0.24.7/lib/python3.8.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: __init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_span_status_error
Stack Traces | 0.098s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:807: in test_span_status_error
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.8-huggingface_hub-v0.24.7/lib/python3.8.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: __init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming[True-True]
Stack Traces | 0.099s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:691: in test_chat_completion_streaming
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.8-huggingface_hub-v0.24.7/lib/python3.8.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: __init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_streaming_with_tools[True-True]
Stack Traces | 0.099s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:941: in test_chat_completion_streaming_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.8-huggingface_hub-v0.24.7/lib/python3.8.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: __init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_with_tools[False-True]
Stack Traces | 0.099s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:852: in test_chat_completion_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.8-huggingface_hub-v0.24.7/lib/python3.8.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: __init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion[True-True]
Stack Traces | 0.1s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:619: in test_chat_completion
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.8-huggingface_hub-v0.24.7/lib/python3.8.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: __init__() got an unexpected keyword argument 'provider'
tests.integrations.huggingface_hub.test_huggingface_hub::test_chat_completion_with_tools[True-False]
Stack Traces | 0.101s run time
.../integrations/huggingface_hub/test_huggingface_hub.py:852: in test_chat_completion_with_tools
    client = InferenceClient(model="test-model", provider="hf-inference")
.tox/py3.8-huggingface_hub-v0.24.7/lib/python3.8.../huggingface_hub/utils/_deprecation.py:31: in inner_f
    return f(*args, **kwargs)
E   TypeError: __init__() got an unexpected keyword argument 'provider'

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@alexander-alderman-webb alexander-alderman-webb marked this pull request as draft October 22, 2025 09:33
@alexander-alderman-webb alexander-alderman-webb marked this pull request as ready for review October 22, 2025 11:11
cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

@sentrivana sentrivana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could put the repeated logic into a function to dedupe a bit, but also fine the way it is.

@alexander-alderman-webb alexander-alderman-webb merged commit cf989a8 into master Oct 22, 2025
115 checks passed
@alexander-alderman-webb alexander-alderman-webb deleted the webb/huggingface-rc7 branch October 22, 2025 11:59
shellmayr pushed a commit that referenced this pull request Oct 30, 2025
Always use "hf-inference" provider for chat completions, which is the existing
behavior of our tests prior to version 1.0.0rc7 of `huggingface_hub`.

Closes #4978
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update tests for huggingface_hub 1.0.0rc7

3 participants