want string
}{
{
- name: "failed call",
+ name: "reports the model call failure",
reply: func(w http.ResponseWriter, _ ModelFakeCall) {
w.WriteHeader(http.StatusInternalServerError)
- _, _ = io.WriteString(w, "down")
+ _, err := io.WriteString(w, "down")
+ if err != nil {
+ panic(err)
+ }
},
want: "HTTP 500",
},
{
- name: "tool call and no text",
+ name: "refuses a response without summary text",
reply: func(w http.ResponseWriter, _ ModelFakeCall) {
modelWriteEvents(w, modelCompletedEvent([]any{map[string]any{"type": "function_call", "name": "zoom", "arguments": "{}"}}, 100, 0, 5))
},
return newCompactor(client, compactorAdaPrompt, ModelConfig{
Model: "gpt-test",
Effort: "high",
- })
+ }, promptTools(), &ImageStore{dir: t.TempDir()})
}
// compactorInputTexts returns the text of each user message of call. Each