feat(modelstudio): add standard (pay-as-you-go) DashScope endpoints for Qwen (#43878)

Add Standard API Key auth methods for China (dashscope.aliyuncs.com)
and Global/Intl (dashscope-intl.aliyuncs.com) pay-as-you-go endpoints
alongside the existing Coding Plan (subscription) endpoints.

Also updates group label to 'Qwen (Alibaba Cloud Model Studio)' and
fixes glm-4.7 -> glm-5 in Coding Plan note messages.

Co-authored-by: wenmeng zhou <wenmengzhou@users.noreply.github.com>
This commit is contained in:
George Zhang
2026-03-23 14:29:19 -07:00
parent 64f4df1886
commit ade0182ae0
9 changed files with 166 additions and 25421 deletions

View File

@@ -65,6 +65,8 @@ const MOONSHOT_NATIVE_BASE_URLS = new Set([
const MODELSTUDIO_NATIVE_BASE_URLS = new Set([
"https://coding-intl.dashscope.aliyuncs.com/v1",
"https://coding.dashscope.aliyuncs.com/v1",
"https://dashscope.aliyuncs.com/compatible-mode/v1",
"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
]);
const ENV_VAR_NAME_RE = /^[A-Z_][A-Z0-9_]*$/;

View File

@@ -49,6 +49,8 @@ export type BuiltInAuthChoice =
| "volcengine-api-key"
| "byteplus-api-key"
| "qianfan-api-key"
| "modelstudio-standard-api-key-cn"
| "modelstudio-standard-api-key"
| "modelstudio-api-key-cn"
| "modelstudio-api-key"
| "custom-api-key"
@@ -143,6 +145,8 @@ export type OnboardOptions = {
volcengineApiKey?: string;
byteplusApiKey?: string;
qianfanApiKey?: string;
modelstudioStandardApiKeyCn?: string;
modelstudioStandardApiKey?: string;
modelstudioApiKeyCn?: string;
modelstudioApiKey?: string;
customBaseUrl?: string;

View File

@@ -1927,6 +1927,34 @@ export const GENERATED_BUNDLED_PLUGIN_METADATA = [
modelstudio: ["MODELSTUDIO_API_KEY"],
},
providerAuthChoices: [
{
provider: "modelstudio",
method: "standard-api-key-cn",
choiceId: "modelstudio-standard-api-key-cn",
choiceLabel: "Standard API Key for China (pay-as-you-go)",
choiceHint: "Endpoint: dashscope.aliyuncs.com",
groupId: "modelstudio",
groupLabel: "Qwen (Alibaba Cloud Model Studio)",
groupHint: "Standard / Coding Plan (CN / Global)",
optionKey: "modelstudioStandardApiKeyCn",
cliFlag: "--modelstudio-standard-api-key-cn",
cliOption: "--modelstudio-standard-api-key-cn <key>",
cliDescription: "Alibaba Cloud Model Studio Standard API key (China)",
},
{
provider: "modelstudio",
method: "standard-api-key",
choiceId: "modelstudio-standard-api-key",
choiceLabel: "Standard API Key for Global/Intl (pay-as-you-go)",
choiceHint: "Endpoint: dashscope-intl.aliyuncs.com",
groupId: "modelstudio",
groupLabel: "Qwen (Alibaba Cloud Model Studio)",
groupHint: "Standard / Coding Plan (CN / Global)",
optionKey: "modelstudioStandardApiKey",
cliFlag: "--modelstudio-standard-api-key",
cliOption: "--modelstudio-standard-api-key <key>",
cliDescription: "Alibaba Cloud Model Studio Standard API key (Global/Intl)",
},
{
provider: "modelstudio",
method: "api-key-cn",
@@ -1934,8 +1962,8 @@ export const GENERATED_BUNDLED_PLUGIN_METADATA = [
choiceLabel: "Coding Plan API Key for China (subscription)",
choiceHint: "Endpoint: coding.dashscope.aliyuncs.com",
groupId: "modelstudio",
groupLabel: "Alibaba Cloud Model Studio",
groupHint: "Coding Plan API key (CN / Global)",
groupLabel: "Qwen (Alibaba Cloud Model Studio)",
groupHint: "Standard / Coding Plan (CN / Global)",
optionKey: "modelstudioApiKeyCn",
cliFlag: "--modelstudio-api-key-cn",
cliOption: "--modelstudio-api-key-cn <key>",
@@ -1948,8 +1976,8 @@ export const GENERATED_BUNDLED_PLUGIN_METADATA = [
choiceLabel: "Coding Plan API Key for Global/Intl (subscription)",
choiceHint: "Endpoint: coding-intl.dashscope.aliyuncs.com",
groupId: "modelstudio",
groupLabel: "Alibaba Cloud Model Studio",
groupHint: "Coding Plan API key (CN / Global)",
groupLabel: "Qwen (Alibaba Cloud Model Studio)",
groupHint: "Standard / Coding Plan (CN / Global)",
optionKey: "modelstudioApiKey",
cliFlag: "--modelstudio-api-key",
cliOption: "--modelstudio-api-key <key>",