Oddly enough, in plotly order you do dplyr group_by matters (I shouldn't think). Perhaps this is a mistake, perhaps some feature that I do not know about.
At this moment, plotly young and full of unexpected "errors" like this, so be very careful, expecting that plotly will become a complete replacement for ggplot2 , it is not even close at the moment, although it has some interesting functions.
So, you get what you want:
library(dplyr) library(plotly) mpg %>% group_by(class,manufacturer) %>% summarise(models=n()) %>% plot_ly(x=~manufacturer, y=~models, group=~class, type="scatter",color=~class, mode="lines+markers")
Yielding: 
Where, as you tried, you get a space:
library(dplyr) library(plotly) mpg %>% group_by(manufacturer,class) %>% summarise(models=n()) %>% plot_ly(x=~manufacturer, y=~models, group=~class, type="scatter",color=~class, mode="lines+markers")
orphaned strings for some odd reason:

And here is your version of ggplot for reference:
mpg %>% group_by(manufacturer, class) %>% summarise(models=n()) %>% ggplot(aes(x=manufacturer, y=models, group=class, color=class)) + geom_line() + geom_point() + theme_minimal()
