mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-02 14:30:29 +00:00
fix(openrouter): set api key from env (#129)
This commit is contained in:
parent
98e2910e82
commit
76275e533e
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue