Refactor model provider configuration to providerId-keyed structure (V4)#46
Open
BingqingLyu wants to merge 6 commits into
Open
Refactor model provider configuration to providerId-keyed structure (V4)#46BingqingLyu wants to merge 6 commits into
BingqingLyu wants to merge 6 commits into
Conversation
…sioning - Changed references from V3 to current version in migration tests to reflect the new SETTINGS_VERSION. - Updated test assertions to verify migration to the latest version instead of hardcoded version numbers. - Introduced new migration logic for transitioning from V3 to V4 settings structure. - Enhanced model provider configuration to support new providerId format and ensure backward compatibility.
Add generateProviderIdFromBaseUrl function to create more user-friendly provider IDs by extracting domain names from baseUrl (e.g., api.openai.com → openai). Falls back to authType-based naming when URL parsing fails. Update documentation to reflect v4 configuration format with providerId structure, including new migration guide section. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
…ix chars - Change selection indicator from ● to › for better visual alignment - Add prefix character system (›, ↑, ↓) aligned with SessionPicker - Add centerSelection prop to keep selected item centered in visible window - Change scroll indicators from ▲/▼ to ↑/↓ for Unicode consistency - Update DescriptiveRadioButtonSelect to support centerSelection - Add height=2 and description fallback for consistent layout Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Update migration tests to expect providerIds generated from baseUrl domains (e.g., 'my-proxy' instead of 'openai-2', 'api-1' instead of 'openai'). feat(ui): enable scroll indicators in ModelDialog Add maxItemsToShow, showScrollArrows, and centerSelection props to BaseSelectionList in ModelDialog for improved scrolling UX. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Add backupSettingsFile call before updating Coding Plan provider configuration to preserve user settings in case of migration issues. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Update test snapshots to reflect the change from ● to › for selection indicator, and fix useCodingPlanUpdates test mock. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This was referenced Apr 28, 2026
5 tasks
Owner
Author
Conflict Group 1This PR shares modified functions with 19 other PR(s): #10, #106, #112, #113, #114, #117, #14, #17, #18, #21, #22, #31, #36, #52, #7, #75, #8, #86, #88. These PRs should be reviewed as a batch — merging one may affect the others.
graph LR
PR46["PR #46"]
FModelDialog_7258["ModelDialog<br>ModelDialog.tsx"]
PR46 -->|modifies| FModelDialog_7258
PR52["PR #52"]
PR52 -->|modifies| FModelDialog_7258
FgetMergeStrategyForPath_2596["getMergeStrategyForPath<br>settings.ts"]
PR46 -->|modifies| FgetMergeStrategyForPath_2596
PR8["PR #8"]
PR8 -->|modifies| FgetMergeStrategyForPath_2596
FisSdkMcpServerConfig_803["isSdkMcpServerConfig<br>config.ts"]
PR46 -->|modifies| FisSdkMcpServerConfig_803
PR106["PR #106"]
PR106 -->|modifies| FisSdkMcpServerConfig_803
PR112["PR #112"]
PR112 -->|modifies| FisSdkMcpServerConfig_803
PR113["PR #113"]
PR113 -->|modifies| FisSdkMcpServerConfig_803
PR114["PR #114"]
PR114 -->|modifies| FisSdkMcpServerConfig_803
PR117["PR #117"]
PR117 -->|modifies| FisSdkMcpServerConfig_803
PR18["PR #18"]
PR18 -->|modifies| FisSdkMcpServerConfig_803
PR75["PR #75"]
PR75 -->|modifies| FisSdkMcpServerConfig_803
PR86["PR #86"]
PR86 -->|modifies| FisSdkMcpServerConfig_803
PR88["PR #88"]
PR88 -->|modifies| FisSdkMcpServerConfig_803
FloadCliConfig_6977["loadCliConfig<br>config.ts"]
PR46 -->|modifies| FloadCliConfig_6977
PR106 -->|modifies| FloadCliConfig_6977
PR112 -->|modifies| FloadCliConfig_6977
PR113 -->|modifies| FloadCliConfig_6977
PR114 -->|modifies| FloadCliConfig_6977
PR117 -->|modifies| FloadCliConfig_6977
PR36["PR #36"]
PR36 -->|modifies| FloadCliConfig_6977
PR75 -->|modifies| FloadCliConfig_6977
PR86 -->|modifies| FloadCliConfig_6977
PR88 -->|modifies| FloadCliConfig_6977
FparseApprovalModeValue_6977["parseApprovalModeValue<br>config.ts"]
PR46 -->|modifies| FparseApprovalModeValue_6977
PR10["PR #10"]
PR10 -->|modifies| FparseApprovalModeValue_6977
PR112 -->|modifies| FparseApprovalModeValue_6977
PR113 -->|modifies| FparseApprovalModeValue_6977
PR114 -->|modifies| FparseApprovalModeValue_6977
PR117 -->|modifies| FparseApprovalModeValue_6977
PR21["PR #21"]
PR21 -->|modifies| FparseApprovalModeValue_6977
PR22["PR #22"]
PR22 -->|modifies| FparseApprovalModeValue_6977
PR36 -->|modifies| FparseApprovalModeValue_6977
PR86 -->|modifies| FparseApprovalModeValue_6977
PR88 -->|modifies| FparseApprovalModeValue_6977
FparseArguments_6977["parseArguments<br>config.ts"]
PR46 -->|modifies| FparseArguments_6977
PR10 -->|modifies| FparseArguments_6977
PR112 -->|modifies| FparseArguments_6977
PR113 -->|modifies| FparseArguments_6977
PR114 -->|modifies| FparseArguments_6977
PR117 -->|modifies| FparseArguments_6977
PR14["PR #14"]
PR14 -->|modifies| FparseArguments_6977
PR17["PR #17"]
PR17 -->|modifies| FparseArguments_6977
PR18 -->|modifies| FparseArguments_6977
PR21 -->|modifies| FparseArguments_6977
PR22 -->|modifies| FparseArguments_6977
PR31["PR #31"]
PR31 -->|modifies| FparseArguments_6977
PR36 -->|modifies| FparseArguments_6977
PR7["PR #7"]
PR7 -->|modifies| FparseArguments_6977
PR86 -->|modifies| FparseArguments_6977
PR88 -->|modifies| FparseArguments_6977
FvalidateModelConfig_5386["validateModelConfig<br>contentGenerator.ts"]
PR46 -->|modifies| FvalidateModelConfig_5386
PR10 -->|modifies| FvalidateModelConfig_5386
Posted by codegraph-ai conflict detection. |
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
This PR introduces settings version V4 with a refactored model provider configuration structure, changing from authType-keyed arrays to providerId-keyed objects. It adds a new
--providerIdCLI flag for explicit provider selection and implements the V3→V4 migration path. All existing tests are updated to reflect the new settings version and configuration format.Todo Actions
Dive Deeper
Settings Migration V3→V4
v3-to-v4.tsmigration that transformsmodelProvidersfrom an array format (keyed by authType) to an object format (keyed by providerId){ authType, envKey, baseUrl?, models: [] }ALL_MIGRATIONSto include the V3→V4 migrationModel Provider Configuration Refactor
Before (V3):
After (V4):
This change allows multiple providers of the same authType with different configurations.
CLI Changes
--providerIdflag to allow explicit provider selection at startupauth.tsto iterate over provider objects instead of authType-keyed arrays--providerIdover settingsTest Updates
SETTINGS_VERSIONconstant instead of hardcoded version numbersReviewer Test Plan
Test settings migration:
npm test -- integration-tests/settings-migration.test.tsVerify V1, V2, and V3 settings all migrate correctly to V4
Test CLI provider selection:
Verify the specified provider is selected
Test auth validation:
Run full test suite:
npm testTesting Matrix
Linked issues / bug
Fixes QwenLM#1820