From 0df6aba990ffd6eb42a14295249fefed1ac7adb5 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 17 Sep 2025 22:59:56 +0300 Subject: chore: commit uncommitted changes before version bump --- internal/llm/openai_request_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'internal/llm/openai_request_test.go') diff --git a/internal/llm/openai_request_test.go b/internal/llm/openai_request_test.go index f9925f9..001e3b7 100644 --- a/internal/llm/openai_request_test.go +++ b/internal/llm/openai_request_test.go @@ -22,6 +22,16 @@ func TestBuildOAChatRequest_MaxTokensKeyByModel(t *testing.T) { } } +func TestBuildOAChatRequest_TemperatureForcedForGpt5(t *testing.T) { + msgs := []Message{{Role: "user", Content: "hi"}} + // Explicit temp 0.2 → should be forced to 1.0 for gpt-5 + r := buildOAChatRequest(Options{Model: "gpt-5.0", Temperature: 0.2, MaxTokens: 50}, msgs, nil, false) + b, _ := json.Marshal(r) + if !contains(string(b), "\"temperature\":1") { + t.Fatalf("expected forced temperature 1.0 for gpt-5, got %s", string(b)) + } +} + func contains(s, sub string) bool { for i := 0; i+len(sub) <= len(s); i++ { if s[i:i+len(sub)] == sub { -- cgit v1.2.3