NOT ALL the polls are in yet, but it's apparent that the Louisville debate has changed the terms of the campaign. The Democrats, sulky in the face of what seemed impending defeat, were nipping at the heels of a nominee who was the overwhelming choice of the party's insiders. Now they're cheering him on. The Republicans, so giddily confident a few days ago, were talking about a long-term realignment and recapture of working control of both houses of Congress. Now they're arguing vehemently that everybody else is interpreting the debate wrong.

Most insiders still assume Ronald Reagan will win. But there's far less confidence -- or fear -- that the Republicans will make major gains in the congressional elections. A week ago Rep. Newt Gingrich (R-Ga.) said the White House had made a commitment to go all out for Republican House candidates if the debates went well. The hope was that not only Mr. Reagan's personal popularity, but the ideas and policies he stands strongly for could be used to rally support for many little- known and surprisingly modestly financed challengers around the country.

Now many politicians doubt that there will be such an effort, at least before the Kansas City debate Oct. 21. One reason is that any drop in Mr. Reagan's percentage will put him near the magic 50 percent -- a level that may make his managers nervous. Another reason is that the president was not very successful in conveying the themes and ideas that are essential, in this nation of adept ticket-splitters, to any coattail effect. Finally, the rise in Democrats' morale, if sustained, will result in higher Democratic turnout, enough to make the difference in a dozen or so House races.

Certainly most Republican challengers will still be happy to see the president in their districts and will not shy away from him on the platform. But on the other side, you'll be seeing more Democrats cozying up to Walter Mondale as, for example, New York Mayor Edward Koch did Monday -- who notably had spent Labor Day on a Long Island beach rather than with Mr. Mondale in a Manhattan parade.