From a60d01b9f21bd85f16f46510f6d01916ac1037ff Mon Sep 17 00:00:00 2001 From: unintendedfraud Date: Mon, 29 Dec 2025 11:17:39 +0100 Subject: [PATCH] accept all 2xx http code, increase timeout --- llm/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llm/client.go b/llm/client.go index 9788ace..d724956 100644 --- a/llm/client.go +++ b/llm/client.go @@ -20,7 +20,7 @@ type Client struct { func NewClient(env *env.Env) *Client { return &Client{ - http: http.Client{Timeout: 10 * time.Second}, + http: http.Client{Timeout: 30 * time.Second}, token: env.LlmToken, model: env.LlmModel, endpoint: env.LlmEndpoint, @@ -52,7 +52,7 @@ func (client Client) GenerateContent(message string) (string, error) { body, err := io.ReadAll(res.Body) - if res.StatusCode != 200 { + if res.StatusCode >= 400 { return "", fmt.Errorf("LLM returned status code [%d]", res.StatusCode) }