[PR #13349] fix: enable token substitution in OPENCODE_CONFIG_CONTENT (take #) #14625

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

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

State: closed
Merged: No


What does this PR do?

Route OPENCODE_CONFIG_CONTENT through load() to enable {env:} and {file:} token substitution. Uses the env var name as the path for clearer error messages instead of a generic placeholder.

Fixes anommalyco#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/13349 **State:** closed **Merged:** No --- ### What does this PR do? Route OPENCODE_CONFIG_CONTENT through load() to enable {env:} and {file:} token substitution. Uses the env var name as the path for clearer error messages instead of a generic <inline> placeholder. Fixes anommalyco#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:24 -05:00
yindo closed this issue 2026-02-16 18:19:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14625