(env map[string]string, workflowData *WorkflowData, modelConfigured bool, modelEnvVar string)
| 561 | } |
| 562 | |
| 563 | func (e *CopilotEngine) addCopilotModelEnv(env map[string]string, workflowData *WorkflowData, modelConfigured bool, modelEnvVar string) { |
| 564 | // Set the model environment variable. |
| 565 | // The model is always passed via the native COPILOT_MODEL env var, which the Copilot CLI reads directly. |
| 566 | // When model is not configured, map the GitHub org variable to COPILOT_MODEL so users can set a default. |
| 567 | if modelConfigured { |
| 568 | copilotExecLog.Printf("Setting %s env var for model: %s", constants.CopilotCLIModelEnvVar, workflowData.EngineConfig.Model) |
| 569 | env[constants.CopilotCLIModelEnvVar] = workflowData.EngineConfig.Model |
| 570 | return |
| 571 | } |
| 572 | env[constants.CopilotCLIModelEnvVar] = compilerenv.BuildModelOverrideExpression(modelEnvVar, compilerenv.DefaultModelCopilot, constants.CopilotBYOKDefaultModel) |
| 573 | } |
| 574 | |
| 575 | func (e *CopilotEngine) addCopilotFinalStepEnv(env map[string]string, workflowData *WorkflowData) { |
| 576 | // Inject GH_AW_ENGINE_CWD when engine.cwd is configured. |
no test coverage detected