diff --git a/internal/web/uploads_chat_handler_test.go b/internal/web/uploads_chat_handler_test.go index bc1ce72..ff6f96f 100644 --- a/internal/web/uploads_chat_handler_test.go +++ b/internal/web/uploads_chat_handler_test.go @@ -165,3 +165,18 @@ func TestUploadStatus_DoneOffersTheChatLinkOnlyWhenChatIsWired(t *testing.T) { id2 := seedUpload(t, userID, "m2", "done", meetingText) assert.NotContains(t, body(t, do(t, appWithout, get("/uploads/"+id2+"/status"))), "/chat") } + +func TestUploadChat_OpensWithTheUploadChatModelNotTheSummarizerDefault(t *testing.T) { + // koala/phi4-mini is first in the offered list (it is the summarizer default) and + // has an 8,192-token context: an hour of speech returns HTTP 400 there. Chat over + // an upload must open with the model configured for it. + app, fc := newUploadChatApp(t) + app.UploadChatModel = "iguana/gemma4-26b" + id := seedUpload(t, userID, "m", "done", meetingText) + + page := body(t, do(t, app, get("/uploads/"+id+"/chat"))) + do(t, app, chatPost("/uploads/"+id+"/chat", url.Values{"question": {"q"}})) + + assert.Contains(t, page, `