Skip to content

Commit 76275e5

Browse files
fix(openrouter): set api key from env (#129)
1 parent 98e2910 commit 76275e5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/config/config.go

+3
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ func setProviderDefaults() {
228228
if apiKey := os.Getenv("GROQ_API_KEY"); apiKey != "" {
229229
viper.SetDefault("providers.groq.apiKey", apiKey)
230230
}
231+
if apiKey := os.Getenv("OPENROUTER_API_KEY"); apiKey != "" {
232+
viper.SetDefault("providers.openrouter.apiKey", apiKey)
233+
}
231234

232235
// Use this order to set the default models
233236
// 1. Anthropic

0 commit comments

Comments
 (0)