# Agents Course Unit 2.2 error 404

**URL:** <https://discuss.huggingface.co/t/agents-course-unit-2-2-error-404/168035>\
**Category:** Beginners\
**Created:** [September 2, 2025, 12:13pm UTC](https://discuss.huggingface.co/t/agents-course-unit-2-2-error-404/168035 "2025-09-02T12:13:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Siniara](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@Siniara](https://discuss.huggingface.co/u/Siniara)\
**Post date:** [September 2, 2025, 12:13pm UTC](https://discuss.huggingface.co/t/agents-course-unit-2-2-error-404/168035/1 "2025-09-02T12:13:41Z")

</div>

Hi,

I’m doing unit 2.2 of the the beginner agents course. Up until that point with little to no issue. However now, when any `llama_index` model calls are made in the course notebooks I get this error.

I don’t know what to do. When I click on the link in the error it says that user name or password is not correct. But at the beginning of each notebook you have to sign in to your HF account, which I have done without issue, so idk why it would say that the creds are not correct. The HF token is also set up correctly. The notebooks from earlier in the course that used smolagents still run with no issue. Any tips? Does something additional needs to be set up when using `llama_index`?

```python
WorkflowRuntimeError: Error in step 'run_agent_step': 404, message='Not Found', url='https://router.huggingface.co/hf-inference/models/Qwen/Qwen2.5-Coder-32B-Instruct/v1/chat/completions'

```

```python
{"error":"Invalid username or password."}

```

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [September 2, 2025, 1:38pm UTC](https://discuss.huggingface.co/t/agents-course-unit-2-2-error-404/168035/2 "2025-09-02T13:38:32Z")

</div>

It seems that [explicitly specifying `task="text-generation"` may resolve the issue with llama\_index](https://huggingface.co/agents-course/notebooks/discussions/82).

```py
llm = HuggingFaceInferenceAPI(
    model="Qwen/Qwen2.5-Coder-32B-Instruct",
    task="text-generation"
)

```

---

<div class="post-metadata">

**Author:** ![Siniara](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@Siniara](https://discuss.huggingface.co/u/Siniara)\
**Post date:** [September 3, 2025, 12:51pm UTC](https://discuss.huggingface.co/t/agents-course-unit-2-2-error-404/168035/3 "2025-09-03T12:51:54Z")

</div>

> [@John6666](#):
>
> `task="text-generation"`

thanks for trying to help, this unfortunately had no result on my side and it still fails with the same error ;/  
I suppose that means that the libraries have changed since the course was released?

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [September 3, 2025, 10:57pm UTC](https://discuss.huggingface.co/t/agents-course-unit-2-2-error-404/168035/4 "2025-09-03T22:57:00Z")

</div>

> I suppose that means that the libraries have changed since the course was released?

Yeah. Also, [the behavior of the Hugging Face servers has changed slightly](https://discuss.huggingface.co/t/hf-agents-course-404-client-error-not-found-for-url/162747).

```py
llm = HuggingFaceInferenceAPI(
    model="Qwen/Qwen2.5-Coder-32B-Instruct",
    task="text-generation",
    provider="auto",
)

```
