(profile universalLLMBackendProfile, backend UniversalLLMBackend)
| 148 | } |
| 149 | |
| 150 | func resolvePiGatewaySecretEnvVar(profile universalLLMBackendProfile, backend UniversalLLMBackend) string { |
| 151 | if len(profile.coreSecretNames) > 0 { |
| 152 | return profile.coreSecretNames[0] |
| 153 | } |
| 154 | |
| 155 | switch backend { |
| 156 | case UniversalLLMBackendAnthropic: |
| 157 | return "ANTHROPIC_API_KEY" |
| 158 | case UniversalLLMBackendCodex: |
| 159 | return "CODEX_API_KEY" |
| 160 | default: |
| 161 | // copilot-requests: write intentionally leaves coreSecretNames empty and |
| 162 | // uses COPILOT_GITHUB_TOKEN=${{ github.token }} instead. |
| 163 | return "COPILOT_GITHUB_TOKEN" |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | // GetRequiredSecretNames returns the list of secrets required by the Pi engine. |
| 168 | // When the model uses provider/model format the provider-specific secret is required |
no outgoing calls