Repository navigation
Fix: Use resolved authType to initialize ACP agent - #1622
Merged
Merged
Conversation
Mingholy
requested review from
DennisYu07,
LaZzyMan,
gwinthis,
pomelo-nwu and
tanzhenxin
as code owners
January 27, 2026 07:02
Contributor
📋 Review SummaryThis PR fixes an important authentication issue in the ACP agent by ensuring the resolved authType from the configuration is used instead of the persisted settings value. The changes involve refactoring the Config class to expose getModelsConfig() as a method rather than a public property, and updating all references across the codebase to use the new API. 🔍 General Feedback
🎯 Specific FeedbackNo specific issues identified in this review. ✅ Highlights
|
Contributor
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
tanzhenxin
approved these changes
Jan 27, 2026
xaelistic
pushed a commit
to xaelistic/qwen-code
that referenced
this pull request
Jun 7, 2026
Fix: Use resolved authType to initialize ACP agent
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.
TLDR
Fixes an issue where the ACP agent was not using the resolved authType from the configuration. The change updates the code to properly use
config.getModelsConfig().getCurrentAuthType()instead of the persistedthis.settings.merged.security?.auth?.selectedType.Dive Deeper
This PR addresses an authentication issue in the ACP agent initialization by ensuring the correct authentication type is used. The main change involves replacing the direct access to settings-based auth selection with the proper config method
getModelsConfig().getCurrentAuthType().The changes affect multiple files across the codebase:
acpAgent.tsto use the resolved authType from configgetModelsConfig()instead of directmodelsConfigproperty access)config.tsto exposegetModelsConfig()as a method rather than a public propertyThis ensures that CLI arguments, environment variables, and settings are properly respected when determining the authentication type, particularly in non-interactive modes.
Reviewer Test Plan
Pull the branch and run the tests to ensure nothing is broken:
npm testTest the ACP integration with different authentication methods:
--auth-typeargument and verify it's respectedVerify the non-interactive authentication flow works correctly:
# Test with different auth types qwen --auth-type=qwen-oauth [other args] qwen --auth-type=openai [other args]Check that the ACP agent initializes properly with the correct authentication type.
Testing Matrix
Linked issues / bugs
Related to #1533