diff --git a/coderd/aitasks.go b/coderd/aitasks.go index 45df5fa68f336..5fb9ceec9ac13 100644 --- a/coderd/aitasks.go +++ b/coderd/aitasks.go @@ -11,7 +11,6 @@ import ( "github.com/go-chi/chi/v5" "github.com/google/uuid" - "golang.org/x/xerrors" "cdr.dev/slog" @@ -196,13 +195,6 @@ func (api *API) tasksCreate(rw http.ResponseWriter, r *http.Request) { // prompts and mapping status/state. This method enforces that only AI task // workspaces are given. func (api *API) tasksFromWorkspaces(ctx context.Context, apiWorkspaces []codersdk.Workspace) ([]codersdk.Task, error) { - // Enforce that only AI task workspaces are given. - for _, ws := range apiWorkspaces { - if ws.LatestBuild.HasAITask == nil || !*ws.LatestBuild.HasAITask { - return nil, xerrors.Errorf("workspace %s is not an AI task workspace", ws.ID) - } - } - // Fetch prompts for each workspace build and map by build ID. buildIDs := make([]uuid.UUID, 0, len(apiWorkspaces)) for _, ws := range apiWorkspaces {