A decade ago, Chicago handed over control of its parking meters to a cadre of private investors. Officials pitched the deal as an innovative win-win. In exchange for a 75-year lease, the cash-strapped city got a lump sum. In fact, that large upfront payment was far less than the meters’ potential revenue—it was more than $1 billion too low.

In an upcoming article, professors Max Schanzenbach and Nadav Shoked of Northwestern Law School point out that the city got away with that bad deal, in part, because it was a city. Schanzenbach and Shoked argue that if a private corporation had done what Chicago did—entering into an arrangement aimed at solving "short-term financial problems, without properly considering the long-term implications of the deal," as Chicago’s Office of the Inspector General put it at the time—it would have been sued for violating its duty of care. The distinction may seem small, but as cities become embroiled with private companies, promising to fund and build city infrastructure, it’s worth ironing out what obligations a city owes its residents.

Beginning last fall, Toronto has been getting a flood of publicity about a deal with Sidewalk Labs, part of Google spinoff Alphabet. Reports describe the deal as giving Sidewalk the authority to build in an undeveloped 12-acre portion of the city called Quayside. The idea is that Sidewalk will collect data about everything from water use to air quality to the perambulations of Quayside's future populace and use that data to run energy, transport, and all other systems. Swarms of sensors inside and outside buildings and on streets will be constantly on duty, monitoring and modulating.

But Toronto recently revealed that deal has put it in a tough place. A nonprofit development corporation, not the city, made the arrangement with Google that sparked all the publicity—the city itself doesn't appear to have known a deal with Google was in the works. Now the situation appears messy: The details of the arrangement are not public, the planning process is being paid for by Google, and Google won’t continue funding that process unless government authorities promise they’ll reach a final agreement that aligns with Google’s interests. Those interests include Google's desire to expand its Toronto experiments beyond that 12-acre Quayside plot.

Toronto, like Chicago, seems to be holding too few of the cards. Yet the city still has a chance to act as a good steward by avoiding the long-term risks that come with involving Google in urban planning.

When Toronto decided to redevelop its eastern waterfront almost 20 years ago, much of the land in the area was owned by the city, the province of Ontario, and the national government. To smooth the process of development, these entities gave Waterfront Toronto, a nonprofit corporation with a private board, authority to strategize about revitalization plans, while retaining the authority to approve any agreements having to do with government-owned land. It was Waterfront Toronto, acting without input from city staff, that made the "framework" deal with Google last fall that kicked off all the publicity.

And what great publicity it was. Mayors and other local elected officials love to look forward-thinking, and in a world of constrained resources, they'll happily be associated with something that looks both shiny and free. The designs and sketches published so far by Sidewalk are visually arresting, featuring modular, fully green buildings, a bustling coexistence between small businesses and residents, and lively, well-planted pocket parks. The leader of Sidewalk Labs, former NYC deputy mayor Dan Doctoroff, told the press that Google's plan was to improve the quality of life in cities generally, starting with the Quayside project as a pilot. Google's systems, bristling with cameras and antennae, could, according to Doctoroff, improve on democracy.

The reality is that Google has agreed—in a secret framework document—to spend $10 million on a planning process aimed at producing agreements that can be implemented only if the city and other government authorities go along with a plan that benefits Google. (And Google clearly needs its experiments in Quayside to operate at a larger scale in order for them to be cost-effective for the company.) All the media coverage has given Google tremendous leverage as the city scrambles to figure out what to do. Last week, Toronto's city council got a report making clear the city hadn't known what Waterfront Toronto was doing. In response, the council has asked Waterfront Toronto to include Toronto's chief information officer and chief transformation officer in the planning process.