feat(v1.5.0): fix rate limiting (#4) + dynamic endpoints + official h…#8
Open
luanweslley77 wants to merge 1 commit intogustavodiasdev:mainfrom
Open
feat(v1.5.0): fix rate limiting (#4) + dynamic endpoints + official h…#8luanweslley77 wants to merge 1 commit intogustavodiasdev:mainfrom
luanweslley77 wants to merge 1 commit intogustavodiasdev:mainfrom
Conversation
…s + official headers Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 Summary
This PR resolves the critical rate limiting issue (#4) and introduces dynamic API endpoint resolution with official Qwen Code headers for proper quota recognition.
Fixes #4
✨ Key Changes
Rate Limiting Fix (Issue #4)
Added QWEN_OFFICIAL_HEADERS with required identification headers
Session tracking with unique sessionId per plugin instance
Prompt tracking with unique promptId per request
Full 2,000 requests/day quota now available
Dynamic API Endpoint Resolution
Automatic region detection based on OAuth token resource_url
Support for portal.qwen.ai, dashscope, and dashscope-intl
Works globally with any Qwen account region
Latest Model Support
Added qwen3.5-plus – Latest flagship hybrid model
Vision capabilities with dynamic modalities
Enhanced config hook with proper headers
📁 Files Modified
src/constants.ts – Official headers + qwen3.5-plus model
src/index.ts – Session tracking + headers in loader
src/plugin/auth.ts – loadCredentials() + resolveBaseUrl()
package.json – Version 1.5.0
🧪 Testing
Tested with:
Fresh OAuth authentication
Multiple consecutive requests (no rate limiting)
Session persistence across restarts
qwen3.5-plus model
🔄 Comparison with PR #7
This PR includes all features from PR #7 plus:
✅ Complete official headers (not just DashScope-specific)
✅ Session and prompt tracking for quota recognition
✅ qwen3.5-plus model support
✅ Vision capabilities in modalities
✅ Direct fix for Issue #4