MCPcopy Create free account
hub / github.com/github/gh-aw / resolvePiGatewaySecretEnvVar

Function resolvePiGatewaySecretEnvVar

pkg/workflow/pi_engine.go:150–165  ·  view source on GitHub ↗
(profile universalLLMBackendProfile, backend UniversalLLMBackend)

Source from the content-addressed store, hash-verified

148}
149
150func 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

Callers 2

GetExecutionStepsMethod · 0.85

Calls

no outgoing calls

Tested by 1