The open source coding agent.
TypeScript
fix(openrouter): set api key from env (#129)
Hunter Casten76275e533e02
diff --git a/internal/config/config.go b/internal/config/config.goindex 22781e18983..482e71c8d14 100644--- a/internal/config/config.go+++ b/internal/config/config.go@@ -228,6 +228,9 @@ func setProviderDefaults() {if apiKey := os.Getenv("GROQ_API_KEY"); apiKey != "" {viper.SetDefault("providers.groq.apiKey", apiKey)}+ if apiKey := os.Getenv("OPENROUTER_API_KEY"); apiKey != "" {+ viper.SetDefault("providers.openrouter.apiKey", apiKey)+ }// Use this order to set the default models// 1. Anthropic