huggingface / huggingface/mcp-course

Not able to access qwen inference model: Invalid username of password

Open
#55 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
MDX
Stars
918
Forks
255
PR merge metrics
No merged PRs in 30d

Description

With the code provided for [client app.py](https://github.com/huggingface/mcp-course/blob/main/units/en/unit2/gradio-client.mdx#complete-example)
I am not able to access the inference model.

Error message:

```bash
raise AgentGenerationError(f"Error in generating model output:\n{e}", self.logger) from e
smolagents.utils.AgentGenerationError: Error in generating model output:
401 Client Error: Unauthorized for url: https://router.huggingface.co/hf-inference/models/Qwen/Qwen2.5-Coder-32B-Instruct/v1/chat/completions (Request ID: Root=1-68315bcf-3b94db0e1523ae07246e9ef4;27f23374-cd3d-4a0e-b756-09d3dba4bcf7)

Invalid username or password.
```

Have the same issue while running the client from hugging face client as well

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the complete example in units/en/unit2/gradio-client.mdx and compare its client configuration with the reported Hugging Face client run. Reproduce the request to the Qwen/Qwen2.5-Coder-32B-Instruct endpoint and inspect the authentication setup around the 401 response. Done means the example can access the inference model without the invalid username or password error.

Written by the indexing model from the issue text.

Assessment

Tech stack
huggingface, python
Domain
ai, authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.