Let Compact continue on another model or vendor

This commit is contained in:
Ian Gulliver
2026-10-18 00:43:00 -07:00
parent 0a1f58cafa
commit 17f09ecb7c
11 changed files with 314 additions and 236 deletions
+9 -1
View File
@@ -810,7 +810,15 @@ func (s *Server) WithdrawMessage(w http.ResponseWriter, r *http.Request, taskID
}
func (s *Server) CompactSession(w http.ResponseWriter, r *http.Request, sessionID string) {
sess, err := s.agents.Compact(r.Context(), sessionID)
req := api.CompactCreate{}
if !readJSON(w, r, &req) {
return
}
model := ""
if req.Model != nil {
model = *req.Model
}
sess, err := s.agents.Compact(r.Context(), sessionID, model)
if err != nil {
writeAgentError(w, err)
return