Huggingface model error

I’m trying to initiate huggingface model to my agent
from agno.models.huggingface import HuggingFace
llm_model = HuggingFace(id=“meta-llama/Llama-3.2-1B-Instruct”,
max_tokens=500,)
product_search_agent = Agent(
name=“Product search agent”,
role=“Search the web for product information”,
model=llm_model,
tools=[DuckDuckGoTools(), ExaTools()],…)

product_agent = Agent(team=[product_search_agent],
model=llm_model,…)

error:
huggingface_hub.errors.UnknownError: {‘message’: “Input validation error: cannot compile regex from schema: ‘type’ must be a string”, ‘http_status_code’: 422}

I tried using non-instruct model and I’m getting a template not found error:
from agno.models.huggingface import HuggingFace
llm_model = HuggingFace(id=“meta-llama/Llama-3.2-1B-”,
max_tokens=500,)

error:
huggingface_hub.errors.HfHubHTTPError: 422 Client Error: Unprocessable Entity for url: https://api-inference.huggingface.co/models/meta-llama/Llama-3.2-1B/v1/chat/completions (Request ID: Root=1-67c05dca-5a7852d63e1c5fd2765b6b45;fd39c347-3255-4053-84e1-7c7a77539017)

Template error: template not found
Make sure ‘text-generation’ task is supported by the model.

I’m experiencing the same error. Have you found any soluion?

Hi @Dhanush
Thanks for reaching out and for using Agno! I’ve looped in the right engineers to help with your question. We usually respond within 48 hours, but if this is urgent, just let us know, and we’ll do our best to prioritize it.
Appreciate your patience—we’ll get back to you soon! :smile:

Hi @Dhanush Our team has pushed a fix and it is available in the latest version. It should workj for you now .Thanks for pointing out the issue .