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

Function getDirectApiKeyProviderKind

src/utils/authEnv.ts:54–67  ·  view source on GitHub ↗
(
  envVarName: DirectApiKeyEnvVarName | null = getDirectApiKeyEnvVarName(),
)

Source from the content-addressed store, hash-verified

52}
53
54export function getDirectApiKeyProviderKind(
55 envVarName: DirectApiKeyEnvVarName | null = getDirectApiKeyEnvVarName(),
56): DirectApiKeyProviderKind | null {
57 switch (envVarName) {
58 case 'NOUMENA_API_KEY':
59 return 'noumena'
60 case 'ANTHROPIC_API_KEY':
61 return 'anthropic'
62 case 'OPENAI_API_KEY':
63 return 'openai_compat'
64 default:
65 return null
66 }
67}
68
69export function getDirectApiKeyProviderKindForSource(
70 source: string | null | undefined,

Callers 4

authEnv.test.tsFile · 0.85
getAuthProviderFunction · 0.85

Calls 1

Tested by

no test coverage detected