Secretary of State Cyrus Vance's peace mission to the Middle East ended here today, within a few miles of where it began 11 days ago, with a hint of renewed military conflict in years to come.

Standing at Vance's side in the shaded garden of a state guest house, Egyptian President Anwar Sadat protested the "very hard Israeli line" toward a negotiated settlement and pointedly suggested that Egypt might fail to renew a vital part of the Sinai II disengagement agreement in October 1978.

The United Nations peace-keeping force in the Sinai Peninsula, one part of the many-faceted agreement negotiated by then-Secretary of State Henry Kissinger, will be up for renewal in the fall of next year. Egypt's opposition would bring about removal of about 1,500 U.N. personnel stationed between Egypt and Israel, raise military tensions and cast doubt on the rest of Kissinger's hard-won pact, which cemented Sadat's American connection.

Vance, who began his Middle East journey Aug. 1 with a visit to Sadat in nearby Alexandria, came here to brief the Egyptian leader on his talks in Israel before leaving the region for London and home.

The failure of Israeli Prime Minister Menahem Begin to show any hint of present or future accommodation on fundamental issues involving Palestinians frustrated Vance's efforts and sharply diminished the chances for a comprehensive Middle East settlement so long as Begin is in power.

Sadat said he agreed to stay in close contact with Vance, especially during the United Nations General Assembly session next month when Arab and Israeli foreign minister are expected to have separate talks with Vance.

Despite the setback to the prospects of a settlement, Sadat said "I'm always optimistic by nature" and added that he continues to trust the United States and the Carter administration.

Speaking of Israel, Sadat said: "Let us hope that they will reach the conclusion that it will not serve them, this hare line."

Then with a glance at the whirring cameras and the crowd of reporters, the Eguptian leader added: "And may I remind the parties concerned that the second disengagement agreement expires on October 1978." He turned from the microphones and flung his arms wide toward Vance, laughing mischievously.

Unlike the full-dress, nationally televised press conference at the conclusion of their intensive talks a week ago, Sadat and Vance refused to answer questions today about peace prospects or other issues. Vance had no comment later to reporters accompanying him about Sadat's statements or anything else. A spokesman said the extension of the U.S. force in the Sinai Peninsula had been raised in the Vance-Sadat discussions.

U.S. officials said Sadat has referred several times in recent weeks to the date for renewal of the U.N. force in the Sinai, but without much notice outside of Egypt.

Informed observers doubt that Egypt's military forces, cut off from their accustomed Soviet source for arms and equipment for many months, will be in condition to launch major action against Israel for quite some time. But U.S. officials and many others in the region anticipate an accelerated military buildup in Egypt and other Arab states and, by way of reaction, in Israel if it becomes accepted that no progress on the peace front is possible.

Vance's day began in Jerusalem, which he completed his substantive talks with Begin the day before. The Secreatry of State left Lod Airport without making any public statement and flew to Jordon and Syria to brief top leaders there in quick stopovers before flying on to Egypt.

After his visit with Sadat, which lasted about one hour, Vance flew on to London where he is to confer with British Foreign Secretary David Owen and black and white leaders from southern Africa.

Sadat's remarks, Vance's tight-lipped demeanor and the strain and concern displayed by others in his traveling party reflected a worrisome setback to the Carter administration's hopes for momentum toward a comprehensive Middle East peace.

When he arrived in Egypt 11 days ago, Vance said his purpose was to "speed up" progress toward a Geneva conference. On departure he said nothing in public, but it was clear that the Geneva conference this year has become highly unlikely and Vance's job now is to find ways to keep peace hopes from dying and new tensions and military threats from piling up.