summaryrefslogtreecommitdiff
path: root/internal/phonetic/fetcher.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/phonetic/fetcher.go')
-rw-r--r--internal/phonetic/fetcher.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/internal/phonetic/fetcher.go b/internal/phonetic/fetcher.go
index 0346213..d10d6c1 100644
--- a/internal/phonetic/fetcher.go
+++ b/internal/phonetic/fetcher.go
@@ -12,6 +12,8 @@ import (
"github.com/sashabaranov/go-openai"
"google.golang.org/genai"
+
+ appconfig "codeberg.org/snonux/totalrecall/internal/config"
)
const (
@@ -265,11 +267,8 @@ func normalizeConfig(config *Config) Config {
return normalized
}
+// normalizeProvider delegates to the shared config.NormalizeProvider so the
+// normalization rule (lowercase, trim, default to "gemini") has one home.
func normalizeProvider(provider Provider) Provider {
- normalized := Provider(strings.ToLower(strings.TrimSpace(string(provider))))
- if normalized == "" {
- return ProviderGemini
- }
-
- return normalized
+ return Provider(appconfig.NormalizeProvider(string(provider)))
}