aixxai 1.7.21 → 1.7.22
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 +1 -1
- package/src/commands/models.js +105 -119
- package/src/commands/status.js +1 -0
- package/src/utils/agentconfig.js +1 -2
package/package.json
CHANGED
package/src/commands/models.js
CHANGED
|
@@ -1,119 +1,105 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AIXX CLI - models 命令
|
|
3
|
-
* 列出AIXX支持的所有模型,按场景分组展示。
|
|
4
|
-
* 2026-08-28 更新:按"日常推荐/通用/旗舰/嵌入"分组,用户一眼知道选哪个。
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { DEFAULT_BASE_URL } from '../../bin/aixx.js';
|
|
8
|
-
import { loadApiKey, maskKey } from '../utils/env.js';
|
|
9
|
-
|
|
10
|
-
const FETCH_TIMEOUT = 15000;
|
|
11
|
-
|
|
12
|
-
const MODEL_DESC = {
|
|
13
|
-
'deepseek-chat': '低价档',
|
|
14
|
-
'deepseek-
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
'
|
|
33
|
-
|
|
34
|
-
'gpt-5.6
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
ids.forEach(id => {
|
|
107
|
-
const desc = descOf(id);
|
|
108
|
-
console.log(` • ${id}${desc ? ' —— ' + desc : ''}`);
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
console.log(`\n📊 共 ${modelIds.length} 个模型\n`);
|
|
113
|
-
console.log('💡 选模型小抄:');
|
|
114
|
-
console.log(' - 日常聊天/写文案 → glm-5.3-flash(智谱·便宜好用)');
|
|
115
|
-
console.log(' - 中文写作 → glm-5.3 或 claude-fable-5');
|
|
116
|
-
console.log(' - 读超长文档 → kimi-k3.1-pro');
|
|
117
|
-
console.log(' - 复杂推理/代码 → claude-opus-5 或 gpt-5.6-sol');
|
|
118
|
-
console.log(' - 嵌入/搜索 → qwen3-embedding-8b\n');
|
|
119
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* AIXX CLI - models 命令
|
|
3
|
+
* 列出AIXX支持的所有模型,按场景分组展示。
|
|
4
|
+
* 2026-08-28 更新:按"日常推荐/通用/旗舰/嵌入"分组,用户一眼知道选哪个。
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { DEFAULT_BASE_URL } from '../../bin/aixx.js';
|
|
8
|
+
import { loadApiKey, maskKey } from '../utils/env.js';
|
|
9
|
+
|
|
10
|
+
const FETCH_TIMEOUT = 15000;
|
|
11
|
+
|
|
12
|
+
const MODEL_DESC = {
|
|
13
|
+
'deepseek-chat': '低价档',
|
|
14
|
+
'deepseek-ai/DeepSeek-V3': 'DeepSeek旗舰(硅基流动)',
|
|
15
|
+
'glm-5.3-flash': '智谱coding plan现役,能力强',
|
|
16
|
+
'claude-fable-5': 'Claude Fable 5 最强写作',
|
|
17
|
+
'claude-opus-4-8': 'Claude Opus 4.8',
|
|
18
|
+
'claude-opus-5': 'Claude Opus 5 最新旗舰',
|
|
19
|
+
'claude-sonnet-5': 'Claude Sonnet 5 性价比',
|
|
20
|
+
'claude-haiku-4-5': '便宜快速',
|
|
21
|
+
'gpt-5.4': 'GPT-5.4 通用',
|
|
22
|
+
'gpt-5.5': 'GPT-5.5',
|
|
23
|
+
'gpt-5.6-sol': 'GPT-5.6 Sol 旗舰',
|
|
24
|
+
'gpt-5.6-luna': 'GPT-5.6 Luna 创意',
|
|
25
|
+
'gpt-5.6-terra': 'GPT-5.6 Terra 分析',
|
|
26
|
+
'abab6.5-chat': 'MiniMax 6.5',
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
function classifyScenario(id) {
|
|
30
|
+
const lower = id.toLowerCase();
|
|
31
|
+
if (lower.includes('embed') || lower.includes('bge')) return 'embedding';
|
|
32
|
+
const budget = ['glm-5.3-flash', 'claude-haiku'];
|
|
33
|
+
if (budget.some(p => lower.startsWith(p) || lower.includes(p))) return 'budget';
|
|
34
|
+
const flagship = ['opus-5', 'gpt-5.6', 'gpt-5.5', 'fable-5'];
|
|
35
|
+
if (flagship.some(p => lower.includes(p))) return 'flagship';
|
|
36
|
+
return 'general';
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function descOf(id) { return MODEL_DESC[id] || ''; }
|
|
40
|
+
|
|
41
|
+
export async function models(subArgs) {
|
|
42
|
+
console.log('╔══════════════════════════════════════════╗');
|
|
43
|
+
console.log('║ AIXX 可用模型 ║');
|
|
44
|
+
console.log('╚══════════════════════════════════════════╝\n');
|
|
45
|
+
|
|
46
|
+
const apiKey = loadApiKey();
|
|
47
|
+
const baseUrl = process.env.AIXX_BASE_URL || DEFAULT_BASE_URL;
|
|
48
|
+
|
|
49
|
+
if (!apiKey) {
|
|
50
|
+
console.error('❌ 未找到AIXX API Key');
|
|
51
|
+
console.error(' 请先运行 npx aixxai install');
|
|
52
|
+
process.exit(1);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
let modelIds = [];
|
|
56
|
+
try {
|
|
57
|
+
const resp = await fetch(`${baseUrl}/models`, {
|
|
58
|
+
headers: { Authorization: `Bearer ${apiKey}` },
|
|
59
|
+
signal: AbortSignal.timeout(FETCH_TIMEOUT),
|
|
60
|
+
});
|
|
61
|
+
if (!resp.ok) {
|
|
62
|
+
console.error(`❌ 获取模型列表失败: HTTP ${resp.status}`);
|
|
63
|
+
process.exit(1);
|
|
64
|
+
}
|
|
65
|
+
const data = await resp.json();
|
|
66
|
+
const arr = data.data || data.models || [];
|
|
67
|
+
modelIds = arr.map(m => (typeof m === 'string' ? m : m.id)).filter(Boolean).sort();
|
|
68
|
+
} catch (err) {
|
|
69
|
+
console.error(`❌ ${err?.message || err}`);
|
|
70
|
+
process.exit(1);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (modelIds.length === 0) {
|
|
74
|
+
console.log('⚠️ 后端未返回任何模型');
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const groups = { budget: [], general: [], flagship: [], embedding: [] };
|
|
79
|
+
modelIds.forEach(id => groups[classifyScenario(id)].push(id));
|
|
80
|
+
|
|
81
|
+
const groupMeta = {
|
|
82
|
+
budget: { title: '💡 日常推荐(便宜好用)' },
|
|
83
|
+
general: { title: '🔧 通用模型(按需选)' },
|
|
84
|
+
flagship: { title: '🚀 旗舰模型(最强但贵)' },
|
|
85
|
+
embedding:{ title: '📐 嵌入模型(向量化/搜索)' },
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
for (const [key, meta] of Object.entries(groupMeta)) {
|
|
89
|
+
const ids = groups[key];
|
|
90
|
+
if (ids.length === 0) continue;
|
|
91
|
+
console.log(`\n${meta.title}:`);
|
|
92
|
+
ids.forEach(id => {
|
|
93
|
+
const desc = descOf(id);
|
|
94
|
+
console.log(` • ${id}${desc ? ' —— ' + desc : ''}`);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
console.log(`\n📊 共 ${modelIds.length} 个模型\n`);
|
|
99
|
+
console.log('💡 选模型小抄:');
|
|
100
|
+
console.log(' - 日常聊天/写文案 → glm-5.3-flash(智谱·便宜好用)');
|
|
101
|
+
console.log(' - 中文写作 → glm-5.3 或 claude-fable-5');
|
|
102
|
+
console.log(' - 读超长文档 → kimi-k3.1-pro');
|
|
103
|
+
console.log(' - 复杂推理/代码 → claude-opus-5 或 gpt-5.6-sol');
|
|
104
|
+
console.log(' - 嵌入/搜索 → qwen3-embedding-8b\n');
|
|
105
|
+
}
|
package/src/commands/status.js
CHANGED
|
@@ -137,6 +137,7 @@ export async function status() {
|
|
|
137
137
|
};
|
|
138
138
|
const packVer = _readSkillVer(join(__dirname, '..', '..', 'templates', 'SKILL.md'));
|
|
139
139
|
const dirs = [
|
|
140
|
+
join(homedir(), '.agents', 'skills', 'aixx'),
|
|
140
141
|
join(homedir(), '.claude', 'skills', 'aixx'),
|
|
141
142
|
join(homedir(), '.zcode', 'skills', 'aixx'),
|
|
142
143
|
join(homedir(), '.aixx', 'skills', 'aixx'),
|
package/src/utils/agentconfig.js
CHANGED
|
@@ -125,7 +125,7 @@ function findManagedProvider(config, scope) {
|
|
|
125
125
|
function buildClaudeModels() {
|
|
126
126
|
return {
|
|
127
127
|
'claude-sonnet-4-20250514': { limit: { context: 200000, output: 8192 } },
|
|
128
|
-
'claude-haiku-4-5
|
|
128
|
+
'claude-haiku-4-5': { limit: { context: 200000, output: 8192 } },
|
|
129
129
|
'claude-opus-4-8': { limit: { context: 200000, output: 8192 } },
|
|
130
130
|
};
|
|
131
131
|
}
|
|
@@ -136,7 +136,6 @@ function buildClaudeModels() {
|
|
|
136
136
|
function buildOpenaiModels() {
|
|
137
137
|
return {
|
|
138
138
|
'deepseek-chat': { limit: { context: 64000, output: 8192 } },
|
|
139
|
-
'deepseek-reasoner': { limit: { context: 64000, output: 8192 } },
|
|
140
139
|
'glm-5.3-flash': { limit: { context: 128000, output: 128000 } },
|
|
141
140
|
'glm-5.3': { limit: { context: 128000, output: 128000 } },
|
|
142
141
|
};
|