aihezu 2.8.2 → 2.8.3

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,40 @@ 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.3-codex', 'claude-sonnet-4.5'];
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.3-codex' + (defaultModel === 'gpt-5.3-codex' ? ' (默认)' : ''));
110
+ console.log(' [3] claude-sonnet-4.5' + (defaultModel === 'claude-sonnet-4.5' ? ' (默认)' : ''));
111
+ console.log(' [4] 自定义模型名称' + (!knownModels.includes(defaultModel) ? ' (默认: ' + defaultModel + ')' : ''));
110
112
 
111
- const choice = await askQuestion(rl, '请选择 [1/2/3]: ');
113
+ const choice = await askQuestion(rl, '请选择 [1/2/3/4]: ');
112
114
 
113
115
  if (choice === '2') {
114
- options.modelName = 'claude-sonnet-4.5';
116
+ options.modelName = 'gpt-5.3-codex';
115
117
  } else if (choice === '3') {
118
+ options.modelName = 'claude-sonnet-4.5';
119
+ } else if (choice === '4') {
116
120
  const customModel = await askQuestion(rl, '请输入自定义模型名称: ');
117
121
  options.modelName = customModel || defaultModel;
118
122
  } 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
- }
123
+ options.modelName = (choice === '') ? defaultModel : 'gpt-5-codex';
124
+ }
125
+
126
+ // Reasoning effort selection
127
+ console.log('');
128
+ console.log('请选择推理能力:');
129
+ console.log(' [1] high (默认)');
130
+ console.log(' [2] xhigh (Extra High)');
131
+
132
+ const effortChoice = await askQuestion(rl, '请选择 [1/2]: ');
133
+
134
+ if (effortChoice === '2') {
135
+ options.reasoningEffort = 'xhigh';
136
+ } else {
137
+ options.reasoningEffort = 'high';
125
138
  }
126
139
  }
127
140
 
@@ -131,6 +144,7 @@ async function configCommand(service, args = []) {
131
144
  console.log('服务类型: ' + service.displayName);
132
145
  console.log('API 地址: ' + apiUrl);
133
146
  if (options.modelName) console.log('模型: ' + options.modelName);
147
+ if (options.reasoningEffort) console.log('推理能力: ' + options.reasoningEffort);
134
148
  console.log('API Key: ' + apiKey.substring(0, 5) + '...');
135
149
 
136
150
  console.log('');
@@ -102,27 +102,40 @@ 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.3-codex', 'claude-sonnet-4.5'];
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.3-codex' + (defaultModel === 'gpt-5.3-codex' ? ' (默认)' : ''));
111
+ console.log(' [3] claude-sonnet-4.5' + (defaultModel === 'claude-sonnet-4.5' ? ' (默认)' : ''));
112
+ console.log(' [4] 自定义模型名称' + (!knownModels.includes(defaultModel) ? ' (默认: ' + defaultModel + ')' : ''));
113
+
114
+ const choice = await askQuestion(rl, '请选择 [1/2/3/4]: ');
115
+
114
116
  if (choice === '2') {
115
- options.modelName = 'claude-sonnet-4.5';
117
+ options.modelName = 'gpt-5.3-codex';
116
118
  } else if (choice === '3') {
119
+ options.modelName = 'claude-sonnet-4.5';
120
+ } else if (choice === '4') {
117
121
  const customModel = await askQuestion(rl, '请输入自定义模型名称: ');
118
- options.modelName = customModel || defaultModel;
122
+ options.modelName = customModel || defaultModel;
119
123
  } 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
- }
124
+ options.modelName = (choice === '') ? defaultModel : 'gpt-5-codex';
125
+ }
126
+
127
+ // Reasoning effort selection
128
+ console.log('');
129
+ console.log('请选择推理能力:');
130
+ console.log(' [1] high (默认)');
131
+ console.log(' [2] xhigh (Extra High)');
132
+
133
+ const effortChoice = await askQuestion(rl, '请选择 [1/2]: ');
134
+
135
+ if (effortChoice === '2') {
136
+ options.reasoningEffort = 'xhigh';
137
+ } else {
138
+ options.reasoningEffort = 'high';
126
139
  }
127
140
  }
128
141
 
@@ -132,6 +145,7 @@ async function installCommand(service, args = []) {
132
145
  console.log('服务类型: ' + service.displayName);
133
146
  console.log('API 地址: ' + apiUrl);
134
147
  if (options.modelName) console.log('模型: ' + options.modelName);
148
+ if (options.reasoningEffort) console.log('推理能力: ' + options.reasoningEffort);
135
149
  console.log('API Key: ' + apiKey.substring(0, 5) + '...');
136
150
 
137
151
  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.3",
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
  '',