It will very much depend on whether your previous contract was covered by a collective bargaining agreement and if so, which one. In most general circumstances, one can not simply replace a CDI employee that has been made redundant for “motifs économiques” by a new hire in the same post. However, you mention that the new supplier was already on the books, so the business had already subcontracted out to the new external supplier (presumably some kind of 3rd party language training organisation, or SCOP, or auto-entrepreneur) while you were still in employment. You would be best to seek advice from an employment lawyer as to whether or not this was legal, as only they would really be able to provide you with an advice after having taken complete stock of the situation.
I know of other organisations that are behaving in this way, who are definitely sailing very close to the edge of legality. Were I an employment lawyer, I would be up for taking them to court, but you also need to bear in mind that the government has relaxed the law around making people redundant in a bid to free up the employment market and make it more flexible, so I imagine that there are a few more loopholes for employers to wriggle into than there were previously.