Skip to content

Conversation

@ariane-emory
Copy link
Owner

@ariane-emory ariane-emory commented Feb 12, 2026

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 anomalyco#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```

- Route inline config through load() function to enable {env:} and {file:} token substitution
- Access process.env directly to avoid module load timing issues
- Add tests for {env:} and {file:} token substitution in OPENCODE_CONFIG_CONTENT

Fixes anomalyco#13219
@ariane-emory ariane-emory changed the title fix: token substitution in OPENCODE_CONFIG_CONTENT fix: token substitution in OPENCODE_CONFIG_CONTENT (original) Feb 12, 2026
@ariane-emory ariane-emory deleted the backup/feat/config-content-interpolation branch February 13, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OPENCODE_CONFIG_CONTENT bypasses {env:} and {file:} token substitution

1 participant