Nobody expected Uber to show up and decimate the value of a New York City taxi medallion, but state Attorney General Letitia James is basically insisting City Hall should’ve known — and wants the city to cough up $810 million within 30 days, or she’ll sue. Ridiculous.

Thursday’s letter from the AG’s Division of Economic Justice (sigh) to city Comptroller Scott Stringer accuses the city of, among other things, marketing medallions “in a manner that artificially inflated the price.”

The city made “over $855 million” from auctions from 2002 to 2014 telling lenders and buyers (many of them “immigrants with a limited understanding of the English language”) that medallions were “a solid investment with steady growth” offering returns “better than the stock market.”

Yet the returns were that good — for a time. It’s why medallions went for as much as $1 million in 2013. But now it’s less than $200,000, after the rise of ride-share apps crashed the market in late 2014.

The AG’s office claims city officials knew back in 2011 that market prices exceeded the medallions’ actual value. But the reality is more complicated — and the suit would cover many earlier years.

Everyone sympathizes with mom-and-pop medallion owners now struggling to stay afloat. But any relief should come via City Council action: Suing in the name of social justice seems likely to mostly reward the big players who control hundreds of medallions — not the little guys.