@pikecode/api-key-manager 2.0.3 → 2.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikecode/api-key-manager",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "A CLI tool for managing and switching multiple API provider configurations",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/config.js CHANGED
@@ -383,8 +383,9 @@ class ConfigManager {
383
383
  smallFast: smallFastModel
384
384
  };
385
385
  } else {
386
- // Codex 不需要这些字段,设置为 null 以保持向后兼容
387
- newProvider.authMode = null;
386
+ // Codex 支持 authMode(api_key 或 chatgpt_login)
387
+ const authMode = providerConfig.authMode || existing?.authMode || null;
388
+ newProvider.authMode = authMode;
388
389
  newProvider.models = null;
389
390
  }
390
391
 
@@ -165,7 +165,7 @@ function validateAndNormalizeData(data, source) {
165
165
  ideName,
166
166
  authMode:
167
167
  ideName === 'codex'
168
- ? null
168
+ ? provider.authMode || null
169
169
  : provider.authMode === 'api_token'
170
170
  ? 'auth_token'
171
171
  : provider.authMode || 'api_key',