Why does Qwen Code Companion show '401 invalid access token or token expired' in VS Code?
Since 2026-04-16, Qwen Code Companion in Visual Studio Code fails on versions 0.14.5 and earlier with 'Internal error: 401 invalid access token or token expired'. It worked the day before. Why did this start and how can I keep using Qwen Code?
Originally asked on GitHub: https://github.com/QwenLM/qwen-code/issues/3348
2 answers
This is explained, not fixed by a code change: a commenter pointed to the 2026-04-15 announcement that the Qwen OAuth free tier was discontinued, and the maintainer closed this report as a duplicate of #3203, asking users to follow that issue for quota and access updates.
The error is not specific to the extension version: both 0.14.5 and the previous version started failing on the same day. To continue using Qwen Code, run
qwen authand configure one of the providers listed in the thread: Alibaba Cloud Coding Plan, OpenRouter, Fireworks AI, or your own API key. The thread does not offer any existing-token workaround.General advice: if you configure a personal API key with
qwen auth, keep it out of shared config files and logs.Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Reporter used Qwen Code Companion 0.14.5 and the previous version in VS Code; both worked until 2026-04-15 and then returned 'Internal error: 401 invalid access token or token expired'.
Source: https://github.com/QwenLM/qwen-code/issues/3348 (opens external site)
Did this work for you?
Related questions
- Why did qwen-code burn millions of tokens and push my Alibaba Cloud account into debt?
- Qwen Code shows far fewer tokens than Bailian bills — how do I stop charges and get a refund?
- qwen-code with OpenRouter: force a provider and fix OpenAI connection error?
- How do I enable Agentic Coding Protocol (ACP) support for qwen-code in Zed?
- Ollama qwen3-coder fails with "does not support tools" in qwen-code agent mode