-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Add Qwen Coder OAuth authentication support #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #24
Research findings comparing OAuth implementations across CLI agentic tools: - Qwen Code CLI: Device Code OAuth flow with qwen.ai - Claude Code: PKCE OAuth with Anthropic - Gemini CLI: Google OAuth with web-based and user-code flows - OpenCode: Plugin-based auth system supporting multiple providers Includes implementation proposals for @link-assistant/agent: - Option 1: Full Device Code OAuth implementation - Option 2: Credential reading only (minimal) - Option 3: Plugin-style architecture - Recommended: Hybrid phased approach Documents credential storage locations for compatibility: - Primary: ~/.qwen/oauth_creds.json (Qwen Code CLI) - Fallback: ~/.agent/qwen/ (our app folder) Closes research phase of #24 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This reverts commit cdf633c.
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
https://github.com/lion-lef/qwen-auth-opencode - here we have working example implementation, please get latest changes from default branch, and integrate it with our |
|
🤖 AI Work Session Started Starting automated work session at 2026-01-26T08:42:19.400Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback. |
Implements Qwen OAuth 2.0 Device Flow for the agent CLI, providing: - New `agent auth login [qwen|alibaba]` command with OAuth and API key support - Qwen Device Code flow compatible with chat.qwen.ai OAuth endpoints - Token refresh handling with automatic renewal before expiration - New qwen-coder provider with coder-model and vision-model (free tier) - Support for both OAuth (2,000 free requests/day) and DashScope API key auth Auth commands: - `agent auth login` - Interactive provider selection - `agent auth login qwen` - Qwen OAuth login (free tier) - `agent auth login alibaba` - DashScope API key login - `agent auth logout [provider]` - Logout from provider - `agent auth status` - Show authentication status Fixes #24 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Solution Draft LogImplemented Qwen Coder OAuth authentication support based on the qwen-auth-opencode reference implementation. What was implemented:
Files changed:
Usage:# Interactive login
agent auth login
# Qwen OAuth (free tier)
agent auth login qwen
# Check status
agent auth status
# Logout
agent auth logout qwenWorking session completed. |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
As I understand it, free tier + subscription should be available as both Qwen Coder and Alibaba menu items. Resolve conflicts, ensure all changes are correct, consistent and fully meet all discussed requirements. |
|
🤖 AI Work Session Started Starting automated work session at 2026-01-26T10:12:13.854Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback. |
- Resolve merge conflicts from main branch restructure (js/ directory) - Add Qwen Coder OAuth (device flow) plugin for free tier authentication - Add Alibaba DashScope API key authentication support - Both menu items (Qwen Coder and Alibaba) support: - OAuth device flow (2,000 free requests/day via chat.qwen.ai) - DashScope API key (pay-as-you-go, China and International regions) - Remove old src/ files that moved to js/src/ - Remove old Qwen OAuth research documentation Based on qwen-auth-opencode reference implementation: https://github.com/lion-lef/qwen-auth-opencode Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Implementation CompleteAll CI checks are now passing. The implementation includes: Features Added:
OAuth Implementation Details:
API Key Support:
Files Changed:
Usage:# Interactive login (select Qwen Coder or Alibaba from menu)
agent auth login
# Check status
agent auth status
# Logout
agent auth logoutBoth "Qwen Coder" and "Alibaba" menu items now support:
Working session complete. Ready for review. |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
Summary
Implements Qwen Coder OAuth authentication support for the agent CLI, based on the qwen-auth-opencode reference implementation.
Authentication Methods
Both Qwen Coder and Alibaba provider menu items now support two authentication methods:
Qwen Coder OAuth (Free Tier)
DashScope API Key
Usage
Implementation Details
js/src/auth/plugins.tsTest plan
agent auth loginand select "Qwen Coder" → "Qwen Coder OAuth"agent auth loginand select "Alibaba" → "DashScope API Key"agent auth statusto verify credentials are storedagent auth logoutto verify credentials can be removedCloses #24
🤖 Generated with Claude Code