@simonyea/holysheep-cli 1.7.60 → 1.7.62

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonyea/holysheep-cli",
3
- "version": "1.7.60",
3
+ "version": "1.7.62",
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",
@@ -785,10 +785,16 @@ async function checkGatewayHealth(config) {
785
785
  const host = config.gatewayHost || '127.0.0.1'
786
786
  const timeout = Number(config.watchdog?.requestTimeoutMs) || DEFAULT_WATCHDOG_REQUEST_TIMEOUT_MS
787
787
 
788
+ // 用 http.get + family:4 强制 IPv4,避免 Windows 上 Node.js 优先尝试 IPv6 (::1)
789
+ // 而 Gateway 只监听 127.0.0.1 导致 Watchdog 误判自杀
788
790
  try {
789
- const response = await fetch(`http://${host}:${gatewayPort}/`, { method: 'GET', timeout })
790
- // 任何 HTTP 响应都说明 Gateway 进程存活(4xx 可能是正常的路由/auth 行为)
791
- return { ok: true, reason: `gateway_http_${response.status}` }
791
+ const http = require('http')
792
+ await new Promise((resolve, reject) => {
793
+ const req = http.get({ hostname: host, port: gatewayPort, path: '/', family: 4 }, resolve)
794
+ req.setTimeout(timeout, () => { req.destroy(); reject(new Error('timeout')) })
795
+ req.on('error', reject)
796
+ })
797
+ return { ok: true, reason: 'gateway_http_ok' }
792
798
  } catch {
793
799
  return { ok: false, reason: 'gateway_http_unreachable' }
794
800
  }
@@ -699,7 +699,7 @@ module.exports = {
699
699
  '--auth-choice', 'custom-api-key',
700
700
  '--custom-base-url', bridgeBaseUrl,
701
701
  '--custom-api-key', apiKey,
702
- '--custom-model-id', resolvedPrimaryModel,
702
+ '--custom-model-id', resolvedPrimaryModel.replace(/\[.*\]/, ''),
703
703
  '--custom-compatibility', 'openai',
704
704
  '--gateway-port', String(gatewayPort),
705
705
  ]
@@ -498,10 +498,11 @@ async function handleToolConfigure(req, res) {
498
498
 
499
499
  const allModelIds = [
500
500
  'gpt-5.4', 'gpt-5.3-codex-spark',
501
- 'claude-sonnet-4-6', 'claude-opus-4-6',
501
+ 'claude-sonnet-4-6', 'claude-sonnet-4-6[1m]',
502
+ 'claude-opus-4-6', 'claude-opus-4-6[1m]',
502
503
  'MiniMax-M2.7-highspeed', 'claude-haiku-4-5',
503
504
  ]
504
- const primaryModel = 'claude-sonnet-4-6'
505
+ const primaryModel = 'claude-sonnet-4-6[1m]'
505
506
 
506
507
  sseEmit(res, { type: 'progress', message: `正在配置 ${tool.name}...` })
507
508