From 409a0058edebf409e6fe1b7ea4aaf5cfa1be1d0e Mon Sep 17 00:00:00 2001 From: gym-cmd <186399764+gym-cmd@users.noreply.github.com> Date: Sat, 16 May 2026 00:33:49 +0100 Subject: [PATCH] fix(interactions): align openapi response fields --- litellm/types/interactions/generated.py | 2 ++ tests/test_litellm/interactions/test_openapi_compliance.py | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/litellm/types/interactions/generated.py b/litellm/types/interactions/generated.py index ed626b0b7c8..160b1879c01 100644 --- a/litellm/types/interactions/generated.py +++ b/litellm/types/interactions/generated.py @@ -1203,6 +1203,7 @@ class InteractionsAPIResponse(BaseLiteLLMOpenAIResponseObject): created: Optional[str] = None updated: Optional[str] = None role: Optional[str] = None + steps: Optional[List[Dict[str, Any]]] = None outputs: Optional[List[Dict[str, Any]]] = None usage: Optional[Dict[str, Any]] = None @@ -1228,6 +1229,7 @@ class InteractionsAPIStreamingResponse(BaseLiteLLMOpenAIResponseObject): created: Optional[str] = None updated: Optional[str] = None role: Optional[str] = None + steps: Optional[List[Dict[str, Any]]] = None outputs: Optional[List[Dict[str, Any]]] = None usage: Optional[Dict[str, Any]] = None delta: Optional[Dict[str, Any]] = None diff --git a/tests/test_litellm/interactions/test_openapi_compliance.py b/tests/test_litellm/interactions/test_openapi_compliance.py index cfcc426aa24..5bc41aac301 100644 --- a/tests/test_litellm/interactions/test_openapi_compliance.py +++ b/tests/test_litellm/interactions/test_openapi_compliance.py @@ -157,14 +157,16 @@ class TestResponseCompliance: # Check CreateModelInteractionParams which includes output fields schema = spec_dict["components"]["schemas"]["CreateModelInteractionParams"] - # Output fields (readOnly) + # Output fields (readOnly). Google's current OpenAPI response payload + # exposes content through `steps`; LiteLLM keeps `outputs` only as a + # compatibility response field. output_fields = [ "id", "status", "created", "updated", "role", - "outputs", + "steps", "usage", ]