fix(config): support ${env:VAR} in provider options#29383
Conversation
This expands ${env:VAR} in config values before parsing so provider apiKey and baseURL can use environment-backed overrides without being sent literally.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate FoundPR #29282: fix(config): support ${env:VAR} syntax in addition to {env:VAR} for env substitution This PR appears to be directly related to the current PR #29383. Both are addressing environment variable substitution with the |
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
Summary
${env:VAR}tokens during config substitution alongside the existing{env:VAR}syntaxoptions.apiKeyandoptions.baseURLwith a focused config regression test${env:VAR}substitution in provider apiKey and baseURL override from models catalog #27853 without changing provider precedence behaviorVerification
lsp_diagnostics packages/opencode/src/config/variable.ts→ no diagnosticslsp_diagnostics packages/opencode/test/config/config.test.ts→ no diagnosticsbun test test/config/config.test.tsinpackages/opencode→ 93 passed, 0 failedbun run typecheckinpackages/opencode→ passedbun run buildinpackages/opencode→ passedNotes
git pushwas blocked by the repository pre-push hook because workspace-widebun turbo typecheckalready fails on upstreamdevatpackages/app/src/custom-elements.d.ts; this PR branch was published to the fork via the GitHub API without changing unrelated filesRefs #27853