Skip to content

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
aptdnfapt pushed a commit to aptdnfapt/tmuxai that referenced this pull request Jul 24, 2025
…al#7)

* fix: remove redundant config load

* fix: force binding TMUXAI_OPENROUTER_API_KEY
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