This commit is contained in:
2026-08-16 16:57:36 +02:00
parent 96f8c1115c
commit 532d439c41
106 changed files with 10147 additions and 494 deletions
+6 -1
View File
@@ -26,9 +26,14 @@ func SafeHTTPClientPolicy(timeout time.Duration, policy DialPolicy) *http.Client
if timeout <= 0 {
timeout = 30 * time.Second
}
tr := SafeHTTPTransportPolicy(policy)
// Match header wait to overall timeout. A fixed 30s ResponseHeaderTimeout
// aborts OpenAI-compatible LLM calls that withhold headers until generation
// finishes (reasoning models often take 60180s).
tr.ResponseHeaderTimeout = timeout
return &http.Client{
Timeout: timeout,
Transport: SafeHTTPTransportPolicy(policy),
Transport: tr,
}
}