Hey Fyahdii! That 402 error with the “Invalid username or password” message is odd, especially with a Pro account. I’ve hit similar issues with Hugging Face’s API when the token wasn’t set up right. Check that your HUGGINGFACEHUB_API_TOKEN
is correctly loaded in your environment (e.g., via os.environ
or .env
) and matches the token from your Hugging Face account settings—copy-paste can sometimes add hidden characters. Also, verify the repo_id
for Qwen/Qwen2.5-14B-Instruct-1M
is correct, as a mismatch can cause errors. Could you share a snippet of how you’re initializing HuggingFaceEndpoint
? Has anyone else seen 402 errors with Qwen models on LangChain?
1 Like