This city has one million Jewish voters and large communities of blacks and Puerto Ricans. So it figures to be the stronghold of American liberalism.

But the mayor's race here shows that New York has cut itself off from the liberal moorings. This leaves, in New York as in the country at large, a situation in which television is dominant and voters are inevitably given exaggerated expectations about the candidates who win.

In keeping with the liberal tilt of the city, the Democratic primary was, from the outset, where it was at in the mayoralty election. When the race got under way last spring, two liberal candidates were way out front.

One was former Rep. Bella Abzug. In the Congress she had represented the heavily Jewish West Side of Manhattan and stood for all the liberal issues nationally. As a woman who had affinities with all the newer minorities, as a flamboyant personality and a former candidate for the Senate, she had nearly universal recognition.

The other liberal candidate was Mayor Abraham Beame. The incumbency gave him enormous name recognition. In addition, he was the darling of the Brooklyn Democratic organization and of most of the labor unions that had battened on the city's generous pension plans.

But the fiscal crisis, the high crime rate dramatized by the Son of Sam case and the looting that took place during the blackout during the summer hardened an already extant voter resistance to liberal candidates. In the first Democratic primary on Sept. 8, Abzug and Mayor Beame were both eliminated.

They were beaten by two relative unknowns, Rep. Edward Koch and Mario Cuomo, the secretary of state in the Albany administration of Gov. Hugh Carey. Koch, though a liberal in Congress, took a conservative stance on crime, which he dramatized by advocating the death penalty in murder cases and calling up the National Guard to stem the blackout looting. Cuomo came on chiefly as the neighborhood candidate, representing embattled white ethnic groups. He had the support of Carey, a leader of the conservative Democrats in the state, who kept insisting that Koch could never carry th non-Jewish white neighborhoods so important in Queens and Staten Island.

Both men became known largely through television. If these two candidates were not exactly household names, they had king-sized media operations. Koch had the services of David Garth, an image-maker who has helped win elections from New York to California. Bess Myerson, the former Miss America, was actively in the Koch corner as a magnet for celebrities and a fundraiser. Koch spent about half a million dollars.

Cuomo spent about the same. He had the services of Jerry Rafshoon, the maker of Carter's television ads. Cuomo's fundraising was done by one of the most effective money men in the country, former Under Secretary of Commerce Howard Samuels.

In the runoff, the liberal weakness was even more apparent. With Beame and Abzug out and black and Puerto Rican candidates also eliminated, the vote dropped badly.

Koch won largely on the strength of his television ads. Those ads are apt to be a severe hadicap if, as seems nearly certain, Koch wins the general election in November. For the points emphasized in the television spots have no relevance to his performance as mayor. At city hall he will have nothing to say about the death penalty. Calling out the National Guard arises only in special circumstances. Thus while he may be a very good mayor, there is no way he can deliver on the expectations raised in the campaign.

The relevance of all this to national politics in general and the case of Jimmy Carter in particular hardly needs underlining. New York is a model for the conservative bent of the country at large. Jimmy Carter has been called a conservative Democrat, but his initiatives in such matters as energy, welfare, social Security and taxes are in trouble because he is far more liberal than the Democratic Congress.

Carter's difficulties are bound to cause disappointment. For like Koch, the President passed in his campaign a media test that had almost nothing to do with his ability to perform in office.