test(interactions): drop role from Interaction output fields to match Google spec (#30986)

Google moved the role field off the top-level Interaction response schema onto the per-turn Turn schema, so the OpenAPI compliance canary test_interaction_response_fields started failing on main with "Output field 'role' not in spec". role on Turn is already asserted by test_turn_schema, so dropping it from the Interaction output_fields list realigns the test with the live spec without losing coverage.
This commit is contained in:
tin-berri 2026-06-22 11:00:50 -07:00 • committed by 冯基魁
parent 68d19ef63a
commit 16842f0fdd

View file

@ -156,7 +156,10 @@ class TestResponseCompliance:
# The response is the dedicated `Interaction` schema. Google moved the
# output-only fields (notably the `steps` array, formerly `outputs`)
# off `CreateModelInteractionParams` and onto `Interaction`; the request
# schema no longer carries `steps`. Keep this aligned with the live spec.
# schema no longer carries `steps`. Google later moved `role` off
# `Interaction` onto the per-turn `Turn` schema (asserted in
# test_turn_schema), so it is no longer a top-level output field here.
# Keep this aligned with the live spec.
schema = spec_dict["components"]["schemas"]["Interaction"]
# Output fields (readOnly).
@ -165,7 +168,6 @@ class TestResponseCompliance:
"status",
"created",
"updated",
"role",
"steps",
"usage",
]