Skip to content

fix(config): support ${env:VAR} in provider options#29383

Closed
SpencerJung wants to merge 1 commit into
anomalyco:devfrom
SpencerJung:fix/27853-env-substitution
Closed

fix(config): support ${env:VAR} in provider options#29383
SpencerJung wants to merge 1 commit into
anomalyco:devfrom
SpencerJung:fix/27853-env-substitution

Conversation

@SpencerJung
Copy link
Copy Markdown

Summary

Verification

  • lsp_diagnostics packages/opencode/src/config/variable.ts → no diagnostics
  • lsp_diagnostics packages/opencode/test/config/config.test.ts → no diagnostics
  • bun test test/config/config.test.ts in packages/opencode → 93 passed, 0 failed
  • bun run typecheck in packages/opencode → passed
  • bun run build in packages/opencode → passed

Notes

  • local git push was blocked by the repository pre-push hook because workspace-wide bun turbo typecheck already fails on upstream dev at packages/app/src/custom-elements.d.ts; this PR branch was published to the fork via the GitHub API without changing unrelated files

Refs #27853

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>
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label May 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

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.

@github-actions
Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate Found

PR #29282: fix(config): support ${env:VAR} syntax in addition to {env:VAR} for env substitution
#29282

This PR appears to be directly related to the current PR #29383. Both are addressing environment variable substitution with the ${env:VAR} syntax in the config system. PR #29282 may already cover the same functionality or be an earlier iteration of this fix. You should verify whether #29282 is still open and check if it already addresses the provider options scenario (apiKey, baseURL) mentioned in PR #29383.

@github-actions
Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label May 26, 2026
@github-actions github-actions Bot closed this May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant