test(web): chat over an upload opens with the upload chat model (red)
Red: App.UploadChatModel is undefined. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -165,3 +165,18 @@ func TestUploadStatus_DoneOffersTheChatLinkOnlyWhenChatIsWired(t *testing.T) {
|
|||||||
id2 := seedUpload(t, userID, "m2", "done", meetingText)
|
id2 := seedUpload(t, userID, "m2", "done", meetingText)
|
||||||
assert.NotContains(t, body(t, do(t, appWithout, get("/uploads/"+id2+"/status"))), "/chat")
|
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, `<option value="iguana/gemma4-26b" selected`, "the page opens on the upload chat model")
|
||||||
|
assert.Equal(t, "iguana/gemma4-26b", fc.gotReq.Model, "a post that names no model uses it too")
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user