diff --git a/src/semantic-router/pkg/api/server.go b/src/semantic-router/pkg/api/server.go index a281a811..d0611ef1 100644 --- a/src/semantic-router/pkg/api/server.go +++ b/src/semantic-router/pkg/api/server.go @@ -232,7 +232,16 @@ func (s *ClassificationAPIServer) handleIntentClassification(w http.ResponseWrit return } - response, err := s.classificationSvc.ClassifyIntent(req) + // Use unified classifier if available, otherwise fall back to legacy + var response *services.IntentResponse + var err error + + if s.classificationSvc.HasUnifiedClassifier() { + response, err = s.classificationSvc.ClassifyIntentUnified(req) + } else { + response, err = s.classificationSvc.ClassifyIntent(req) + } + if err != nil { s.writeErrorResponse(w, http.StatusInternalServerError, "CLASSIFICATION_ERROR", err.Error()) return