Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.

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

Lines changed: 3 additions & 0 deletions
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)