yymaxapi 1.0.16 → 1.0.18
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/bin/yymaxapi.js
CHANGED
|
@@ -93,8 +93,16 @@ const DEFAULT_CLAUDE_MODELS = [
|
|
|
93
93
|
"name": "Claude Opus 4.6"
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
|
-
"id": "claude-
|
|
97
|
-
"name": "Claude
|
|
96
|
+
"id": "claude-opus-4-6-Thinking",
|
|
97
|
+
"name": "Claude Opus 4.6 Thinking"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "claude-sonnet-4-6",
|
|
101
|
+
"name": "Claude Sonnet 4.6"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"id": "claude-sonnet-4-6-Thinking",
|
|
105
|
+
"name": "Claude Sonnet 4.6 Thinking"
|
|
98
106
|
},
|
|
99
107
|
{
|
|
100
108
|
"id": "claude-haiku-4-5",
|
|
@@ -2843,7 +2851,7 @@ function testClaudeApi(baseUrl, apiKey, model) {
|
|
|
2843
2851
|
const protocol = urlObj.protocol === 'https:' ? https : http;
|
|
2844
2852
|
|
|
2845
2853
|
const postData = JSON.stringify({
|
|
2846
|
-
model: model || 'claude-sonnet-4-
|
|
2854
|
+
model: model || 'claude-sonnet-4-6',
|
|
2847
2855
|
max_tokens: 150,
|
|
2848
2856
|
messages: [{ role: 'user', content: '你是哪个模型?请用一句话回答你的模型名称和版本。' }]
|
|
2849
2857
|
});
|
|
@@ -3032,10 +3040,21 @@ async function autoInstallGitWindows() {
|
|
|
3032
3040
|
}
|
|
3033
3041
|
}
|
|
3034
3042
|
|
|
3035
|
-
// 方式2: 下载 Git
|
|
3036
|
-
const spinner = ora({ text: '
|
|
3043
|
+
// 方式2: 下载 Git 安装包(动态获取最新版本号)
|
|
3044
|
+
const spinner = ora({ text: '正在获取 Git 最新版本...', spinner: 'dots' }).start();
|
|
3037
3045
|
const installerPath = path.join(os.tmpdir(), 'git-installer.exe');
|
|
3038
|
-
|
|
3046
|
+
let downloadUrl;
|
|
3047
|
+
try {
|
|
3048
|
+
const tagJson = execSync('powershell -Command "(Invoke-RestMethod https://api.github.com/repos/git-for-windows/git/releases/latest).tag_name"', { stdio: 'pipe', timeout: 30000 }).toString().trim();
|
|
3049
|
+
// tag 格式: v2.48.1.windows.1 → 需要转成 Git-2.48.1-64-bit.exe
|
|
3050
|
+
const ver = tagJson.replace(/^v/, '').replace(/\.windows\.\d+$/, '');
|
|
3051
|
+
downloadUrl = `https://github.com/git-for-windows/git/releases/latest/download/Git-${ver}-64-bit.exe`;
|
|
3052
|
+
spinner.text = `正在下载 Git ${ver}...`;
|
|
3053
|
+
} catch (e) {
|
|
3054
|
+
// fallback: 用固定版本
|
|
3055
|
+
downloadUrl = 'https://github.com/git-for-windows/git/releases/download/v2.48.1.windows.1/Git-2.48.1-64-bit.exe';
|
|
3056
|
+
spinner.text = '正在下载 Git 安装包...';
|
|
3057
|
+
}
|
|
3039
3058
|
|
|
3040
3059
|
try {
|
|
3041
3060
|
execSync(`powershell -Command "Invoke-WebRequest -Uri '${downloadUrl}' -OutFile '${installerPath}'"`, {
|
|
@@ -25,7 +25,9 @@
|
|
|
25
25
|
"models": {
|
|
26
26
|
"claude": [
|
|
27
27
|
{ "id": "claude-opus-4-6", "name": "Claude Opus 4.6" },
|
|
28
|
-
{ "id": "claude-
|
|
28
|
+
{ "id": "claude-opus-4-6-Thinking", "name": "Claude Opus 4.6 Thinking" },
|
|
29
|
+
{ "id": "claude-sonnet-4-6", "name": "Claude Sonnet 4.6" },
|
|
30
|
+
{ "id": "claude-sonnet-4-6-Thinking", "name": "Claude Sonnet 4.6 Thinking" },
|
|
29
31
|
{ "id": "claude-haiku-4-5", "name": "Claude Haiku 4.5" }
|
|
30
32
|
],
|
|
31
33
|
"codex": [
|
|
@@ -87,6 +89,6 @@ npx yymaxapi@latest
|
|
|
87
89
|
|
|
88
90
|
**注意事项:**
|
|
89
91
|
- `base_url` 不要加 `/v1`,平台会自动拼接 `/v1/messages`
|
|
90
|
-
- 可用模型:`claude-opus-4-6`、`claude-sonnet-4-
|
|
92
|
+
- 可用模型:`claude-opus-4-6`、`claude-opus-4-6-Thinking`、`claude-sonnet-4-6`、`claude-sonnet-4-6-Thinking`、`claude-haiku-4-5`
|
|
91
93
|
- 已验证环境:腾讯云 OpenCloudOS,OpenClaw `2026.2.3-1`
|
|
92
94
|
- 参考文档:https://cloud.tencent.com/developer/article/2624003
|