From 6afa96b0b9fbede5616ba961b5783780aedc91fe Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Thu, 2 Oct 2025 13:03:17 -0700 Subject: [PATCH] fix(api): fix a mistake from #3636 which overwrote POST /responses --- docs/docs/providers/agents/index.mdx | 4 +- docs/docs/providers/batches/index.mdx | 24 +++++------ docs/docs/providers/inference/index.mdx | 12 +++--- docs/static/deprecated-llama-stack-spec.html | 42 +++++--------------- docs/static/deprecated-llama-stack-spec.yaml | 34 ++++------------ docs/static/llama-stack-spec.html | 42 +++++--------------- docs/static/llama-stack-spec.yaml | 34 ++++------------ docs/static/stainless-llama-stack-spec.html | 42 +++++--------------- docs/static/stainless-llama-stack-spec.yaml | 34 ++++------------ llama_stack/apis/agents/agents.py | 2 +- 10 files changed, 75 insertions(+), 195 deletions(-) diff --git a/docs/docs/providers/agents/index.mdx b/docs/docs/providers/agents/index.mdx index 06eb104af..52b92734e 100644 --- a/docs/docs/providers/agents/index.mdx +++ b/docs/docs/providers/agents/index.mdx @@ -1,7 +1,7 @@ --- description: "Agents - APIs for creating and interacting with agentic systems." +APIs for creating and interacting with agentic systems." sidebar_label: Agents title: Agents --- @@ -12,6 +12,6 @@ title: Agents Agents - APIs for creating and interacting with agentic systems. +APIs for creating and interacting with agentic systems. This section contains documentation for all available providers for the **agents** API. diff --git a/docs/docs/providers/batches/index.mdx b/docs/docs/providers/batches/index.mdx index 2c64b277f..18e5e314d 100644 --- a/docs/docs/providers/batches/index.mdx +++ b/docs/docs/providers/batches/index.mdx @@ -1,14 +1,14 @@ --- description: "The Batches API enables efficient processing of multiple requests in a single operation, - particularly useful for processing large datasets, batch evaluation workflows, and - cost-effective inference at scale. +particularly useful for processing large datasets, batch evaluation workflows, and +cost-effective inference at scale. - The API is designed to allow use of openai client libraries for seamless integration. +The API is designed to allow use of openai client libraries for seamless integration. - This API provides the following extensions: - - idempotent batch creation +This API provides the following extensions: + - idempotent batch creation - Note: This API is currently under active development and may undergo changes." +Note: This API is currently under active development and may undergo changes." sidebar_label: Batches title: Batches --- @@ -18,14 +18,14 @@ title: Batches ## Overview The Batches API enables efficient processing of multiple requests in a single operation, - particularly useful for processing large datasets, batch evaluation workflows, and - cost-effective inference at scale. +particularly useful for processing large datasets, batch evaluation workflows, and +cost-effective inference at scale. - The API is designed to allow use of openai client libraries for seamless integration. +The API is designed to allow use of openai client libraries for seamless integration. - This API provides the following extensions: - - idempotent batch creation +This API provides the following extensions: + - idempotent batch creation - Note: This API is currently under active development and may undergo changes. +Note: This API is currently under active development and may undergo changes. This section contains documentation for all available providers for the **batches** API. diff --git a/docs/docs/providers/inference/index.mdx b/docs/docs/providers/inference/index.mdx index ebbaf1be1..1dc479675 100644 --- a/docs/docs/providers/inference/index.mdx +++ b/docs/docs/providers/inference/index.mdx @@ -1,9 +1,9 @@ --- description: "Llama Stack Inference API for generating completions, chat completions, and embeddings. - This API provides the raw interface to the underlying models. Two kinds of models are supported: - - LLM models: these models generate \"raw\" and \"chat\" (conversational) completions. - - Embedding models: these models generate embeddings to be used for semantic search." +This API provides the raw interface to the underlying models. Two kinds of models are supported: +- LLM models: these models generate \"raw\" and \"chat\" (conversational) completions. +- Embedding models: these models generate embeddings to be used for semantic search." sidebar_label: Inference title: Inference --- @@ -14,8 +14,8 @@ title: Inference Llama Stack Inference API for generating completions, chat completions, and embeddings. - This API provides the raw interface to the underlying models. Two kinds of models are supported: - - LLM models: these models generate "raw" and "chat" (conversational) completions. - - Embedding models: these models generate embeddings to be used for semantic search. +This API provides the raw interface to the underlying models. Two kinds of models are supported: +- LLM models: these models generate "raw" and "chat" (conversational) completions. +- Embedding models: these models generate embeddings to be used for semantic search. This section contains documentation for all available providers for the **inference** API. diff --git a/docs/static/deprecated-llama-stack-spec.html b/docs/static/deprecated-llama-stack-spec.html index 99ce8ee9c..fe63f78bc 100644 --- a/docs/static/deprecated-llama-stack-spec.html +++ b/docs/static/deprecated-llama-stack-spec.html @@ -2089,11 +2089,16 @@ "post": { "responses": { "200": { - "description": "A ListOpenAIResponseObject.", + "description": "An OpenAIResponseObject.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListOpenAIResponseObject" + "$ref": "#/components/schemas/OpenAIResponseObject" + } + }, + "text/event-stream": { + "schema": { + "$ref": "#/components/schemas/OpenAIResponseObjectStream" } } } @@ -2114,14 +2119,14 @@ "tags": [ "Agents" ], - "summary": "List all OpenAI responses.", - "description": "List all OpenAI responses.", + "summary": "Create a new OpenAI response.", + "description": "Create a new OpenAI response.", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListOpenaiResponsesRequest" + "$ref": "#/components/schemas/CreateOpenaiResponseRequest" } } }, @@ -10908,33 +10913,6 @@ ], "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": { "type": "object", "properties": { diff --git a/docs/static/deprecated-llama-stack-spec.yaml b/docs/static/deprecated-llama-stack-spec.yaml index d2e595b5d..9b1d3eff6 100644 --- a/docs/static/deprecated-llama-stack-spec.yaml +++ b/docs/static/deprecated-llama-stack-spec.yaml @@ -1529,11 +1529,14 @@ paths: post: responses: '200': - description: A ListOpenAIResponseObject. + description: An OpenAIResponseObject. content: application/json: schema: - $ref: '#/components/schemas/ListOpenAIResponseObject' + $ref: '#/components/schemas/OpenAIResponseObject' + text/event-stream: + schema: + $ref: '#/components/schemas/OpenAIResponseObjectStream' '400': $ref: '#/components/responses/BadRequest400' '429': @@ -1546,14 +1549,14 @@ paths: $ref: '#/components/responses/DefaultError' tags: - Agents - summary: List all OpenAI responses. - description: List all OpenAI responses. + summary: Create a new OpenAI response. + description: Create a new OpenAI response. parameters: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/ListOpenaiResponsesRequest' + $ref: '#/components/schemas/CreateOpenaiResponseRequest' required: true deprecated: true /v1/openai/v1/responses/{response_id}: @@ -8150,27 +8153,6 @@ components: - type 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: type: object properties: diff --git a/docs/static/llama-stack-spec.html b/docs/static/llama-stack-spec.html index 3da721a4e..fa16e62ee 100644 --- a/docs/static/llama-stack-spec.html +++ b/docs/static/llama-stack-spec.html @@ -1310,11 +1310,16 @@ "post": { "responses": { "200": { - "description": "A ListOpenAIResponseObject.", + "description": "An OpenAIResponseObject.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListOpenAIResponseObject" + "$ref": "#/components/schemas/OpenAIResponseObject" + } + }, + "text/event-stream": { + "schema": { + "$ref": "#/components/schemas/OpenAIResponseObjectStream" } } } @@ -1335,14 +1340,14 @@ "tags": [ "Agents" ], - "summary": "List all OpenAI responses.", - "description": "List all OpenAI responses.", + "summary": "Create a new OpenAI response.", + "description": "Create a new OpenAI response.", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListOpenaiResponsesRequest" + "$ref": "#/components/schemas/CreateOpenaiResponseRequest" } } }, @@ -8233,33 +8238,6 @@ ], "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": { "type": "object", "properties": { diff --git a/docs/static/llama-stack-spec.yaml b/docs/static/llama-stack-spec.yaml index 3927d3a94..733e2cd21 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -967,11 +967,14 @@ paths: post: responses: '200': - description: A ListOpenAIResponseObject. + description: An OpenAIResponseObject. content: application/json: schema: - $ref: '#/components/schemas/ListOpenAIResponseObject' + $ref: '#/components/schemas/OpenAIResponseObject' + text/event-stream: + schema: + $ref: '#/components/schemas/OpenAIResponseObjectStream' '400': $ref: '#/components/responses/BadRequest400' '429': @@ -984,14 +987,14 @@ paths: $ref: '#/components/responses/DefaultError' tags: - Agents - summary: List all OpenAI responses. - description: List all OpenAI responses. + summary: Create a new OpenAI response. + description: Create a new OpenAI response. parameters: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/ListOpenaiResponsesRequest' + $ref: '#/components/schemas/CreateOpenaiResponseRequest' required: true deprecated: false /v1/responses/{response_id}: @@ -6196,27 +6199,6 @@ components: - type 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: type: object properties: diff --git a/docs/static/stainless-llama-stack-spec.html b/docs/static/stainless-llama-stack-spec.html index f921d2c29..72ecb5bb5 100644 --- a/docs/static/stainless-llama-stack-spec.html +++ b/docs/static/stainless-llama-stack-spec.html @@ -1310,11 +1310,16 @@ "post": { "responses": { "200": { - "description": "A ListOpenAIResponseObject.", + "description": "An OpenAIResponseObject.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListOpenAIResponseObject" + "$ref": "#/components/schemas/OpenAIResponseObject" + } + }, + "text/event-stream": { + "schema": { + "$ref": "#/components/schemas/OpenAIResponseObjectStream" } } } @@ -1335,14 +1340,14 @@ "tags": [ "Agents" ], - "summary": "List all OpenAI responses.", - "description": "List all OpenAI responses.", + "summary": "Create a new OpenAI response.", + "description": "Create a new OpenAI response.", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ListOpenaiResponsesRequest" + "$ref": "#/components/schemas/CreateOpenaiResponseRequest" } } }, @@ -10242,33 +10247,6 @@ ], "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": { "type": "object", "properties": { diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index cb43b313b..151ea1029 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -970,11 +970,14 @@ paths: post: responses: '200': - description: A ListOpenAIResponseObject. + description: An OpenAIResponseObject. content: application/json: schema: - $ref: '#/components/schemas/ListOpenAIResponseObject' + $ref: '#/components/schemas/OpenAIResponseObject' + text/event-stream: + schema: + $ref: '#/components/schemas/OpenAIResponseObjectStream' '400': $ref: '#/components/responses/BadRequest400' '429': @@ -987,14 +990,14 @@ paths: $ref: '#/components/responses/DefaultError' tags: - Agents - summary: List all OpenAI responses. - description: List all OpenAI responses. + summary: Create a new OpenAI response. + description: Create a new OpenAI response. parameters: [] requestBody: content: application/json: schema: - $ref: '#/components/schemas/ListOpenaiResponsesRequest' + $ref: '#/components/schemas/CreateOpenaiResponseRequest' required: true deprecated: false /v1/responses/{response_id}: @@ -7641,27 +7644,6 @@ components: - type 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: type: object properties: diff --git a/llama_stack/apis/agents/agents.py b/llama_stack/apis/agents/agents.py index dcd0d83d2..811fe6aa2 100644 --- a/llama_stack/apis/agents/agents.py +++ b/llama_stack/apis/agents/agents.py @@ -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) async def list_openai_responses( self,