( env?: Record<string, string | undefined>, )
| 7 | * Sandboxed runs inject `XAI_API_KEY`; local runs may use `grok login` instead. |
| 8 | */ |
| 9 | export function resolveGrokAcpAuthMethod( |
| 10 | env?: Record<string, string | undefined>, |
| 11 | ): GrokBuildAcpAuthMethod { |
| 12 | const key = |
| 13 | env?.XAI_API_KEY ?? |
| 14 | env?.GROK_API_KEY ?? |
| 15 | process.env.XAI_API_KEY ?? |
| 16 | process.env.GROK_API_KEY |
| 17 | return key ? 'xai.api_key' : 'grok.com' |
| 18 | } |
no outgoing calls
no test coverage detected