summaryrefslogtreecommitdiff
path: root/internal/config/provider.go
blob: 70449641a5e83a81f265b3d60656a88858180b30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
}