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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aixxai",
3
- "version": "1.7.21",
3
+ "version": "1.7.22",
4
4
  "description": "AIXX CLI - 让你的AI调用万物。查全球算力行情(B300/H100价格租价·答案带数据时间)+调用全球AI模型。By AIXX (Wanan Exchange). 安装:npx aixxai",
5
5
  "type": "module",
6
6
  "bin": {
@@ -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-v4-pro': 'DeepSeek 旗舰,推理强',
15
- 'deepseek-ai/DeepSeek-V3': 'DeepSeek旗舰(硅基流动)',
16
- 'glm-5.3-flash': '智谱coding plan现役,能力强',
17
- 'glm-4-plus': '智谱旗舰,中文写作强',
18
- 'glm-4-long': '智谱超长文本',
19
- 'glm-5-2-260617': 'GLM-5.2',
20
- 'moonshot-v1-8k': 'Kimi 短文本',
21
- 'moonshot-v1-32k': 'Kimi 中文本',
22
- 'moonshot-v1-128k': 'Kimi 超长文本',
23
- 'kimi-latest': 'Kimi 最新',
24
- 'kimi-k2.6': 'Kimi K2.6 代码强',
25
- 'claude-fable-5': 'Claude Fable 5 最强写作',
26
- 'claude-opus-4-8': 'Claude Opus 4.8',
27
- 'claude-opus-5': 'Claude Opus 5 最新旗舰',
28
- 'claude-sonnet-5': 'Claude Sonnet 5 性价比',
29
- 'claude-haiku-4-5': '便宜快速',
30
- 'gpt-5.4': 'GPT-5.4 通用',
31
- 'gpt-5.4-mini': 'GPT-5.4 便宜',
32
- 'gpt-5.5': 'GPT-5.5',
33
- 'gpt-5.6-sol': 'GPT-5.6 Sol 旗舰',
34
- 'gpt-5.6-luna': 'GPT-5.6 Luna 创意',
35
- 'gpt-5.6-terra': 'GPT-5.6 Terra 分析',
36
- 'doubao-pro': '豆包 Pro 中文',
37
- 'doubao-seed-2-0-pro-260215': '豆包 Seed 2.0',
38
- 'abab6.5-chat': 'MiniMax 6.5',
39
- 'bge-m3': '嵌入模型',
40
- 'embedding-3': '智谱嵌入',
41
- };
42
-
43
- function classifyScenario(id) {
44
- const lower = id.toLowerCase();
45
- if (lower.includes('embed') || lower.includes('bge')) return 'embedding';
46
- const budget = ['glm-5.3-flash', 'claude-haiku'];
47
- if (budget.some(p => lower.startsWith(p) || lower.includes(p))) return 'budget';
48
- const flagship = ['opus-5', 'gpt-5.6', 'gpt-5.5', 'fable-5'];
49
- if (flagship.some(p => lower.includes(p))) return 'flagship';
50
- return 'general';
51
- }
52
-
53
- function descOf(id) { return MODEL_DESC[id] || ''; }
54
-
55
- export async function models(subArgs) {
56
- console.log('╔══════════════════════════════════════════╗');
57
- console.log('║ AIXX 可用模型 ║');
58
- console.log('╚══════════════════════════════════════════╝\n');
59
-
60
- const apiKey = loadApiKey();
61
- const baseUrl = process.env.AIXX_BASE_URL || DEFAULT_BASE_URL;
62
-
63
- if (!apiKey) {
64
- console.error('❌ 未找到AIXX API Key');
65
- console.error(' 请先运行 npx aixxai install');
66
- process.exit(1);
67
- }
68
-
69
- let modelIds = [];
70
- try {
71
- const resp = await fetch(`${baseUrl}/models`, {
72
- headers: { Authorization: `Bearer ${apiKey}` },
73
- signal: AbortSignal.timeout(FETCH_TIMEOUT),
74
- });
75
- if (!resp.ok) {
76
- console.error(`❌ 获取模型列表失败: HTTP ${resp.status}`);
77
- process.exit(1);
78
- }
79
- const data = await resp.json();
80
- const arr = data.data || data.models || [];
81
- modelIds = arr.map(m => (typeof m === 'string' ? m : m.id)).filter(Boolean).sort();
82
- } catch (err) {
83
- console.error(`❌ ${err?.message || err}`);
84
- process.exit(1);
85
- }
86
-
87
- if (modelIds.length === 0) {
88
- console.log('⚠️ 后端未返回任何模型');
89
- return;
90
- }
91
-
92
- const groups = { budget: [], general: [], flagship: [], embedding: [] };
93
- modelIds.forEach(id => groups[classifyScenario(id)].push(id));
94
-
95
- const groupMeta = {
96
- budget: { title: '💡 日常推荐(便宜好用)' },
97
- general: { title: '🔧 通用模型(按需选)' },
98
- flagship: { title: '🚀 旗舰模型(最强但贵)' },
99
- embedding:{ title: '📐 嵌入模型(向量化/搜索)' },
100
- };
101
-
102
- for (const [key, meta] of Object.entries(groupMeta)) {
103
- const ids = groups[key];
104
- if (ids.length === 0) continue;
105
- console.log(`\n${meta.title}:`);
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
+ }
@@ -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'),
@@ -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-20251001': { limit: { context: 200000, output: 8192 } },
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
  };