add: sign in with chatgpt (#963)

Sign in with ChatGPT to get an API key (flow to grant API credits for Plus/Pro coming later today!)
This commit is contained in:
Fouad Matin
2025-05-16 12:28:54 -07:00
committed by GitHub
parent cabf83f2ed
commit c6e08ad8c1
7 changed files with 1052 additions and 7 deletions

View File

@@ -120,7 +120,7 @@ export function getApiKey(provider: string = "openai"): string | undefined {
return process.env[providerInfo.envKey];
}
// Checking `PROVIDER_API_KEY feels more intuitive with a custom provider.
// Checking `PROVIDER_API_KEY` feels more intuitive with a custom provider.
const customApiKey = process.env[`${provider.toUpperCase()}_API_KEY`];
if (customApiKey) {
return customApiKey;