summaryrefslogtreecommitdiff
path: root/internal/audio/gemini_provider.go
AgeCommit message (Collapse)Author
2026-04-09Release v0.28.1: convert Gemini TTS mono audio to stereov0.28.1Paul Buetow
Duplicate each 16-bit PCM sample into both L/R channels so all audio output uses both speakers, and retroactively converted the 88 existing card MP3s to stereo via ffmpeg. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08feat: add gobreaker circuit breakers for OpenAI and Gemini API callsPaul Buetow
Introduce internal/apicircuit with sony/gobreaker: trip after five consecutive failures, 45s open state, 2m count reset, half-open trial cap. context.Canceled is not counted as a failure for breaker stats. Wrap OpenAI TTS, Gemini TTS, OpenAI DALL-E/chat (image path), and Nano Banana Gemini GenerateContent calls. HTTP timeouts remain unchanged in httpctx. Made-with: Cursor
2026-04-08feat(httpctx): add timeouts for OpenAI, Gemini, and HTTP downloadsPaul Buetow
Introduce internal/httpctx with non-zero http.Client timeouts for go-openai and google.golang.org/genai, shared image download client, and WithTimeoutUnlessSet for operation-level deadlines when callers use Background. Wire NewOpenAIClient/NewGenAIClient everywhere clients are constructed. Apply Search timeouts for DALL-E and Nano Banana, provider audio timeouts, model-list timeouts, Veo operation timeouts, story page download context, and single-word CLI processing cap. Made-with: Cursor
2026-04-02task zz: add Voices()/BuildAttribution() to Provider interface [OCP]Paul Buetow
Extend audio.Provider with Voices() []string and BuildAttribution() string so all provider-specific behaviour is encapsulated in the implementation rather than scattered as switch-cases across callers. Add package-level VoicesFor(name) and BuildAttributionFor(name, params) for callers (processor, GUI) that need these before constructing a Provider instance. Add AttributionParamsFrom(config, word, ...) so callers can build AttributionParams from the flat Config without a manual provider switch. Implement both new interface methods in OpenAIProvider and GeminiProvider. Update all Provider mock/fake types in tests. Migrate audioVoicesForProvider() and saveAudioAttribution() in both processor.go and gui/generator.go to use the new package-level helpers, replacing the 10+ duplicated switch blocks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02task 00j: separate OpenAI vs Gemini provider-specific config fields [ISP]Paul Buetow
Introduce OpenAIAudioConfig and GeminiAudioConfig sub-structs so each provider implementation only receives the fields it needs. NewOpenAIProvider and NewGeminiProvider now accept their respective sub-configs; NewProvider extracts the appropriate sub-config from the flat Config via two helper functions. The flat Config struct is preserved unchanged for all external callers (gui, processor, tests) so no consumer needs to be updated. InstructionForProvider in sidecar.go uses the helpers to extract sub-configs before calling provider-specific helpers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02Release v0.9.0v0.9.0Paul Buetow
2026-04-02Fix verification gate lint and test issuesPaul Buetow
2026-04-02Align processor attribution with provider semanticsPaul Buetow
2026-04-01Align Gemini audio defaults with TTS APIPaul Buetow
2026-04-01Fix Gemini audio provider defaultsPaul Buetow
2026-04-01zf: align Gemini TTS default modelPaul Buetow
2026-04-01zf: fix Gemini provider routing and output validationPaul Buetow
2026-04-01zf: add Gemini TTS providerPaul Buetow