@aiyiran/myclaw 1.1.195 → 1.1.196

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.
@@ -30,7 +30,7 @@ const PROVIDER_ID = "minimax";
30
30
  const DEFAULT_MODEL = "minimax/MiniMax-M2.7-highspeed";
31
31
 
32
32
  // ── zai (智谱 GLM) 配置:仅 --beta 模式下附带注入 ──
33
- const DEFAULT_ZAI_KEY = "d353aa76b4ac415b89feb867de6ea870.blKBNpJW0L8dyrH6";
33
+ const DEFAULT_ZAI_KEY = "a7ae7806dea8406bb85eea5d859c00ad.pVnBuagTz6942JHp";
34
34
  const ZAI_BETA_MODELS = [
35
35
  {
36
36
  id: "glm-5.2",
@@ -49,24 +49,6 @@ const ZAI_BETA_MODELS = [
49
49
  cost: { input: 1.2, output: 4, cacheRead: 0.24, cacheWrite: 0 },
50
50
  contextWindow: 202800,
51
51
  maxTokens: 131100
52
- },
53
- {
54
- id: "glm-5",
55
- name: "GLM-5",
56
- reasoning: true,
57
- input: ["text"],
58
- cost: { input: 1.2, output: 4, cacheRead: 0.24, cacheWrite: 0 },
59
- contextWindow: 202800,
60
- maxTokens: 131100
61
- },
62
- {
63
- id: "glm-4.7",
64
- name: "GLM-4.7",
65
- reasoning: true,
66
- input: ["text"],
67
- cost: { input: 1.2, output: 4, cacheRead: 0.24, cacheWrite: 0 },
68
- contextWindow: 202800,
69
- maxTokens: 131100
70
52
  }
71
53
  ];
72
54
 
@@ -204,10 +186,18 @@ function run(cliArgs) {
204
186
  api: "openai-completions",
205
187
  models: ZAI_BETA_MODELS
206
188
  };
207
- config.agents.defaults.models["zai/glm-5.2"] = {};
208
- config.agents.defaults.models["zai/glm-5-turbo"] = {};
209
- config.agents.defaults.models["zai/glm-5"] = {};
210
- config.agents.defaults.models["zai/glm-4.7"] = {};
189
+
190
+ // 清理白名单里遗留的其他 zai 模型(比如之前版本注入过的 glm-5 / glm-4.7 / glm-5.1)
191
+ const allowedZaiKeys = new Set(ZAI_BETA_MODELS.map((m) => 'zai/' + m.id));
192
+ for (const key of Object.keys(config.agents.defaults.models)) {
193
+ if (key.startsWith('zai/') && !allowedZaiKeys.has(key)) {
194
+ delete config.agents.defaults.models[key];
195
+ console.log(' ✓ 清除多余 zai 模型: ' + key);
196
+ }
197
+ }
198
+ for (const key of allowedZaiKeys) {
199
+ config.agents.defaults.models[key] = {};
200
+ }
211
201
  }
212
202
 
213
203
  // ── Step 3:--default 设默认模型 ──
@@ -366,7 +356,7 @@ CREATE TABLE IF NOT EXISTS auth_profile_state (
366
356
  console.log('');
367
357
  console.log('✅ MiniMax 注入完成');
368
358
  console.log(' 默认模型: ' + (setDefault ? DEFAULT_MODEL : '(未修改)'));
369
- console.log(' 备选模型: minimax/MiniMax-M2.7-highspeed' + (betaMode ? ' + zai/glm-5.2 + zai/glm-5-turbo + zai/glm-5 + zai/glm-4.7' : ''));
359
+ console.log(' 备选模型: minimax/MiniMax-M2.7-highspeed' + (betaMode ? ' + zai/glm-5.2 + zai/glm-5-turbo' : ''));
370
360
  console.log(' Agent: ' + okCount + ' 个写入,' + skipCount + ' 个跳过');
371
361
  if (betaMode) console.log(' 其他 provider 已清除 (保留 minimax + zai)');
372
362
  else if (onlyMode) console.log(' 其他 provider 已清除');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiyiran/myclaw",
3
- "version": "1.1.195",
3
+ "version": "1.1.196",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {