[PR #13384] fix: token substitution in OPENCODE_CONFIG_CONTENT #14639

Closed
opened 2026-02-16 18:19:25 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13384

State: closed
Merged: Yes


What does this PR do?

  • Route inline config through load() function to enable {env:} and {file:} token substitution
  • Make OPENCODE_CONFIG_CONTENT a dynamic getter for runtime env var access
  • Add tests for {env:} and {file:} token substitution in OPENCODE_CONFIG_CONTENT

Fixes #13219

How did you verify your code works?

Manual testing, bun typecheck, bun test.

You may manually test by running commands akin to the following (assuming bash):

echo "matrix" > /tmp/test-secret.txt 
export MODEL="opencode/big-pickle"
OPENCODE_CONFIG_CONTENT='{"$schema":"https://opencode.ai/config.json","theme":"{file:/tmp/test-secret.txt}", "model":"{env:MODEL}"}' bun dev
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13384 **State:** closed **Merged:** Yes --- ### What does this PR do? - Route inline config through load() function to enable {env:} and {file:} token substitution - Make OPENCODE_CONFIG_CONTENT a dynamic getter for runtime env var access - Add tests for {env:} and {file:} token substitution in OPENCODE_CONFIG_CONTENT Fixes #13219 ### How did you verify your code works? Manual testing, `bun typecheck`, `bun test`. You may manually test by running commands akin to the following (assuming bash): ``` echo "matrix" > /tmp/test-secret.txt export MODEL="opencode/big-pickle" OPENCODE_CONFIG_CONTENT='{"$schema":"https://opencode.ai/config.json","theme":"{file:/tmp/test-secret.txt}", "model":"{env:MODEL}"}' bun dev
yindo added the pull-request label 2026-02-16 18:19:25 -05:00
yindo closed this issue 2026-02-16 18:19:25 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14639