diff options
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/provider.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/internal/config/provider.go b/internal/config/provider.go new file mode 100644 index 0000000..7044964 --- /dev/null +++ b/internal/config/provider.go @@ -0,0 +1,24 @@ +package config + +import "strings" + +const ( + // ProviderGemini is the canonical name for the Google Gemini provider. + // It is the default across all subsystems (audio, translation, phonetic). + ProviderGemini = "gemini" + + // ProviderOpenAI is the canonical name for the OpenAI provider. + ProviderOpenAI = "openai" +) + +// NormalizeProvider returns a canonical, lowercase provider name. +// An empty input resolves to ProviderGemini (the default). The function is +// shared by the audio, translation, and phonetic packages so the same +// normalization rule has a single authoritative home. +func NormalizeProvider(provider string) string { + normalized := strings.ToLower(strings.TrimSpace(provider)) + if normalized == "" { + return ProviderGemini + } + return normalized +} |
