From 468a62679a99bc24db8aceecafe175039f1784da Mon Sep 17 00:00:00 2001 From: wenmengzhou Date: Wed, 18 Mar 2026 15:23:32 +0800 Subject: [PATCH] fix(modelstudio): address PR review feedback - Add standard auth methods to openclaw.plugin.json manifest so CLI flags and non-interactive auth-choice inference work correctly - Add distinct profileId for standard auth methods to prevent credential collision between Coding Plan and Standard flows Co-Authored-By: Claude Opus 4.6 --- extensions/modelstudio/index.ts | 2 ++ extensions/modelstudio/openclaw.plugin.json | 32 +++++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/extensions/modelstudio/index.ts b/extensions/modelstudio/index.ts index b821c5a0fa6..5805674bb94 100644 --- a/extensions/modelstudio/index.ts +++ b/extensions/modelstudio/index.ts @@ -31,6 +31,7 @@ export default definePluginEntry({ optionKey: "modelstudioStandardApiKeyCn", flagName: "--modelstudio-standard-api-key-cn", envVar: "MODELSTUDIO_API_KEY", + profileId: "modelstudio:standard-cn", promptMessage: "Enter Alibaba Cloud Model Studio API key (China)", defaultModel: MODELSTUDIO_DEFAULT_MODEL_REF, expectedProviders: ["modelstudio"], @@ -58,6 +59,7 @@ export default definePluginEntry({ optionKey: "modelstudioStandardApiKey", flagName: "--modelstudio-standard-api-key", envVar: "MODELSTUDIO_API_KEY", + profileId: "modelstudio:standard", promptMessage: "Enter Alibaba Cloud Model Studio API key (Global/Intl)", defaultModel: MODELSTUDIO_DEFAULT_MODEL_REF, expectedProviders: ["modelstudio"], diff --git a/extensions/modelstudio/openclaw.plugin.json b/extensions/modelstudio/openclaw.plugin.json index e6c20db50c7..f1bcce0ff3e 100644 --- a/extensions/modelstudio/openclaw.plugin.json +++ b/extensions/modelstudio/openclaw.plugin.json @@ -5,6 +5,34 @@ "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": "Alibaba Cloud Model Studio", + "groupHint": "Standard / Coding Plan (CN / Global)", + "optionKey": "modelstudioStandardApiKeyCn", + "cliFlag": "--modelstudio-standard-api-key-cn", + "cliOption": "--modelstudio-standard-api-key-cn ", + "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": "Alibaba Cloud Model Studio", + "groupHint": "Standard / Coding Plan (CN / Global)", + "optionKey": "modelstudioStandardApiKey", + "cliFlag": "--modelstudio-standard-api-key", + "cliOption": "--modelstudio-standard-api-key ", + "cliDescription": "Alibaba Cloud Model Studio Standard API key (Global/Intl)" + }, { "provider": "modelstudio", "method": "api-key-cn", @@ -13,7 +41,7 @@ "choiceHint": "Endpoint: coding.dashscope.aliyuncs.com", "groupId": "modelstudio", "groupLabel": "Alibaba Cloud Model Studio", - "groupHint": "Coding Plan API key (CN / Global)", + "groupHint": "Standard / Coding Plan (CN / Global)", "optionKey": "modelstudioApiKeyCn", "cliFlag": "--modelstudio-api-key-cn", "cliOption": "--modelstudio-api-key-cn ", @@ -27,7 +55,7 @@ "choiceHint": "Endpoint: coding-intl.dashscope.aliyuncs.com", "groupId": "modelstudio", "groupLabel": "Alibaba Cloud Model Studio", - "groupHint": "Coding Plan API key (CN / Global)", + "groupHint": "Standard / Coding Plan (CN / Global)", "optionKey": "modelstudioApiKey", "cliFlag": "--modelstudio-api-key", "cliOption": "--modelstudio-api-key ",