Environment
- Qwen Code version: latest
- Operating System: MacOS
- Authentication: Initially OAuth → switched to Coding Plan API key
Steps to Reproduce
- Authenticate with Qwen Code via OAuth using account A
- Use the service until hitting free usage limits
- Purchase Coding Plan and add the new API key via /auth
- Authentication shows success with the new API key
- Attempt to continue the existing session or start a new conversation
- Receive error: ✕ [API Error: 401 invalid access token or token expired]
- Even after attempting to /auth via OAuth to a different account, the error persists
Expected Behavior
After successfully adding a new Coding Plan API key via /auth, the system should use the new API key for all subsequent requests and allow continued usage.
Actual Behavior
The system continues to use the old OAuth tokens instead of the new API key, resulting in 401 authentication errors. The authentication state appears to be sticky and doesn't properly switch from OAuth to API key authentication.
Additional Context
- The issue occurs when transitioning from OAuth-based free usage to Coding Plan API key usage
- Both accounts (original OAuth and attempted new OAuth) seem affected
- This suggests the authentication context/session is not properly cleared or refreshed when switching auth methods
- The error persists across attempts to re-authenticate
- Change model still appears error -> ✕ [API Error: Qwen API quota exceeded: Your Qwen API quota has been exhausted. Please wait for your quota to reset.]
- Any plan add more quotas for users via oauth that subscribe coding plan?
This creates a frustrating user experience where users who upgrade to paid Coding Plan cannot continue using Qwen Code without potentially starting completely fresh.
Environment
Steps to Reproduce
Expected Behavior
After successfully adding a new Coding Plan API key via /auth, the system should use the new API key for all subsequent requests and allow continued usage.
Actual Behavior
The system continues to use the old OAuth tokens instead of the new API key, resulting in 401 authentication errors. The authentication state appears to be sticky and doesn't properly switch from OAuth to API key authentication.
Additional Context
This creates a frustrating user experience where users who upgrade to paid Coding Plan cannot continue using Qwen Code without potentially starting completely fresh.