@simonyea/holysheep-cli 1.6.8 → 1.6.10

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.
package/README.md CHANGED
@@ -218,6 +218,8 @@ A: OpenClaw 需要 Node.js 20+,运行 `node --version` 确认版本后重试
218
218
 
219
219
  ## Changelog
220
220
 
221
+ - **v1.6.10** — 将可运行的 OpenClaw runtime(含 npx 回退)视为已安装,避免 Windows/Node 环境下重复提示安装;同时修复 Droid CLI 的 GPT `/v1` 接入地址并同步写入 `~/.factory/config.json`
222
+ - **v1.6.9** — 保留 OpenClaw 的 MiniMax 配置,并为 MiniMax 使用独立 provider id,避免与 Claude provider 冲突;在 OpenClaw 2026.3.13 下改为提示精确 `/model` 切换命令,而不是停止配置 MiniMax
221
223
  - **v1.6.8** — 修复 Codex 重复写入 `config.toml` 导致的 duplicate key,并修复 OpenClaw 在 Windows 下的安装检测;针对 OpenClaw 2026.3.13 的模型路由回归,临时跳过 MiniMax 避免 `model not allowed`
222
224
  - **v1.6.7** — OpenClaw 配置新增 `MiniMax-M2.7-highspeed`,并补齐节点迁移脚本中的 SSH 代理账号创建逻辑
223
225
  - **v1.6.6** — 修复 Droid CLI 的 GPT-5.4 配置残留问题,同时同步 `~/.factory/settings.json` 和 `~/.factory/config.json`,统一使用 `openai + https://api.holysheep.ai/v1`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonyea/holysheep-cli",
3
- "version": "1.6.8",
3
+ "version": "1.6.10",
4
4
  "description": "Claude Code/Cursor/Cline API relay for China — ¥1=$1, WeChat/Alipay payment, no credit card, no VPN. One command setup for all AI coding tools.",
5
5
  "keywords": [
6
6
  "openai-china",
@@ -148,22 +148,12 @@ function isRoutingRegressionVersion(version) {
148
148
  return OPENCLAW_ROUTING_REGRESSION_VERSION.test(String(version || '').trim())
149
149
  }
150
150
 
151
- function sanitizeSelectedModelsForRuntime(selectedModels, runtimeVersion) {
152
- if (!isRoutingRegressionVersion(runtimeVersion)) {
153
- return { models: selectedModels, warning: '' }
151
+ function getRoutingRegressionWarning(runtimeVersion, minimaxModelRef) {
152
+ if (!isRoutingRegressionVersion(runtimeVersion) || !minimaxModelRef) {
153
+ return ''
154
154
  }
155
155
 
156
- const originalModels = Array.isArray(selectedModels) ? selectedModels : []
157
- const filteredModels = originalModels.filter((model) => !model.startsWith('MiniMax-'))
158
-
159
- if (filteredModels.length === originalModels.length) {
160
- return { models: selectedModels, warning: '' }
161
- }
162
-
163
- return {
164
- models: filteredModels,
165
- warning: '当前 OpenClaw 2026.3.13 存在 provider 路由回归,已暂时跳过 MiniMax 模型,避免 /model 和网页切换时报 model not allowed。升级 OpenClaw 后可重新运行 hs setup 恢复。',
166
- }
156
+ return `当前 OpenClaw 2026.3.13 存在 provider 路由回归,但 HolySheep 仍会保留 MiniMax 配置。若网页模型切换失败,请直接输入 /model ${minimaxModelRef},或升级 OpenClaw 后再试。`
167
157
  }
168
158
 
169
159
  function readConfig() {
@@ -293,7 +283,7 @@ function buildManagedPlan(apiKey, baseUrlAnthropic, baseUrlOpenAI, selectedModel
293
283
 
294
284
  const openaiProviderName = buildProviderName(baseUrlOpenAI, 'custom-openai')
295
285
  const anthropicProviderName = buildProviderName(baseUrlAnthropic, 'custom-anthropic')
296
- const minimaxProviderName = buildProviderName(`${baseUrlAnthropic.replace(/\/+$/, '')}/minimax`, 'custom-anthropic')
286
+ const minimaxProviderName = buildProviderName(`${baseUrlAnthropic.replace(/\/+$/, '')}/minimax`, 'custom-minimax')
297
287
 
298
288
  const providers = {
299
289
  [openaiProviderName]: {
@@ -329,6 +319,7 @@ function buildManagedPlan(apiKey, baseUrlAnthropic, baseUrlOpenAI, selectedModel
329
319
  providers,
330
320
  managedModelRefs,
331
321
  primaryRef: `${openaiProviderName}/${OPENCLAW_DEFAULT_MODEL}`,
322
+ minimaxRef: minimaxModels[0] ? `${minimaxProviderName}/${minimaxModels[0]}` : '',
332
323
  }
333
324
  }
334
325
 
@@ -461,7 +452,7 @@ module.exports = {
461
452
  id: 'openclaw',
462
453
 
463
454
  checkInstalled() {
464
- return hasOpenClawBinary()
455
+ return detectRuntime().available
465
456
  },
466
457
 
467
458
  detectRuntime,
@@ -485,11 +476,6 @@ module.exports = {
485
476
  }
486
477
  this._lastRuntimeCommand = runtime.command
487
478
 
488
- const sanitizedSelection = sanitizeSelectedModelsForRuntime(selectedModels, runtime.version)
489
- if (sanitizedSelection.warning) {
490
- console.log(chalk.yellow(` ⚠️ ${sanitizedSelection.warning}`))
491
- }
492
-
493
479
  runOpenClaw(['gateway', 'stop'], { preferNpx: runtime.via === 'npx' })
494
480
 
495
481
  const gatewayPort = findAvailableGatewayPort(DEFAULT_GATEWAY_PORT)
@@ -530,15 +516,20 @@ module.exports = {
530
516
  console.log(chalk.yellow(' ⚠️ onboard 失败,使用备用配置...'))
531
517
  }
532
518
 
533
- writeManagedConfig(
519
+ const plan = writeManagedConfig(
534
520
  result.status === 0 ? readConfig() : {},
535
521
  apiKey,
536
522
  baseUrlAnthropic,
537
523
  baseUrlOpenAI,
538
- sanitizedSelection.models,
524
+ selectedModels,
539
525
  gatewayPort,
540
526
  )
541
527
 
528
+ const routingRegressionWarning = getRoutingRegressionWarning(runtime.version, plan.minimaxRef)
529
+ if (routingRegressionWarning) {
530
+ console.log(chalk.yellow(` ⚠️ ${routingRegressionWarning}`))
531
+ }
532
+
542
533
  _disableGatewayAuth(runtime.via === 'npx')
543
534
  const serviceReady = _installGatewayService(gatewayPort, runtime.via === 'npx')
544
535