feat(cli): add ModelScope as a built-in third-party API provider#4150
Merged
Conversation
pomelo-nwu
approved these changes
May 14, 2026
pomelo-nwu
left a comment
Collaborator
There was a problem hiding this comment.
LGTM — clean additive change, follows existing provider patterns exactly. CI green, tests solid.
— qwen code / claude-opus-4-6
TaimoorSiddiquiOfficial
pushed a commit
to TaimoorSiddiquiOfficial/HopCode
that referenced
this pull request
May 15, 2026
(cherry picked from commit dd1d686)
xaelistic
pushed a commit
to xaelistic/qwen-code
that referenced
this pull request
Jun 7, 2026
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
https://api-inference.modelscope.cn/v1), env key (MODELSCOPE_API_KEY), and a curated list of preset models with sane defaults (1M context window, thinking enabled).packages/cli/src/auth/providers/thirdParty/modelscope.ts— provider config (id, baseUrl, envKey, preset models, UI metadata).packages/cli/src/auth/allProviders.ts— registration in the provider registry andALL_PROVIDERSarray (insertion order matches the existing third-party group).packages/cli/src/auth/providers/thirdParty/modelscope.test.ts— unit tests covering provider config andbuildInstallPlanbehavior for known and unknown model IDs.Validation
npm run typecheckpasses across all workspaces.modelscope.test.ts—3 passed (3), duration ~4.4s.npm run typecheck— clean across@qwen-code/qwen-code,@qwen-code/qwen-code-core,@qwen-code/sdk,@qwen-code/webui.cd packages/cli && npx vitest run src/auth/providers/thirdParty/modelscope.test.tsnpm run devand open the auth wizard (/auth); confirm "ModelScope API Key" appears in the third-party group and that the preset baseUrl/env key/models are populated.Scope / Risk
modelsEditable: true, so users can add/edit their own model list at install time.Testing Matrix
Testing matrix notes:
npx vitestandnpm run typecheck. The change is a static config plus unit tests, so platform-specific risk is minimal — Windows / Linux / sandbox runners should behave identically.Linked Issues / Bugs