File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,17 +89,17 @@ function getConfiguredProviderApiKey(configContent) {
8989}
9090
9191async function checkCredentials ( ) {
92- if ( typeof process . env . CODEX_API_KEY === 'string' && process . env . CODEX_API_KEY . trim ( ) ) {
92+ const config = await loadCodexConfig ( ) ;
93+ const configuredProviderApiKey = getConfiguredProviderApiKey ( config ) ;
94+ if ( configuredProviderApiKey ) {
9395 return { authenticated : true , email : 'API Key Auth' , method : 'api_key' } ;
9496 }
9597
96- if ( typeof process . env . OPENAI_API_KEY === 'string' && process . env . OPENAI_API_KEY . trim ( ) ) {
98+ if ( typeof process . env . CODEX_API_KEY === 'string' && process . env . CODEX_API_KEY . trim ( ) ) {
9799 return { authenticated : true , email : 'API Key Auth' , method : 'api_key' } ;
98100 }
99101
100- const config = await loadCodexConfig ( ) ;
101- const configuredProviderApiKey = getConfiguredProviderApiKey ( config ) ;
102- if ( configuredProviderApiKey ) {
102+ if ( typeof process . env . OPENAI_API_KEY === 'string' && process . env . OPENAI_API_KEY . trim ( ) ) {
103103 return { authenticated : true , email : 'API Key Auth' , method : 'api_key' } ;
104104 }
105105
You can’t perform that action at this time.
0 commit comments