fix(api): fix a mistake from #3636 which overwrote POST /responses

This commit is contained in:
Ashwin Bharambe 2025-10-02 13:03:17 -07:00
parent 0e13512dd7
commit 6afa96b0b9
10 changed files with 75 additions and 195 deletions

View file

@ -2089,11 +2089,16 @@
"post": { "post": {
"responses": { "responses": {
"200": { "200": {
"description": "A ListOpenAIResponseObject.", "description": "An OpenAIResponseObject.",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/ListOpenAIResponseObject" "$ref": "#/components/schemas/OpenAIResponseObject"
}
},
"text/event-stream": {
"schema": {
"$ref": "#/components/schemas/OpenAIResponseObjectStream"
} }
} }
} }
@ -2114,14 +2119,14 @@
"tags": [ "tags": [
"Agents" "Agents"
], ],
"summary": "List all OpenAI responses.", "summary": "Create a new OpenAI response.",
"description": "List all OpenAI responses.", "description": "Create a new OpenAI response.",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/ListOpenaiResponsesRequest" "$ref": "#/components/schemas/CreateOpenaiResponseRequest"
} }
} }
}, },
@ -10908,33 +10913,6 @@
], ],
"title": "OpenAIResponseObjectStreamResponseWebSearchCallSearching" "title": "OpenAIResponseObjectStreamResponseWebSearchCallSearching"
}, },
"ListOpenaiResponsesRequest": {
"type": "object",
"properties": {
"after": {
"type": "string",
"description": "The ID of the last response to return."
},
"limit": {
"type": "integer",
"description": "The number of responses to return."
},
"model": {
"type": "string",
"description": "The model to filter responses by."
},
"order": {
"type": "string",
"enum": [
"asc",
"desc"
],
"description": "The order to sort responses by when sorted by created_at ('asc' or 'desc')."
}
},
"additionalProperties": false,
"title": "ListOpenaiResponsesRequest"
},
"OpenAIDeleteResponseObject": { "OpenAIDeleteResponseObject": {
"type": "object", "type": "object",
"properties": { "properties": {

View file

@ -1529,11 +1529,14 @@ paths:
post: post:
responses: responses:
'200': '200':
description: A ListOpenAIResponseObject. description: An OpenAIResponseObject.
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/ListOpenAIResponseObject' $ref: '#/components/schemas/OpenAIResponseObject'
text/event-stream:
schema:
$ref: '#/components/schemas/OpenAIResponseObjectStream'
'400': '400':
$ref: '#/components/responses/BadRequest400' $ref: '#/components/responses/BadRequest400'
'429': '429':
@ -1546,14 +1549,14 @@ paths:
$ref: '#/components/responses/DefaultError' $ref: '#/components/responses/DefaultError'
tags: tags:
- Agents - Agents
summary: List all OpenAI responses. summary: Create a new OpenAI response.
description: List all OpenAI responses. description: Create a new OpenAI response.
parameters: [] parameters: []
requestBody: requestBody:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/ListOpenaiResponsesRequest' $ref: '#/components/schemas/CreateOpenaiResponseRequest'
required: true required: true
deprecated: true deprecated: true
/v1/openai/v1/responses/{response_id}: /v1/openai/v1/responses/{response_id}:
@ -8150,27 +8153,6 @@ components:
- type - type
title: >- title: >-
OpenAIResponseObjectStreamResponseWebSearchCallSearching OpenAIResponseObjectStreamResponseWebSearchCallSearching
ListOpenaiResponsesRequest:
type: object
properties:
after:
type: string
description: The ID of the last response to return.
limit:
type: integer
description: The number of responses to return.
model:
type: string
description: The model to filter responses by.
order:
type: string
enum:
- asc
- desc
description: >-
The order to sort responses by when sorted by created_at ('asc' or 'desc').
additionalProperties: false
title: ListOpenaiResponsesRequest
OpenAIDeleteResponseObject: OpenAIDeleteResponseObject:
type: object type: object
properties: properties:

View file

@ -1310,11 +1310,16 @@
"post": { "post": {
"responses": { "responses": {
"200": { "200": {
"description": "A ListOpenAIResponseObject.", "description": "An OpenAIResponseObject.",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/ListOpenAIResponseObject" "$ref": "#/components/schemas/OpenAIResponseObject"
}
},
"text/event-stream": {
"schema": {
"$ref": "#/components/schemas/OpenAIResponseObjectStream"
} }
} }
} }
@ -1335,14 +1340,14 @@
"tags": [ "tags": [
"Agents" "Agents"
], ],
"summary": "List all OpenAI responses.", "summary": "Create a new OpenAI response.",
"description": "List all OpenAI responses.", "description": "Create a new OpenAI response.",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/ListOpenaiResponsesRequest" "$ref": "#/components/schemas/CreateOpenaiResponseRequest"
} }
} }
}, },
@ -8233,33 +8238,6 @@
], ],
"title": "OpenAIResponseObjectStreamResponseWebSearchCallSearching" "title": "OpenAIResponseObjectStreamResponseWebSearchCallSearching"
}, },
"ListOpenaiResponsesRequest": {
"type": "object",
"properties": {
"after": {
"type": "string",
"description": "The ID of the last response to return."
},
"limit": {
"type": "integer",
"description": "The number of responses to return."
},
"model": {
"type": "string",
"description": "The model to filter responses by."
},
"order": {
"type": "string",
"enum": [
"asc",
"desc"
],
"description": "The order to sort responses by when sorted by created_at ('asc' or 'desc')."
}
},
"additionalProperties": false,
"title": "ListOpenaiResponsesRequest"
},
"OpenAIDeleteResponseObject": { "OpenAIDeleteResponseObject": {
"type": "object", "type": "object",
"properties": { "properties": {

View file

@ -967,11 +967,14 @@ paths:
post: post:
responses: responses:
'200': '200':
description: A ListOpenAIResponseObject. description: An OpenAIResponseObject.
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/ListOpenAIResponseObject' $ref: '#/components/schemas/OpenAIResponseObject'
text/event-stream:
schema:
$ref: '#/components/schemas/OpenAIResponseObjectStream'
'400': '400':
$ref: '#/components/responses/BadRequest400' $ref: '#/components/responses/BadRequest400'
'429': '429':
@ -984,14 +987,14 @@ paths:
$ref: '#/components/responses/DefaultError' $ref: '#/components/responses/DefaultError'
tags: tags:
- Agents - Agents
summary: List all OpenAI responses. summary: Create a new OpenAI response.
description: List all OpenAI responses. description: Create a new OpenAI response.
parameters: [] parameters: []
requestBody: requestBody:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/ListOpenaiResponsesRequest' $ref: '#/components/schemas/CreateOpenaiResponseRequest'
required: true required: true
deprecated: false deprecated: false
/v1/responses/{response_id}: /v1/responses/{response_id}:
@ -6196,27 +6199,6 @@ components:
- type - type
title: >- title: >-
OpenAIResponseObjectStreamResponseWebSearchCallSearching OpenAIResponseObjectStreamResponseWebSearchCallSearching
ListOpenaiResponsesRequest:
type: object
properties:
after:
type: string
description: The ID of the last response to return.
limit:
type: integer
description: The number of responses to return.
model:
type: string
description: The model to filter responses by.
order:
type: string
enum:
- asc
- desc
description: >-
The order to sort responses by when sorted by created_at ('asc' or 'desc').
additionalProperties: false
title: ListOpenaiResponsesRequest
OpenAIDeleteResponseObject: OpenAIDeleteResponseObject:
type: object type: object
properties: properties:

View file

@ -1310,11 +1310,16 @@
"post": { "post": {
"responses": { "responses": {
"200": { "200": {
"description": "A ListOpenAIResponseObject.", "description": "An OpenAIResponseObject.",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/ListOpenAIResponseObject" "$ref": "#/components/schemas/OpenAIResponseObject"
}
},
"text/event-stream": {
"schema": {
"$ref": "#/components/schemas/OpenAIResponseObjectStream"
} }
} }
} }
@ -1335,14 +1340,14 @@
"tags": [ "tags": [
"Agents" "Agents"
], ],
"summary": "List all OpenAI responses.", "summary": "Create a new OpenAI response.",
"description": "List all OpenAI responses.", "description": "Create a new OpenAI response.",
"parameters": [], "parameters": [],
"requestBody": { "requestBody": {
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/ListOpenaiResponsesRequest" "$ref": "#/components/schemas/CreateOpenaiResponseRequest"
} }
} }
}, },
@ -10242,33 +10247,6 @@
], ],
"title": "OpenAIResponseObjectStreamResponseWebSearchCallSearching" "title": "OpenAIResponseObjectStreamResponseWebSearchCallSearching"
}, },
"ListOpenaiResponsesRequest": {
"type": "object",
"properties": {
"after": {
"type": "string",
"description": "The ID of the last response to return."
},
"limit": {
"type": "integer",
"description": "The number of responses to return."
},
"model": {
"type": "string",
"description": "The model to filter responses by."
},
"order": {
"type": "string",
"enum": [
"asc",
"desc"
],
"description": "The order to sort responses by when sorted by created_at ('asc' or 'desc')."
}
},
"additionalProperties": false,
"title": "ListOpenaiResponsesRequest"
},
"OpenAIDeleteResponseObject": { "OpenAIDeleteResponseObject": {
"type": "object", "type": "object",
"properties": { "properties": {

View file

@ -970,11 +970,14 @@ paths:
post: post:
responses: responses:
'200': '200':
description: A ListOpenAIResponseObject. description: An OpenAIResponseObject.
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/ListOpenAIResponseObject' $ref: '#/components/schemas/OpenAIResponseObject'
text/event-stream:
schema:
$ref: '#/components/schemas/OpenAIResponseObjectStream'
'400': '400':
$ref: '#/components/responses/BadRequest400' $ref: '#/components/responses/BadRequest400'
'429': '429':
@ -987,14 +990,14 @@ paths:
$ref: '#/components/responses/DefaultError' $ref: '#/components/responses/DefaultError'
tags: tags:
- Agents - Agents
summary: List all OpenAI responses. summary: Create a new OpenAI response.
description: List all OpenAI responses. description: Create a new OpenAI response.
parameters: [] parameters: []
requestBody: requestBody:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/ListOpenaiResponsesRequest' $ref: '#/components/schemas/CreateOpenaiResponseRequest'
required: true required: true
deprecated: false deprecated: false
/v1/responses/{response_id}: /v1/responses/{response_id}:
@ -7641,27 +7644,6 @@ components:
- type - type
title: >- title: >-
OpenAIResponseObjectStreamResponseWebSearchCallSearching OpenAIResponseObjectStreamResponseWebSearchCallSearching
ListOpenaiResponsesRequest:
type: object
properties:
after:
type: string
description: The ID of the last response to return.
limit:
type: integer
description: The number of responses to return.
model:
type: string
description: The model to filter responses by.
order:
type: string
enum:
- asc
- desc
description: >-
The order to sort responses by when sorted by created_at ('asc' or 'desc').
additionalProperties: false
title: ListOpenaiResponsesRequest
OpenAIDeleteResponseObject: OpenAIDeleteResponseObject:
type: object type: object
properties: properties:

View file

@ -816,7 +816,7 @@ class Agents(Protocol):
""" """
... ...
@webmethod(route="/openai/v1/responses", method="POST", level=LLAMA_STACK_API_V1, deprecated=True) @webmethod(route="/openai/v1/responses", method="GET", level=LLAMA_STACK_API_V1, deprecated=True)
@webmethod(route="/responses", method="GET", level=LLAMA_STACK_API_V1) @webmethod(route="/responses", method="GET", level=LLAMA_STACK_API_V1)
async def list_openai_responses( async def list_openai_responses(
self, self,