From 14696f93674c731350caa7f5ade6e2985c86b85e Mon Sep 17 00:00:00 2001 From: Luis Tomas Bolivar Date: Fri, 3 Oct 2025 14:51:38 +0200 Subject: [PATCH] Update OpenAIResponseInput to include OpenAIResponseOutput --- docs/static/deprecated-llama-stack-spec.html | 14 +------------- docs/static/deprecated-llama-stack-spec.yaml | 6 +----- docs/static/llama-stack-spec.html | 14 +------------- docs/static/llama-stack-spec.yaml | 6 +----- docs/static/stainless-llama-stack-spec.html | 14 +------------- docs/static/stainless-llama-stack-spec.yaml | 6 +----- llama_stack/apis/agents/openai_responses.py | 10 +--------- 7 files changed, 7 insertions(+), 63 deletions(-) diff --git a/docs/static/deprecated-llama-stack-spec.html b/docs/static/deprecated-llama-stack-spec.html index 7edfe3f5d..faa4eda98 100644 --- a/docs/static/deprecated-llama-stack-spec.html +++ b/docs/static/deprecated-llama-stack-spec.html @@ -8759,25 +8759,13 @@ "OpenAIResponseInput": { "oneOf": [ { - "$ref": "#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall" - }, - { - "$ref": "#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall" - }, - { - "$ref": "#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall" + "$ref": "#/components/schemas/OpenAIResponseOutput" }, { "$ref": "#/components/schemas/OpenAIResponseInputFunctionToolCallOutput" }, - { - "$ref": "#/components/schemas/OpenAIResponseMCPApprovalRequest" - }, { "$ref": "#/components/schemas/OpenAIResponseMCPApprovalResponse" - }, - { - "$ref": "#/components/schemas/OpenAIResponseMessage" } ] }, diff --git a/docs/static/deprecated-llama-stack-spec.yaml b/docs/static/deprecated-llama-stack-spec.yaml index ca832d46b..3ab3e7103 100644 --- a/docs/static/deprecated-llama-stack-spec.yaml +++ b/docs/static/deprecated-llama-stack-spec.yaml @@ -6493,13 +6493,9 @@ components: Error details for failed OpenAI response requests. OpenAIResponseInput: oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutput' - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - - $ref: '#/components/schemas/OpenAIResponseMessage' "OpenAIResponseInputFunctionToolCallOutput": type: object properties: diff --git a/docs/static/llama-stack-spec.html b/docs/static/llama-stack-spec.html index 4693d39e0..a6bf606c2 100644 --- a/docs/static/llama-stack-spec.html +++ b/docs/static/llama-stack-spec.html @@ -6170,25 +6170,13 @@ "OpenAIResponseInput": { "oneOf": [ { - "$ref": "#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall" - }, - { - "$ref": "#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall" - }, - { - "$ref": "#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall" + "$ref": "#/components/schemas/OpenAIResponseOutput" }, { "$ref": "#/components/schemas/OpenAIResponseInputFunctionToolCallOutput" }, - { - "$ref": "#/components/schemas/OpenAIResponseMCPApprovalRequest" - }, { "$ref": "#/components/schemas/OpenAIResponseMCPApprovalResponse" - }, - { - "$ref": "#/components/schemas/OpenAIResponseMessage" } ] }, diff --git a/docs/static/llama-stack-spec.yaml b/docs/static/llama-stack-spec.yaml index 7d275a221..90e3cfbb5 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -4588,13 +4588,9 @@ components: Error details for failed OpenAI response requests. OpenAIResponseInput: oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutput' - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - - $ref: '#/components/schemas/OpenAIResponseMessage' "OpenAIResponseInputFunctionToolCallOutput": type: object properties: diff --git a/docs/static/stainless-llama-stack-spec.html b/docs/static/stainless-llama-stack-spec.html index 1ae477e7e..435cf1173 100644 --- a/docs/static/stainless-llama-stack-spec.html +++ b/docs/static/stainless-llama-stack-spec.html @@ -8179,25 +8179,13 @@ "OpenAIResponseInput": { "oneOf": [ { - "$ref": "#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall" - }, - { - "$ref": "#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall" - }, - { - "$ref": "#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall" + "$ref": "#/components/schemas/OpenAIResponseOutput" }, { "$ref": "#/components/schemas/OpenAIResponseInputFunctionToolCallOutput" }, - { - "$ref": "#/components/schemas/OpenAIResponseMCPApprovalRequest" - }, { "$ref": "#/components/schemas/OpenAIResponseMCPApprovalResponse" - }, - { - "$ref": "#/components/schemas/OpenAIResponseMessage" } ] }, diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index cb2584d8a..67530100e 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -6033,13 +6033,9 @@ components: Error details for failed OpenAI response requests. OpenAIResponseInput: oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutput' - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - - $ref: '#/components/schemas/OpenAIResponseMessage' "OpenAIResponseInputFunctionToolCallOutput": type: object properties: diff --git a/llama_stack/apis/agents/openai_responses.py b/llama_stack/apis/agents/openai_responses.py index 0f3511ea3..5a7f4c8d5 100644 --- a/llama_stack/apis/agents/openai_responses.py +++ b/llama_stack/apis/agents/openai_responses.py @@ -746,15 +746,7 @@ class OpenAIResponseInputFunctionToolCallOutput(BaseModel): OpenAIResponseInput = Annotated[ # Responses API allows output messages to be passed in as input - OpenAIResponseOutputMessageWebSearchToolCall - | OpenAIResponseOutputMessageFileSearchToolCall - | OpenAIResponseOutputMessageFunctionToolCall - | OpenAIResponseInputFunctionToolCallOutput - | OpenAIResponseMCPApprovalRequest - | OpenAIResponseMCPApprovalResponse - | - # Fallback to the generic message type as a last resort - OpenAIResponseMessage, + OpenAIResponseOutput | OpenAIResponseInputFunctionToolCallOutput | OpenAIResponseMCPApprovalResponse, Field(union_mode="left_to_right"), ] register_schema(OpenAIResponseInput, name="OpenAIResponseInput")