@aiyiran/myclaw 1.0.55 → 1.0.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/inject-minimax.js +17 -3
  2. package/package.json +1 -1
package/inject-minimax.js CHANGED
@@ -97,11 +97,16 @@ function run(cliArgs) {
97
97
  // 写回文件
98
98
  fs.writeFileSync(targetPath, JSON.stringify(config, null, 2) + '\n', 'utf8');
99
99
 
100
+ // 验证写入
101
+ const verify = JSON.parse(fs.readFileSync(targetPath, 'utf8'));
102
+ const writtenModelId = verify.models?.providers?.minimax?.models?.[0]?.id || '???';
103
+ const writtenDefault = verify.agents?.defaults?.model?.primary || '???';
104
+
100
105
  console.log('✅ MiniMax 模型配置已注入');
101
106
  console.log('');
102
- console.log(' auth.profiles → minimax:cn');
103
- console.log(' models.providers → minimax (MiniMax-M2.7)');
104
- console.log(' agents.defaults → minimax/MiniMax-M2.7-highspeed');
107
+ console.log(' [验证] 写入的 model ID: ' + writtenModelId);
108
+ console.log(' [验证] 写入的 default: ' + writtenDefault);
109
+ console.log(' [验证] 文件路径: ' + targetPath);
105
110
 
106
111
  // 4. 通过 openclaw onboard 设置 API Key
107
112
  if (apiKey) {
@@ -119,6 +124,15 @@ function run(cliArgs) {
119
124
  '--minimax-api-key "' + apiKey + '"',
120
125
  ].join(' '), { stdio: 'inherit' });
121
126
  console.log('✅ API Key 已通过 onboard 设置');
127
+
128
+ // 再次验证
129
+ const reVerify = JSON.parse(fs.readFileSync(targetPath, 'utf8'));
130
+ const finalModelId = reVerify.models?.providers?.minimax?.models?.[0]?.id || '???';
131
+ const finalDefault = reVerify.agents?.defaults?.model?.primary || '???';
132
+
133
+ if (finalModelId !== "MiniMax-M2.7-highspeed") {
134
+ console.log('⚠️ [警告] onboard 命令覆盖了你配置的模型 ID: ' + finalModelId);
135
+ }
122
136
  } catch (err) {
123
137
  console.log('⚠️ onboard 失败: ' + err.message);
124
138
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiyiran/myclaw",
3
- "version": "1.0.55",
3
+ "version": "1.0.57",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {