From d059ae333fa1c89cb58d7fb56ead79cdba15d5db Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 17 Sep 2025 22:49:13 +0300 Subject: chore(version): bump to v0.11.1 (gpt-5 defaults, timeouts, global stats, editor fix) --- internal/hexaiaction/prompts.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'internal/hexaiaction') diff --git a/internal/hexaiaction/prompts.go b/internal/hexaiaction/prompts.go index 393e9e4..207302e 100644 --- a/internal/hexaiaction/prompts.go +++ b/internal/hexaiaction/prompts.go @@ -152,17 +152,24 @@ func runOnceWithOpts(ctx context.Context, client chatDoer, sys, user string, opt // reqOptsFrom builds LLM request options similar to LSP behavior. func reqOptsFrom(cfg appconfig.App) []llm.RequestOption { opts := []llm.RequestOption{llm.WithMaxTokens(cfg.MaxTokens)} + // Apply temperature, with special-case for gpt-5 (default temp must be 1.0) if cfg.CodingTemperature != nil { - opts = append(opts, llm.WithTemperature(*cfg.CodingTemperature)) + temp := *cfg.CodingTemperature + prov := strings.ToLower(strings.TrimSpace(cfg.Provider)) + model := strings.ToLower(strings.TrimSpace(cfg.OpenAIModel)) + if prov == "openai" && strings.HasPrefix(model, "gpt-5") { + temp = 1.0 + } + opts = append(opts, llm.WithTemperature(temp)) } return opts } // Timeout helpers to mirror LSP behavior. func timeout10s(parent context.Context) (context.Context, context.CancelFunc) { - return context.WithTimeout(parent, 10*time.Second) + return context.WithTimeout(parent, 20*time.Second) } func timeout8s(parent context.Context) (context.Context, context.CancelFunc) { - return context.WithTimeout(parent, 8*time.Second) + return context.WithTimeout(parent, 18*time.Second) } -- cgit v1.2.3