summaryrefslogtreecommitdiff
path: root/internal/hexaiaction
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-09-17 22:49:13 +0300
committerPaul Buetow <paul@buetow.org>2025-09-17 22:49:13 +0300
commitd059ae333fa1c89cb58d7fb56ead79cdba15d5db (patch)
treeae65ad59c8590f71232a6abefee312b72ddf6d3e /internal/hexaiaction
parent88103657fb230bb41217a06aa5602ae23e7acb8b (diff)
chore(version): bump to v0.11.1 (gpt-5 defaults, timeouts, global stats, editor fix)v0.11.1
Diffstat (limited to 'internal/hexaiaction')
-rw-r--r--internal/hexaiaction/prompts.go13
1 files changed, 10 insertions, 3 deletions
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)
}