8000 fix(config): binding of TMUXAI_OPENROUTER_API_KEY variable by etiennetremel · Pull Request #7 · alvinunreal/tmuxai · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(config): binding of TMUXAI_OPENROUTER_API_KEY variable #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 27, 2025

Conversation

etiennetremel
Copy link
Contributor

For some reason the binding doesn't work correctly for TMUXAI_OPENROUTER_API_KEY.
I haven't investigated too long, could be because there is no default value defined or something else.
Forcing the binding of the key to the env variable using BindEnv() does fix the issue.

While troubleshooting I noticed the config.Load() was called twice, so I took the opportunity to remove this redundant call which is already triggered in cli.Execute().

Close #5

@corv89
Copy link
corv89 commented Apr 27, 2025

Thanks for looking into this

@sudonym1
Copy link

There is an issue with this fix - while it does force the API key to load properly, all other nested configs are still broken. IMO it makes sense to drop the AutomaticEnv() invocation as well as it will behave inconsistently.

@alvinunreal
Copy link
Owner

I will merge this, and will update with EnumerateConfigKeys

thank you for first contribution!

@alvinunreal alvinunreal merged commit d82990d into alvinunreal:main Apr 27, 2025
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.

Not recognizing OpenRouter API key
4 participants
0