On a typically muggy late-September day in Miami Beach, CBS’ Wiseguy, a show looking to reinvent itself, has pitched its tent in a now-vacant club that was once called Scratch.

Up against the bar stands Steven Bauer, the guy taking over from ex-series star Ken Wahl. He faces no small challenge — it was Wahl’s hulky, hunky Organized Crime Bureau undercover operative Vinnie Terranova who defined the show in its first three seasons. Off camera, Bauer smiles easily — the toothy smile of someone who, at ease, projects a very boyish manner, nonthreatening, almost aw-shucksy. Not at all a wiseguy.

But in this particular scene, in character as Michael Santana — a disbarred federal prosecutor trying to infiltrate a crime ring — he saunters, he swaggers, he chews gum like he means it. It’s a weapon of affectation in a face-off against two thugs who are threatening Santana’s girlfriend, Dahlia Mendez. She’s a nightclub singer, played by real-life Cuban-American pop star Martika (whose Toy Soldiers was a No. 1 hit in 1989). The cameras roll. The thugs strong-arm Dahlia. Santana leaps to her aid.

”You’re just another Havana banana,” one thug tells him.

”What’re you, kidding me?” says Santana. ”You guys are the bottom of the food chain?You stay away from me?And you keep that maggot away from Dahlia or I’m gonna kick your butt all the way to Tampa?”

All right. So the dialogue is not Raymond Chandler. Wiseguy is a show in transition, and the fine-tuning may take a while.

From the beginning, Wiseguy was a critical favorite with a devoted cult following. But ”cult” wasn’t enough for CBS. Network executives felt that the show’s multi-episode, to-be-continued plots frustrated viewers and made it hard for new ones to catch on. The network left the series off its schedule this fall, but, says Stephen Cannell, its cocreator and executive producer, ”They’re good guys and they knew I needed some more episodes for a syndication package. I went to CBS and said, ‘Will you support us if we make a change?”’ Then he talked to Wahl.

Says Cannell: ”I said if you want to do it my way, which is also the way CBS wants it, and the way we did it the first year and a half, fine. The show had gotten very serialized. You really had to watch it every week to enjoy it. [In the first year], each week Vinnie had a victory or a defeat in some way.”

The star didn’t like the new plan, and the two men agreed to disagree.

”I wasn’t fired, nor did I quit. It was kind of a mutual understanding,” says the notoriously press-shy Wahl. ”I wanted to come back — but not unconditionally. I was very proud of what we had done in all three seasons. [Cannell] wanted to go back to what the first year was like, which I thought was ridiculous for the character.”

The dispute eventually became bitter. ”They wanted me to do two to four episodes to segue into the new character, and I said, ‘No thanks,”’ Wahl explains. ”They offered me an awful lot of money, but I’d like to think I’ve got some dignity. I mean, it would’ve been a breeze, a month in Miami. But I couldn’t do it.” And so, Wahl went off to pursue a movie career (The Taking of Beverly Hills is due in May). Cannell cast Bauer, and CBS ordered 13 mid- season shows, the first of which aired Nov. 10. In Wahl’s absence, his alter ego, Vinnie, vanished — leaving good old Frank McPike (Jonathan Banks), Vinnie’s boss, handler, and buddy at OCB, to figure out what happened.

What happened first is that the trail led a troubled Frank to Miami — and to Michael Santana.

For Bauer, the road to Miami was significantly smoother. Bauer, 33, is best known for his first movie role, in Brian De Palma’s 1983 Scarface; for his lead role in Thief of Hearts, a 1984 film with sizzle that was supposed to make him a big star but fizzled instead; for his part as the doomed DEA agent Kiki Camarena in NBC’s Drug Wars: The Camarena Story miniseries of last January; and for once being married to Melanie Griffith. (Bauer and Griffith have a son, Alexander, 5, who lives with Griffith. Bauer and his current wife, former model Ingrid Anderson, 28, have an infant son, Dylan.)

The Miami episodes represent a real homecoming for Bauer. It is the town where he grew up after his mother, a schoolteacher, and his father, an airline pilot, fled Cuba when he was 3. His father loaded the family onto a plane, Bauer recalls, and ”in mid-flight he told the crew, ‘I’m not coming back; I’m gonna exile.’ Then the navigator said, ‘So am I,’ and the copilot said, ‘So am I.’ My dad had a dime in his pocket. An American dime. He called a friend. We stayed in a hotel on Ocean Drive. The Sun Haven, I think it was called. It was the same place, the same exact little hotel, where years later we shot Scarface.”

Miami is the town, too, where Bauer learned he loved to act, and where he was cast — still going by his real name, Rocky Echevarria — in public-TV’s late-’ 70s bilingual sitcom Que Pasa, USA? After its run, he discarded the ”Echevarria” to avoid typecasting, jettisoned the Rocky because ”Stallone ruined it for anyone else,” and acquired a new name: Steven (the anglicized version of his real first name, ”Esteban”) and Bauer (a family name from his mother’s side).

His first acting job in Hollywood, two weeks after he arrived, was in an episode of The Rockford Files, whose staff included a young writer named Stephen Cannell. In the years since, Cannell had remembered the actor and, Bauer says, ”made certain overtures to my representatives to do a television series, but we just hadn’t clicked.”

Until Wiseguy needed a new guy in its title role. One of the early choices was Armand Assante, but a deal didn’t come together.

”We thought maybe Italian again,” Cannell says. ”But then, the Steven Bauer thing started to happen, and we said, you know, he’s a Cuban-American, and that would really be interesting, and we started plotting these episodes. I called him up, and he said, ‘That’s really interesting?”’

Says Bauer: ”It’s not just that I’m doing a Latin lead character in a [drama] series. It’s that I’m doing the Cuban community in Miami. It’s fresh fare for the TV viewer.”

America’s last video vision of Miami — in NBC’s Miami Vice — was as a deco, postmodernist theme park that packed pistols, pastels, and high fashion. But it didn’t seem to acknowledge that Hispanics make up a majority of the city’s population. Wiseguy does. The current five-episode Miami ”arc” (TV talk for multi-episode plot lines) is rife with politics and passion, and with observations on the immigrant experience. Consistent with Wiseguy tradition, it is also a tale of family and betrayal.

McPike, the strongest link between the old Wiseguy and the new, recruits Santana to get inside the organization of a crime lord named Amado Guzman, played by Oscar winner Maximilian Schell (Judgment at Nuremberg). Schell plays an anti-Castro militant whose original desire to accumulate wealth and power to fight Castro has gradually been corrupted. Other story lines feature the drama of Haitian refugees washing ashore and the nuance of Cuban-exile politics from the perspective of Bay of Pigs veterans.

All the Wiseguy ingredients seem to be here: feds undercover, tension, topical plots. But how will the viewers react to a new wiseguy? Bauer is not worried. ”I know Ken Wahl’s got a following,” he says. ”But it’s not the kind of following that casts any awe. It’s not like stepping into some great TV personality’s shoes or a great actor’s shoes. It’s someone who’s a pretty good actor and somewhat of a cult hero. But he didn’t cast a gigantic shadow that I have to step into.”

Wahl’s take is surprisingly similar: ”I said from the beginning the show could survive without any particular individual because of its structure. And I really mean that. They’ll buy it if the show is good. Hey, I wish the guy the best. I got nothing against Steven Bauer. I kinda admire his courage, stepping in. Even though the show didn’t have a huge following, it was a loyal following, and I think people will be kinda saying, ‘Show me what you got.’ From what I hear, he’s a pretty straight guy, so I hope he comes out of it okay. And if you talk to him, tell him I say hello.”