Agents Course Quiz

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 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 .

2 Likes

Maybe this case? Space-side issue.

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

1 Like

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://huggingface.co/proxy/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)

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:

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)

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)

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:

    • Did the tool get called correctly (web search, webpage visit, etc)?
    • Did the code execute without sandbox errors?
    • Does the final answer satisfy the prompt constraints?

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://huggingface.co/proxy/router.huggingface.co/v1 (Hugging Face)
  • HF client SDKs that handle provider differences automatically (Hugging Face)

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)


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)

# 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)
  • Automatic routing and failover behavior is part of Inference Providers design. (Hugging Face)

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)

# deps:
#   pip install -U openai

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://huggingface.co/proxy/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)

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)


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)
  • Others reproduce, including with official solutions. That points to grader failure. (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)
  • Use Inference Providers via router …/v1 instead. (Hugging Face)
  1. Token permissions
  • Fine-grained token with “Make calls to Inference Providers.” (Hugging Face)
  1. Provider selection
  • If a model is slow, rate-limited, or unavailable, try :fastest, :cheapest, or a specific provider suffix. (Hugging Face)
  1. Model availability
  • Check the Inference Providers model list and providers. (Hugging Face)

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)
    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)
  • Getting Started example using base_url="https://huggingface.co/proxy/router.huggingface.co/v1". (Hugging Face)
  • smolagents InferenceClientModel reference. (Hugging Face)
  • The exact course thread confirming it’s widespread and likely grader-side. (Hugging Face Forums)

Summary

  • You are hitting a retired endpoint. 410 means it is gone, not temporarily down. (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)
  • For your own work today, migrate to Inference Providers. Use router.huggingface.co/v1 or smolagents InferenceClientModel. (Hugging Face)
  • Use a fine-grained token with Inference Providers permission. (Hugging Face)