feat: ${VAR} for API key configuration#336
feat: ${VAR} for API key configuration#336codelion merged 7 commits intoalgorithmicsuperintelligence:mainfrom
Conversation
|
Thanks for the PR! You're right that we need a way to reference environment variables in config files. However, I'd prefer to use the more standard ${VAR} or $VAR substitution syntax that's common in config files (similar to Docker Compose, shell scripts, etc.). This would be more intuitive for users and follow existing conventions. For example: This could be implemented by processing the loaded YAML dict and expanding any ${VAR} patterns using os.environ.get(). Would you be open to taking this approach instead? |
|
I've updated the implementation to use the standard |
Summary
This PR adds support for specifying API keys via environment variable references in configuration files using the
${VARIABLE}syntax.Motivation
Previously, users could either hardcode API keys directly in config files (security risk) or rely on the implicit
OPENAI_API_KEYfallback. This change allows explicit control over which environment variable to use, enabling: