( envVarName: DirectApiKeyEnvVarName | null = getDirectApiKeyEnvVarName(), )
| 52 | } |
| 53 | |
| 54 | export 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 | |
| 69 | export function getDirectApiKeyProviderKindForSource( |
| 70 | source: string | null | undefined, |
no test coverage detected