diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-08 10:14:40 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-08 10:14:40 +0300 |
| commit | f7deedf50f6fa00c7dfe989ed381989e202b3057 (patch) | |
| tree | 72fe642a99101da79d2103af911c8dcf88b08484 /go.mod | |
| parent | 14995ca7a76e2a72a2169def7f55f3b9e2433ee2 (diff) | |
feat: add gobreaker circuit breakers for OpenAI and Gemini API calls
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
Diffstat (limited to 'go.mod')
| -rw-r--r-- | go.mod | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -8,6 +8,7 @@ require ( github.com/magefile/mage v1.15.0 github.com/mattn/go-sqlite3 v1.14.28 github.com/sashabaranov/go-openai v1.40.5 + github.com/sony/gobreaker v1.0.0 github.com/spf13/cobra v1.9.1 github.com/spf13/pflag v1.0.6 github.com/spf13/viper v1.20.1 |
