fix: resolve YAML env placeholders for API keys and remote shell env#12884
Open
Manpreet2298 wants to merge 2 commits into
Open
fix: resolve YAML env placeholders for API keys and remote shell env#12884Manpreet2298 wants to merge 2 commits into
Manpreet2298 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
2 issues found across 3 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #12842
Description
Fixes config YAML env placeholder resolution for API keys such as
${env:OPENROUTER_API_KEY}.Previously, hardcoding an API key in YAML worked, but using
${env:VAR}could fail to resolve in some environments, leading to missing API keys and401errors.This PR makes two focused fixes:
${env:VAR}placeholders while converting YAML config into runtime configLocalPlatformClientsecret resolution, which helps in Remote-SSH / remote shell scenarios whereprocess.envmay not contain the expected variableThis is a minimal fix scoped to config/env resolution behavior.
AI Code Review
@continue-reviewChecklist
Screen recording or screenshot
Not included, since this change affects config/env resolution rather than a visible UI flow.
If helpful for review, I can add a short repro note instead:
apiKeyin YAML works${env:OPENROUTER_API_KEY}now also worksTests
No automated tests were added in this change.
Manual validation suggested:
apiKeyin YAML works${env:OPENROUTER_API_KEY}works in local setup${env:OPENROUTER_API_KEY}works in Remote-SSH / remote shell setup where the variable is available from the user shellSummary by cubic
Fixes YAML
${env:VAR}resolution across the config (including request options) and adds a shell-environment fallback that preserves multiline values to prevent missing API keys and 401s in local and Remote-SSH setups. Fixes #12842.requestOptions.process.envis missing vars, preserving multiline values and working in Remote-SSH.Written for commit 1bcea86. Summary will update on new commits.