@@ -674,6 +674,33 @@ def test_embedded_input_request_entries_without_method_reject_at_the_surface_ste
674674 methods .parse_server_result ("tools/call" , "2026-07-28" , body )
675675
676676
677+ def test_input_required_url_elicit_without_elicitation_id_parses_at_2026 ():
678+ """A 2026-07-28 `InputRequiredResult` embedding a URL-mode elicitation parses
679+ through both the surface and monolith steps without `elicitationId`.
680+
681+ Spec-mandated: the field is required at 2025-11-25 only and removed at
682+ 2026-07-28; the monolith model carries it as optional so the superset can
683+ accept both versions.
684+ """
685+ body = {
686+ "resultType" : "input_required" ,
687+ "inputRequests" : {
688+ "r1" : {
689+ "method" : "elicitation/create" ,
690+ "params" : {"mode" : "url" , "message" : "Please sign in" , "url" : "https://example.com/auth" },
691+ }
692+ },
693+ }
694+ parsed = methods .parse_server_result ("tools/call" , "2026-07-28" , body )
695+ assert isinstance (parsed , types .InputRequiredResult )
696+ assert parsed .input_requests is not None
697+ request = parsed .input_requests ["r1" ]
698+ assert isinstance (request , types .ElicitRequest )
699+ assert isinstance (request .params , types .ElicitRequestURLParams )
700+ assert request .params .url == "https://example.com/auth"
701+ assert request .params .elicitation_id is None
702+
703+
677704def test_none_params_omit_the_key_so_required_params_reject ():
678705 with pytest .raises (pydantic .ValidationError ) as excinfo :
679706 methods .parse_client_request ("tools/call" , "2025-11-25" , None )
0 commit comments