perf: add HTTP connection pooling across providers and disable proxy buffering on SSE streams
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled

This commit is contained in:
2026-07-21 17:40:18 +00:00
parent 0decc63e8c
commit 654f6ab6d1
9 changed files with 42 additions and 8 deletions
+1 -2
View File
@@ -20,10 +20,9 @@ type OllamaProvider struct {
}
func NewOllamaProvider(cfg config.OllamaConfig) *OllamaProvider {
client := resty.New()
client := NewOptimizedRestyClient(15 * time.Minute)
// Set reasonable timeouts for local Ollama server (longer for larger models)
// For streaming, we want a very long timeout or none at all to handle generation time
client.SetTimeout(15 * time.Minute)
client.SetRetryCount(2)
client.SetRetryWaitTime(1 * time.Second)