Fix AI-generated pipelines missing provider (AWS OIDC) configuration #47
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes an issue where AI-generated CI/CD pipelines did not include provider-specific configuration (e.g. AWS OIDC role ARN), resulting in placeholder values like REPLACE_ME in the generated YAML.
Manual pipeline generation already worked correctly; the AI wizard path was losing context between the frontend and backend age
Root Cause
The AI wizard request (/agent/wizard/ai) was only forwarding the natural-language prompt to the backend agent.
As a result, authoritative pipeline configuration (provider, branch, stages, and provider options such as awsRoleArn) was never passed into the pipeline_generator MCP tool.
What Changed
Frontend
• Injected a pipelineSnapshot when calling the AI wizard, containing:
• template
• provider
• branch
• stages
• provider options (AWS role / GCP service account)
Backend – Router
• Updated /agent/wizard/ai to forward full pipeline context to the wizard agent
• Added debug logs to confirm snapshot presence and structure
Backend – Wizard Agent
• Hydrated the wizard agent with the incoming pipelineSnapshot
• Forwarded provider options, stages, and branch directly into pipeline_generator
• Preserved existing inference logic as a fallback only
Result
• AI-generated pipelines now match manual generation output
• AWS OIDC pipelines correctly include the resolved role-to-assume
• Eliminates placeholder values (REPLACE_ME)
• Maintains a single source of truth for pipeline configuration
Files Changed
• client/src/pages/ConfigurePage.tsx
• server/routes/agent.js
• server/agent/wizardAgent.js