aihezu 2.8.2 → 2.8.4

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.
@@ -101,27 +101,43 @@ async function configCommand(service, args = []) {
101
101
  // 3. Extra Options (Service specific)
102
102
  const options = {};
103
103
  if (service.name === 'codex') {
104
+ const knownModels = ['gpt-5-codex', 'gpt-5.2', 'gpt-5.2-codex', 'gpt-5.3-codex'];
104
105
  let defaultModel = cliModel || 'gpt-5-codex';
105
106
 
106
107
  console.log('请选择模型:');
107
108
  console.log(' [1] gpt-5-codex' + (defaultModel === 'gpt-5-codex' ? ' (默认)' : ''));
108
- console.log(' [2] claude-sonnet-4.5' + (defaultModel === 'claude-sonnet-4.5' ? ' (默认)' : ''));
109
- console.log(' [3] 自定义模型名称' + (!['gpt-5-codex', 'claude-sonnet-4.5'].includes(defaultModel) ? ' (默认: ' + defaultModel + ')' : ''));
109
+ console.log(' [2] gpt-5.2' + (defaultModel === 'gpt-5.2' ? ' (默认)' : ''));
110
+ console.log(' [3] gpt-5.2-codex' + (defaultModel === 'gpt-5.2-codex' ? ' (默认)' : ''));
111
+ console.log(' [4] gpt-5.3-codex' + (defaultModel === 'gpt-5.3-codex' ? ' (默认)' : ''));
112
+ console.log(' [5] 自定义模型名称' + (!knownModels.includes(defaultModel) ? ' (默认: ' + defaultModel + ')' : ''));
110
113
 
111
- const choice = await askQuestion(rl, '请选择 [1/2/3]: ');
114
+ const choice = await askQuestion(rl, '请选择 [1/2/3/4/5]: ');
112
115
 
113
116
  if (choice === '2') {
114
- options.modelName = 'claude-sonnet-4.5';
117
+ options.modelName = 'gpt-5.2';
115
118
  } else if (choice === '3') {
119
+ options.modelName = 'gpt-5.2-codex';
120
+ } else if (choice === '4') {
121
+ options.modelName = 'gpt-5.3-codex';
122
+ } else if (choice === '5') {
116
123
  const customModel = await askQuestion(rl, '请输入自定义模型名称: ');
117
124
  options.modelName = customModel || defaultModel;
118
125
  } else if (choice === '1' || choice === '') {
119
- // Default choice (Enter or '1')
120
- if (choice === '') {
121
- options.modelName = defaultModel;
122
- } else {
123
- options.modelName = 'gpt-5-codex';
124
- }
126
+ options.modelName = (choice === '') ? defaultModel : 'gpt-5-codex';
127
+ }
128
+
129
+ // Reasoning effort selection
130
+ console.log('');
131
+ console.log('请选择推理能力:');
132
+ console.log(' [1] high (默认)');
133
+ console.log(' [2] xhigh (Extra High)');
134
+
135
+ const effortChoice = await askQuestion(rl, '请选择 [1/2]: ');
136
+
137
+ if (effortChoice === '2') {
138
+ options.reasoningEffort = 'xhigh';
139
+ } else {
140
+ options.reasoningEffort = 'high';
125
141
  }
126
142
  }
127
143
 
@@ -131,6 +147,7 @@ async function configCommand(service, args = []) {
131
147
  console.log('服务类型: ' + service.displayName);
132
148
  console.log('API 地址: ' + apiUrl);
133
149
  if (options.modelName) console.log('模型: ' + options.modelName);
150
+ if (options.reasoningEffort) console.log('推理能力: ' + options.reasoningEffort);
134
151
  console.log('API Key: ' + apiKey.substring(0, 5) + '...');
135
152
 
136
153
  console.log('');
@@ -102,27 +102,43 @@ async function installCommand(service, args = []) {
102
102
  // 3. Extra Options (Service specific)
103
103
  const options = {};
104
104
  if (service.name === 'codex') {
105
+ const knownModels = ['gpt-5-codex', 'gpt-5.2', 'gpt-5.2-codex', 'gpt-5.3-codex'];
105
106
  let defaultModel = cliModel || 'gpt-5-codex';
106
-
107
+
107
108
  console.log('请选择模型:');
108
109
  console.log(' [1] gpt-5-codex' + (defaultModel === 'gpt-5-codex' ? ' (默认)' : ''));
109
- console.log(' [2] claude-sonnet-4.5' + (defaultModel === 'claude-sonnet-4.5' ? ' (默认)' : ''));
110
- console.log(' [3] 自定义模型名称' + (!['gpt-5-codex', 'claude-sonnet-4.5'].includes(defaultModel) ? ' (默认: ' + defaultModel + ')' : ''));
111
-
112
- const choice = await askQuestion(rl, '请选择 [1/2/3]: ');
113
-
110
+ console.log(' [2] gpt-5.2' + (defaultModel === 'gpt-5.2' ? ' (默认)' : ''));
111
+ console.log(' [3] gpt-5.2-codex' + (defaultModel === 'gpt-5.2-codex' ? ' (默认)' : ''));
112
+ console.log(' [4] gpt-5.3-codex' + (defaultModel === 'gpt-5.3-codex' ? ' (默认)' : ''));
113
+ console.log(' [5] 自定义模型名称' + (!knownModels.includes(defaultModel) ? ' (默认: ' + defaultModel + ')' : ''));
114
+
115
+ const choice = await askQuestion(rl, '请选择 [1/2/3/4/5]: ');
116
+
114
117
  if (choice === '2') {
115
- options.modelName = 'claude-sonnet-4.5';
118
+ options.modelName = 'gpt-5.2';
116
119
  } else if (choice === '3') {
120
+ options.modelName = 'gpt-5.2-codex';
121
+ } else if (choice === '4') {
122
+ options.modelName = 'gpt-5.3-codex';
123
+ } else if (choice === '5') {
117
124
  const customModel = await askQuestion(rl, '请输入自定义模型名称: ');
118
- options.modelName = customModel || defaultModel;
125
+ options.modelName = customModel || defaultModel;
119
126
  } else if (choice === '1' || choice === '') {
120
- // Default choice (Enter or '1')
121
- if (choice === '') {
122
- options.modelName = defaultModel;
123
- } else {
124
- options.modelName = 'gpt-5-codex';
125
- }
127
+ options.modelName = (choice === '') ? defaultModel : 'gpt-5-codex';
128
+ }
129
+
130
+ // Reasoning effort selection
131
+ console.log('');
132
+ console.log('请选择推理能力:');
133
+ console.log(' [1] high (默认)');
134
+ console.log(' [2] xhigh (Extra High)');
135
+
136
+ const effortChoice = await askQuestion(rl, '请选择 [1/2]: ');
137
+
138
+ if (effortChoice === '2') {
139
+ options.reasoningEffort = 'xhigh';
140
+ } else {
141
+ options.reasoningEffort = 'high';
126
142
  }
127
143
  }
128
144
 
@@ -132,6 +148,7 @@ async function installCommand(service, args = []) {
132
148
  console.log('服务类型: ' + service.displayName);
133
149
  console.log('API 地址: ' + apiUrl);
134
150
  if (options.modelName) console.log('模型: ' + options.modelName);
151
+ if (options.reasoningEffort) console.log('推理能力: ' + options.reasoningEffort);
135
152
  console.log('API Key: ' + apiKey.substring(0, 5) + '...');
136
153
 
137
154
  console.log('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aihezu",
3
- "version": "2.8.2",
3
+ "version": "2.8.4",
4
4
  "description": "AI 开发环境配置工具 - 支持 Claude Code, Codex, Google Gemini 的本地化配置、代理设置与缓存清理",
5
5
  "main": "bin/aihezu.js",
6
6
  "bin": {
package/services/codex.js CHANGED
@@ -25,7 +25,7 @@ module.exports = {
25
25
 
26
26
  // Configuration setup logic
27
27
  setupConfig: async (apiKey, apiUrl, options = {}) => {
28
- const { modelName = 'gpt-5-codex' } = options;
28
+ const { modelName = 'gpt-5-codex', reasoningEffort = 'high' } = options;
29
29
 
30
30
  if (!fs.existsSync(configDir)) {
31
31
  console.log('📁 创建 ~/.codex 目录...');
@@ -37,7 +37,7 @@ module.exports = {
37
37
  const configContent = [
38
38
  `model_provider = "${providerName}"`,
39
39
  `model = "${modelName}"`,
40
- 'model_reasoning_effort = "high"',
40
+ `model_reasoning_effort = "${reasoningEffort}"`,
41
41
  'disable_response_storage = true',
42
42
  'preferred_auth_method = "apikey"',
43
43
  '',