The Cosby public style is neither militant nor confrontational. He is insistent on being optimistic and upbeat. Racial tensions may be prominent in current headlines but there is hardly a hint of their existence on ''The Cosby Show'' or ''A Different World.'' CBS's ''Frank's Place,'' a show that probably owes its existence to the success of ''The Cosby Show,'' is considerably more pointed as it encompasses a broad range of characters from diverse backgrounds and social levels. As a result, and understandably, Mr. Cosby must cope with critics, many of them black, who insist that his shows should have a harder edge. But Mr. Cosby's conciliatory manner can be underestimated. While seeming on the surface to be only exploiting the white road to success, he is consistently expanding opportunities for blacks to play key roles on that road. From the beginning, ''The Cosby Show'' has featured in passing many of the country's leading black actors and, reflecting one of Mr. Cosby's personal passions, jazz musicians. Next week, Mary Alice, who won a Tony Award this year for her performance in ''Fences,'' joins the regular cast of ''A Different World.'' A recent episode of ''The Cosby Show'' marked the directorial debut of Chuck Vinson, a black man and the program's stage manager. In another area, Mr. Cosby's enthusiasm and support was instrumental in getting Dance Theater of Harlem's ''Creole Giselle'' broadcast on NBC. Back in 1965, in the show ''I Spy,'' Bill Cosby became one of the first black performers to have a lead role in a weekly network television series. His efforts and expanding success since then have been key factors in not only his own shows being at the top of the ratings, but also in more black actors getting steady employment and exposure on a slew of other series, from ''Magnum, P.I.'' and ''Cagney and Lacey'' to ''Dynasty'' and ''Head of the Class.'' Sooner or later, obviously, ''The Cosby Show'' will be canceled. That's show business. But television's racial attitudes will be profoundly altered. That's bottom-line reality, and that's Mr. Cosby's lasting achievement.