# HuggingFace models accept every field they document

> Agno's `HuggingFace` model now passes `default_headers` to the SDK as `headers` and sends `store` in `extra_body`. An agent with no tools stops sending an empty `tools` list.

- Published: 2026-10-27
- Author: Kaustubh Shukla
- Categories: Changelog
- Canonical: https://www.agno.com/blog/huggingface-models-accept-every-field-they-document
- Markdown: https://www.agno.com/blog/huggingface-models-accept-every-field-they-document.md

Agno's `HuggingFace` model raised `TypeError` in earlier releases the moment it built its `InferenceClient` if you set `default_headers`, `max_retries` or `default_query`, because the `huggingface_hub` SDK takes none of those names. Setting `store` failed every run in the same way, one step later.

This release maps `default_headers` to the SDK's `headers`. `max_retries` and `default_query` have no SDK counterpart, so the model warns once with a `DeprecationWarning` and drops them. Use Agno's `retries=` to retry, and put query parameters in `base_url`. `store` now rides in `extra_body`, and a `store` you write into `request_params["extra_body"]` yourself wins.

Agents with no tools also sent `tools=[]` with `tool_choice="auto"`. HuggingFace backends answered that request with no text, so non-streaming `run` and `arun` returned `None` content while streaming looked fine. The request now leaves both fields out.

```text
# Real output, dummy token, InferenceClient.chat_completion mocked to capture the request

# Before
HuggingFace(default_headers={"X-Team": "agno"}).get_client()
TypeError: InferenceClient.__init__() got an unexpected keyword argument 'default_headers'
HuggingFace(store=True), agent.run("Say hello")
InferenceClient.chat_completion() got an unexpected keyword argument 'store'
agent with no tools sent: {'tools': [], 'tool_choice': 'auto'}

# Now
client params: {'headers': {'X-Team': 'agno'}}
store=True request params: {'extra_body': {'store': True}}
agent with no tools sent: no tools / tool_choice
```

See the [cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/90_models/huggingface/basic.py), and learn more about the [HuggingFace model](https://docs.agno.com/models/providers/gateways/huggingface/overview) and its [parameters](https://docs.agno.com/reference/models/huggingface) in the documentation.
