← Back to PRs

#14013: feat: Add Qwen DashScope API Key authentication support

by pkycy open 2026-02-11 09:32 View on GitHub →
extensions: qwen-portal-auth commands agents stale
Add DashScope API Key authentication for Qwen provider. Features: - API Key authentication (International + China regions) - 9 verified models (qwen3-coder-plus, qwen3-max, etc.) - Environment variable support (QWEN_API_KEY) - Onboard wizard integration Testing: - Verified in both regions with real API keys - All models tested against live APIs - OAuth flow unchanged (no regression) - Build passes without errors See QWEN_API_KEY.md for details. <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR adds DashScope API Key authentication to the Qwen provider, complementing the existing OAuth flow. The implementation follows established plugin patterns and includes region selection for International (Singapore) and China endpoints with 9 verified models. **Key changes:** - Added `QWEN_API_KEY` environment variable support in `src/agents/model-auth.ts:276` - Implemented API key authentication method with region selection in `extensions/qwen-portal-auth/index.ts:127-266` - Added `qwen-api-key` auth choice type to onboard wizard - Updated routing logic to handle both OAuth and API key flows **Implementation approach:** The PR reuses the existing `qwen-portal` provider and plugin infrastructure, adding an `api-key` auth method alongside the existing `device` (OAuth) method. Region selection determines which DashScope endpoint to use, with API keys validated for the `sk-` prefix format. <h3>Confidence Score: 4/5</h3> - This PR is safe to merge with minimal risk - The implementation follows established authentication plugin patterns (similar to minimax-portal-auth), uses the correct type system for auth profiles, integrates properly with the existing onboard wizard, and includes comprehensive documentation. The validation logic uses soft warnings ("typically") rather than hard failures for the API key prefix, which provides flexibility while still guiding users. All changes are additive and backwards-compatible. - No files require special attention <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs