19 lines
546 B
Go
19 lines
546 B
Go
package llm
|
|
|
|
import "gitea.maximumdirect.net/eric/audita/v3/internal/core/config"
|
|
|
|
// ConfiguredSecrets returns all configured LLM API-key values that should be
|
|
// redacted from diagnostics and surfaced error payloads.
|
|
func ConfiguredSecrets(cfg *config.Config) []string {
|
|
if cfg == nil {
|
|
return nil
|
|
}
|
|
secrets := make([]string, 0, len(cfg.Backends))
|
|
for _, backend := range cfg.Backends {
|
|
if backend.Credential != nil && backend.Credential.Value() != "" {
|
|
secrets = append(secrets, backend.Credential.Value())
|
|
}
|
|
}
|
|
return secrets
|
|
}
|