fix(moonshot): resolve 401 Unauthorized errors by trimming API keys and improving request compatibility
This commit is contained in:
@@ -203,5 +203,5 @@ func (c *Config) GetAPIKey(provider string) (string, error) {
|
||||
if val == "" {
|
||||
return "", fmt.Errorf("environment variable %s not set for %s", envVar, provider)
|
||||
}
|
||||
return val, nil
|
||||
return strings.TrimSpace(val), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user