# Agents Course Quiz

**URL:** <https://discuss.huggingface.co/t/agents-course-quiz/170804>\
**Category:** Course\
**Created:** [November 24, 2025, 2:47pm UTC](https://discuss.huggingface.co/t/agents-course-quiz/170804 "2025-11-24T14:47:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pearlmining](https://avatars.discourse-cdn.com/v4/letter/p/e95f7d/32.png) [@pearlmining](https://discuss.huggingface.co/u/pearlmining)\
**Post date:** [November 24, 2025, 2:47pm UTC](https://discuss.huggingface.co/t/agents-course-quiz/170804/1 "2025-11-24T14:47:18Z")

</div>

Hi Guys,

For unit 2.1 in The Smolagents Framework I am not getting a feedback for the Final Quiz . Every time I submit the codes in the quiz I get the message “Error generating feedback: 410  
Client Error: Gone for url: https:api-inference.huggingface.co/models/Qwen/Qwen2.5-Coder-32B-Instruct  
https: [api-inference.huggingface.co](http://api-inference.huggingface.co) is no longer supported.  
Please use https:router.huggingface.co instead.”

Please help me to resolve this issue or suggest any debugging or any coding way .

---

<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:** [November 24, 2025, 2:50pm UTC](https://discuss.huggingface.co/t/agents-course-quiz/170804/2 "2025-11-24T14:50:06Z")

</div>

[Maybe this case](https://discuss.huggingface.co/t/03-error-when-using-qwen-qwen2-5-vl-32b-instruct-with-inference-provider/168789/7)? Space-side issue.

---

<div class="post-metadata">

**Author:** ![Voiid-m](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/voiid-m/32/56975_2.png) [@Voiid-m](https://discuss.huggingface.co/u/Voiid-m)\
**Post date:** [December 31, 2025, 5:08am UTC](https://discuss.huggingface.co/t/agents-course-quiz/170804/3 "2025-12-31T05:08:41Z")

</div>

Hi,  
I have the same issue. I even tried to copy paste the official solution given after the test with the same result.

---

<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:** [December 31, 2025, 8:08am UTC](https://discuss.huggingface.co/t/agents-course-quiz/170804/4 "2025-12-31T08:08:20Z")

</div>

As of today, the situation is roughly like this.

* * *

## What’s going on (and why your submission never gets feedback)

Your quiz “feedback generator” is trying to call this legacy endpoint:

`https://api-inference.huggingface.co/models/Qwen/Qwen2.5-Coder-32B-Instruct`

Hugging Face is deprecating that legacy `api-inference.huggingface.co` domain. The server now returns **HTTP 410 Gone** and explicitly tells you to use **`router.huggingface.co`** instead. You are seeing the exact message in the course forum thread. ([Hugging Face Forums](https://discuss.huggingface.co/t/agents-course-quiz/170804 "Agents Course Quiz - Course - Hugging Face Forums"))

This matters because the **quiz feedback is not computed by “your code” alone**. It is computed by the quiz backend (a Space) that calls a model to evaluate your submission. Multiple users report:

- Same 410 in Unit 2.1 quiz. ([Hugging Face Forums](https://discuss.huggingface.co/t/agents-course-quiz/170804 "Agents Course Quiz - Course - Hugging Face Forums"))
- Same error even when pasting the official solution. ([Hugging Face Forums](https://discuss.huggingface.co/t/agents-course-quiz/170804 "Agents Course Quiz - Course - Hugging Face Forums"))
- People conclude “space-side fix” is needed. ([Hugging Face Forums](https://discuss.huggingface.co/t/03-error-when-using-qwen-qwen2-5-vl-32b-instruct-with-inference-provider/168789 "03 Error When Using Qwen/Qwen2.5-VL-32B-Instruct with Inference Provider - Models - Hugging Face Forums"))

So there is usually **no user-side change** that makes the official quiz feedback work, because the grader’s own model call is failing.

* * *

## What users should do today (practical, in order)

### 1) Treat the quiz feedback as broken grader-side, not as “your code is wrong”

Do one quick sanity check:

- Submit a deliberately minimal or obviously wrong answer.
- If you still get the same 410 message, that confirms the grader is failing before it can evaluate your code.

That aligns with the course thread: users see the same error regardless of solution quality. ([Hugging Face Forums](https://discuss.huggingface.co/t/agents-course-quiz/170804 "Agents Course Quiz - Course - Hugging Face Forums"))

**Conclusion:** you cannot “debug your submission” into fixing an endpoint the grader uses.

* * *

### 2) Keep progressing in the course using local verification instead of quiz feedback

The Unit 2.1 notebook shows the intended workflow: build a `CodeAgent` with `InferenceClientModel` (defaulting to a Qwen 2.5 Coder model) and run tasks. ([Hugging Face](https://huggingface.co/agents-course/notebooks/raw/main/unit2/smolagents/code_agents.ipynb "huggingface.co"))

What to do in practice:

- Run the unit notebook exercises end-to-end.

- For each quiz question, run your agent locally and validate outputs with your own checks:

This is the same skill the quiz is trying to evaluate, just without the broken grader.

* * *

### 3) For your own code and projects: migrate to Inference Providers (router) now

Even if the quiz grader is broken, your **own** smolagents code should be updated to the supported path so you are not blocked elsewhere.

#### Background: what replaced `api-inference.huggingface.co`

Hugging Face’s current direction is “Inference Providers,” reachable through:

- **OpenAI-compatible** endpoint: `https://router.huggingface.co/v1` ([Hugging Face](https://huggingface.co/inference/get-started "Hugging Face – The AI community building the future."))
- **HF client SDKs** that handle provider differences automatically ([Hugging Face](https://huggingface.co/docs/smolagents/en/reference/models "Models"))

#### Critical prerequisite: token permissions

Use a **fine-grained token** with **“Make calls to Inference Providers”** permission. This is explicitly required in the docs. ([Hugging Face](https://huggingface.co/docs/inference-providers/en/index "Inference Providers"))

* * *

## Working code options (pick one)

### Option A: smolagents-native (`InferenceClientModel`)

This matches the course ecosystem. `InferenceClientModel` wraps `huggingface_hub`’s inference client and supports Inference Providers. ([Hugging Face](https://huggingface.co/docs/smolagents/en/reference/models "Models"))

```python
# deps:
# pip install -U smolagents huggingface_hub

import os
from smolagents import InferenceClientModel

model = InferenceClientModel(
    model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
    provider="auto", # let HF route across providers
    api_key=os.environ["HF_TOKEN"], # fine-grained token with Inference Providers permission
    requests_per_minute=30,
)

# quick smoke test
messages = [{"role": "user", "content": [{"type": "text", "text": "Return 'ok'."}]}]
print(model(messages))

```

Notes:

- `InferenceClientModel` supports rate limiting via `requests_per_minute`. ([Hugging Face](https://huggingface.co/docs/smolagents/en/reference/models "Models"))
- Automatic routing and failover behavior is part of Inference Providers design. ([Hugging Face](https://huggingface.co/docs/inference-providers/en/index "Inference Providers"))

* * *

### Option B: OpenAI SDK pointing at HF Router (`router.huggingface.co/v1`)

This is the simplest mental model if you already know OpenAI’s client. The official “Getting Started” page shows this pattern. ([Hugging Face](https://huggingface.co/inference/get-started "Hugging Face – The AI community building the future."))

```python
# deps:
# pip install -U openai

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://router.huggingface.co/v1",
    api_key=os.environ["HF_TOKEN"],
)

resp = client.chat.completions.create(
    model="Qwen/Qwen2.5-Coder-32B-Instruct",
    messages=[{"role": "user", "content": "Say 'ok'."}],
)

print(resp.choices[0].message.content)

```

Provider control (useful when “auto” is flaky):

- Append `:fastest` or `:cheapest`
- Or pin a provider: `model="…:sambanova"` ([Hugging Face](https://huggingface.co/docs/inference-providers/en/index "Inference Providers"))

* * *

### Option C: `huggingface_hub` `InferenceClient` (direct HF client)

If you want HF-native API surfaces, use the `InferenceClient` reference. It explicitly recommends `chat_completion()` for chat-style messages. ([Hugging Face](https://huggingface.co/docs/huggingface_hub/en/package_reference/inference_client "Inference"))

* * *

## Debug checklist (what you can actually control)

### If you are debugging the quiz itself

You mostly cannot. Still, you can confirm:

- Error includes `api-inference.huggingface.co` and 410. That is the retired endpoint. ([Hugging Face Forums](https://discuss.huggingface.co/t/agents-course-quiz/170804 "Agents Course Quiz - Course - Hugging Face Forums"))
- Others reproduce, including with official solutions. That points to grader failure. ([Hugging Face Forums](https://discuss.huggingface.co/t/agents-course-quiz/170804 "Agents Course Quiz - Course - Hugging Face Forums"))

Action: report it on the same course thread or Space discussion so maintainers migrate the grader.

### If you are debugging your own local code

You can fix these:

1. **Endpoint usage**

- If your code or dependency calls `api-inference.huggingface.co`, it will keep failing with 410. ([Hugging Face Forums](https://discuss.huggingface.co/t/agents-course-quiz/170804 "Agents Course Quiz - Course - Hugging Face Forums"))
- Use Inference Providers via router `…/v1` instead. ([Hugging Face](https://huggingface.co/inference/get-started "Hugging Face – The AI community building the future."))

1. **Token permissions**

- Fine-grained token with “Make calls to Inference Providers.” ([Hugging Face](https://huggingface.co/docs/inference-providers/en/index "Inference Providers"))

1. **Provider selection**

- If a model is slow, rate-limited, or unavailable, try `:fastest`, `:cheapest`, or a specific provider suffix. ([Hugging Face](https://huggingface.co/docs/inference-providers/en/index "Inference Providers"))

1. **Model availability**

- Check the Inference Providers model list and providers. ([Hugging Face](https://huggingface.co/inference/models "Hugging Face Inference Providers · Supported Models"))

* * *

## If you need “quiz-like feedback” today

You have two realistic paths:

1. **Self-grade locally** using deterministic checks (tool usage, returned format, basic unit tests around your functions). This keeps your learning moving even if the official feedback is down.

2. **Clone the quiz Space and patch it** (only if you want a working grader for yourself). People already identify the fix as “space-side.” ([Hugging Face Forums](https://discuss.huggingface.co/t/03-error-when-using-qwen-qwen2-5-vl-32b-instruct-with-inference-provider/168789 "03 Error When Using Qwen/Qwen2.5-VL-32B-Instruct with Inference Provider - Models - Hugging Face Forums"))  
This will not restore the official course scoring, but it can recreate the feedback experience locally.

* * *

## Key references worth using (high signal)

- Inference Providers docs (auth, routing, suffixes, curl examples). ([Hugging Face](https://huggingface.co/docs/inference-providers/en/index "Inference Providers"))
- Getting Started example using `base_url="https://router.huggingface.co/v1"`. ([Hugging Face](https://huggingface.co/inference/get-started "Hugging Face – The AI community building the future."))
- smolagents `InferenceClientModel` reference. ([Hugging Face](https://huggingface.co/docs/smolagents/en/reference/models "Models"))
- The exact course thread confirming it’s widespread and likely grader-side. ([Hugging Face Forums](https://discuss.huggingface.co/t/agents-course-quiz/170804 "Agents Course Quiz - Course - Hugging Face Forums"))

* * *

## Summary

- **You are hitting a retired endpoint.** 410 means it is gone, not temporarily down. ([Hugging Face Forums](https://discuss.huggingface.co/t/agents-course-quiz/170804 "Agents Course Quiz - Course - Hugging Face Forums"))
- **For the official quiz UI, there is usually no user-side fix.** Evidence points to a grader Space calling the old endpoint. ([Hugging Face Forums](https://discuss.huggingface.co/t/agents-course-quiz/170804 "Agents Course Quiz - Course - Hugging Face Forums"))
- **For your own work today, migrate to Inference Providers.** Use `router.huggingface.co/v1` or smolagents `InferenceClientModel`. ([Hugging Face](https://huggingface.co/inference/get-started "Hugging Face – The AI community building the future."))
- **Use a fine-grained token with Inference Providers permission.** ([Hugging Face](https://huggingface.co/docs/inference-providers/en/index "Inference Providers"))

---

<div class="post-metadata">

**Author:** ![kartik0098](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/kartik0098/32/58914_2.png) [@kartik0098](https://discuss.huggingface.co/u/kartik0098)\
**Post date:** [March 26, 2026, 7:47am UTC](https://discuss.huggingface.co/t/agents-course-quiz/170804/5 "2026-03-26T07:47:25Z")

</div>

I’m having the same issue. Have you found the solution?

Assessment Criteria:

- Correct imports are included

- DuckDuckGoSearchTool is added to tools list

- HfApiModel is properly configured

- Model ID is correctly specified

#### Feedback:

Unable to generate detailed feedback due to an error.

---

<div class="post-metadata">

**Author:** ![mfarragher](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@mfarragher](https://discuss.huggingface.co/u/mfarragher)\
**Post date:** [April 9, 2026, 9:11pm UTC](https://discuss.huggingface.co/t/agents-course-quiz/170804/6 "2026-04-09T21:11:32Z")

</div>

Cross-posting to my [comment in an open issue](https://huggingface.co/spaces/agents-course/unit2_smolagents_quiz/discussions/19#69d813377f9be47d535cbaa8) about how I am experiencing this error.

I have tried a workaround suggested in this topic - about cloning the space and patching code - but I am unable to do that and have posted an error log in that comment.
