MCPcopy Create free account
hub / github.com/Noumena-Network/code / getDirectApiKeyEnvVarName

Function getDirectApiKeyEnvVarName

src/utils/authEnv.ts:11–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9 | 'openai_compat'
10
11export function getDirectApiKeyEnvVarName(): DirectApiKeyEnvVarName | null {
12 if (process.env.NOUMENA_API_KEY) {
13 return 'NOUMENA_API_KEY'
14 }
15 if (process.env.ANTHROPIC_API_KEY) {
16 return 'ANTHROPIC_API_KEY'
17 }
18 if (process.env.OPENAI_API_KEY) {
19 return 'OPENAI_API_KEY'
20 }
21 return null
22}
23
24export function getDirectApiKeyEnvValue(): string | undefined {
25 const envVarName = getDirectApiKeyEnvVarName()

Callers 12

showSetupScreensFunction · 0.85
OnboardingFunction · 0.85
ConfigFunction · 0.85
authEnv.test.tsFile · 0.85
getDirectApiKeyEnvValueFunction · 0.85
isOpenAICompatByokActiveFunction · 0.85
getEffectiveApiKeyResultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected