From 38de8ea1f7ceb0d77ef55f2bd638d8f8ee402df5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 30 Oct 2025 17:56:42 +0100 Subject: [PATCH] wip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: SΓ©bastien Han --- .pre-commit-config.yaml | 11 +- client-sdks/stainless/openapi.yml | 21638 ++++++++-------- .../static/experimental-llama-stack-spec.yaml | 1945 +- docs/static/llama-stack-spec.yaml | 4488 +++- docs/static/stainless-llama-stack-spec.yaml | 21638 ++++++++-------- pyproject.toml | 7 +- scripts/fastapi_generator.py | 811 +- scripts/run_openapi_generator.sh | 19 + scripts/validate_openapi.py | 290 + .../apis/agents/openai_responses.py | 1 + src/llama_stack/apis/tools/tools.py | 1 + uv.lock | 99 + 12 files changed, 26571 insertions(+), 24377 deletions(-) create mode 100755 scripts/run_openapi_generator.sh create mode 100755 scripts/validate_openapi.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 279c5791e..bf9956040 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -110,11 +110,20 @@ repos: name: API Spec Codegen additional_dependencies: - uv==0.7.8 - entry: sh -c './scripts/uv-run-with-index.sh run scripts/fastapi_generator.py docs/static' + entry: sh -c './scripts/uv-run-with-index.sh run scripts/run_openapi_generator.sh' language: python pass_filenames: false require_serial: true files: ^src/llama_stack/apis/ + - id: openapi-validate + name: OpenAPI Schema Validation + additional_dependencies: + - uv==0.7.8 + entry: uv run scripts/validate_openapi.py docs/static/ --quiet + language: python + pass_filenames: false + require_serial: true + files: ^docs/static/.*\.ya?ml$ - id: check-workflows-use-hashes name: Check GitHub Actions use SHA-pinned actions entry: ./scripts/check-workflows-use-hashes.sh diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index 120c20b6a..118a887d6 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -1,19 +1,13 @@ openapi: 3.1.0 info: - title: >- - Llama Stack Specification - Stable & Experimental APIs - version: v1 - description: >- - This is the specification of the Llama Stack that provides - a set of endpoints and their corresponding interfaces that are - tailored to - best leverage Llama Models. - - **πŸ”— COMBINED**: This specification includes both stable production-ready APIs - and experimental pre-release APIs. Use stable APIs for production deployments - and experimental APIs for testing new features. + title: Llama Stack API - Stable & Experimental APIs + description: "A comprehensive API for building and deploying AI applications\n\n**πŸ”— COMBINED**: This specification includes both stable production-ready APIs and experimental pre-release APIs. Use stable APIs for production deployments and experimental APIs for testing new features." + version: 1.0.0 servers: - - url: http://any-hosted-llama-stack.com +- url: https://api.llamastack.com + description: Production server +- url: https://staging-api.llamastack.com + description: Staging server paths: /v1/batches: get: @@ -3480,44 +3474,72 @@ paths: deprecated: false /v1beta/datasetio/append-rows/{dataset_id}: post: + tags: + - V1Beta + summary: Append Rows + description: Generic endpoint - this would be replaced with actual implementation. + operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' responses: '200': - description: OK + description: Successful Response + content: + application/json: + schema: {} '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - DatasetIO - summary: Append rows to a dataset. - description: >- - Append rows to a dataset. - - :param dataset_id: The ID of the dataset to append the rows to. - :param rows: The rows to append to the dataset. - parameters: - - name: dataset_id - description: >- - The ID of the dataset to append the rows to. - required: true - schema: - type: string - in: path - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AppendRowsRequest' - required: true - deprecated: false + description: Default Response /v1beta/datasetio/iterrows/{dataset_id}: get: + tags: + - V1Beta + summary: Iterrows + description: Query endpoint for proper schema generation. + operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get + parameters: + - name: dataset_id + in: path + required: true + schema: + type: string + title: Dataset Id + - name: limit + in: query + required: true + schema: + type: integer + title: Limit + - name: start_index + in: query + required: true + schema: + type: integer + title: Start Index responses: '200': description: A PaginatedResponse. @@ -3527,59 +3549,23 @@ paths: $ref: '#/components/schemas/PaginatedResponse' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - DatasetIO - summary: >- - Get a paginated list of rows from a dataset. - description: >- - Get a paginated list of rows from a dataset. - - Uses offset-based pagination where: - - start_index: The starting index (0-based). If None, starts from - beginning. - - limit: Number of items to return. If None or -1, returns all items. - - The response includes: - - data: List of items for the current page. - - has_more: Whether there are more items available after this set. - - :param dataset_id: The ID of the dataset to get the rows from. - :param start_index: Index into dataset for the first row to get. Get - all rows if None. - :param limit: The number of rows to get. - :returns: A PaginatedResponse. - parameters: - - name: dataset_id - description: >- - The ID of the dataset to get the rows from. - required: true - schema: - type: string - in: path - - name: start_index - description: >- - Index into dataset for the first row to get. Get all rows if None. - required: false - schema: - type: integer - in: query - - name: limit - description: The number of rows to get. - required: false - schema: - type: integer - in: query - deprecated: false + description: Default Response /v1beta/datasets: get: + tags: + - V1Beta + summary: List Datasets + description: Response-only endpoint for proper schema generation. + operationId: list_datasets_v1beta_datasets_get responses: '200': description: A ListDatasetsResponse. @@ -3588,120 +3574,103 @@ paths: schema: $ref: '#/components/schemas/ListDatasetsResponse' '400': + description: Bad Request $ref: '#/components/responses/BadRequest400' '429': - $ref: >- - #/components/responses/TooManyRequests429 + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: >- - #/components/responses/InternalServerError500 + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: + description: Default Response $ref: '#/components/responses/DefaultError' - tags: - - Datasets - summary: List all datasets. - description: >- - List all datasets. - - :returns: A ListDatasetsResponse. - parameters: [] - deprecated: false post: - responses: - '200': - description: A Dataset. - content: - application/json: - schema: - $ref: '#/components/schemas/Dataset' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' tags: - - Datasets - summary: Register a new dataset. - description: >- - Register a new dataset. - - :param purpose: The purpose of the dataset. - One of: - - "post-training/messages": The dataset contains a messages column - with list of messages for post-training. - { - "messages": [ - {"role": "user", "content": "Hello, world!"}, - {"role": "assistant", "content": "Hello, world!"}, - ] - } - - "eval/question-answer": The dataset contains a question column - and an answer column for evaluation. - { - "question": "What is the capital of France?", - "answer": "Paris" - } - - "eval/messages-answer": The dataset contains a messages column - with list of messages and an answer column for evaluation. - { - "messages": [ - {"role": "user", "content": "Hello, my name is John - Doe."}, - {"role": "assistant", "content": "Hello, John Doe. - How can I help you today?"}, - {"role": "user", "content": "What's my name?"}, - ], - "answer": "John Doe" - } - :param source: The data source of the dataset. Ensure that the data - source schema is compatible with the purpose of the dataset. Examples: - - { - "type": "uri", - "uri": "https://mywebsite.com/mydata.jsonl" - } - - { - "type": "uri", - "uri": "lsfs://mydata.jsonl" - } - - { - "type": "uri", - "uri": "data:csv;base64,{base64_content}" - } - - { - "type": "uri", - "uri": "huggingface://llamastack/simpleqa?split=train" - } - - { - "type": "rows", - "rows": [ - { - "messages": [ - {"role": "user", "content": "Hello, world!"}, - {"role": "assistant", "content": "Hello, world!"}, - ] - } - ] - } - :param metadata: The metadata for the dataset. - - E.g. {"description": "My dataset"}. - :param dataset_id: The ID of the dataset. If not provided, an ID will - be generated. - :returns: A Dataset. - parameters: [] + - V1Beta + summary: Register Dataset + description: Typed endpoint for proper schema generation. + operationId: register_dataset_v1beta_datasets_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/RegisterDatasetRequest' + $ref: '#/components/schemas/__main_____datasets_Request' required: true - deprecated: false + responses: + '200': + description: A Dataset. + content: + application/json: + schema: + $ref: '#/components/schemas/Dataset' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' /v1beta/datasets/{dataset_id}: + delete: + tags: + - V1Beta + summary: Unregister Dataset + description: Generic endpoint - this would be replaced with actual implementation. + operationId: unregister_dataset_v1beta_datasets__dataset_id__delete + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response get: + tags: + - V1Beta + summary: Get Dataset + description: Query endpoint for proper schema generation. + operationId: get_dataset_v1beta_datasets__dataset_id__get + parameters: + - name: dataset_id + in: path + required: true + schema: + type: string + title: Dataset Id responses: '200': description: A Dataset. @@ -3711,61 +3680,36 @@ paths: $ref: '#/components/schemas/Dataset' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Datasets - summary: Get a dataset by its ID. - description: >- - Get a dataset by its ID. - - :param dataset_id: The ID of the dataset to get. - :returns: A Dataset. - parameters: - - name: dataset_id - description: The ID of the dataset to get. - required: true - schema: - type: string - in: path - deprecated: false - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Datasets - summary: Unregister a dataset by its ID. - description: >- - Unregister a dataset by its ID. - - :param dataset_id: The ID of the dataset to unregister. - parameters: - - name: dataset_id - description: The ID of the dataset to unregister. - required: true - schema: - type: string - in: path - deprecated: false + description: Default Response /v1alpha/agents: get: + tags: + - V1Alpha + summary: List Agents + description: Query endpoint for proper schema generation. + operationId: list_agents_v1alpha_agents_get + parameters: + - name: limit + in: query + required: true + schema: + type: integer + title: Limit + - name: start_index + in: query + required: true + schema: + type: integer + title: Start Index responses: '200': description: A PaginatedResponse. @@ -3775,75 +3719,102 @@ paths: $ref: '#/components/schemas/PaginatedResponse' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: List all agents. - description: >- - List all agents. - - :param start_index: The index to start the pagination from. - :param limit: The number of agents to return. - :returns: A PaginatedResponse. - parameters: - - name: start_index - description: The index to start the pagination from. - required: false - schema: - type: integer - in: query - - name: limit - description: The number of agents to return. - required: false - schema: - type: integer - in: query - deprecated: false + description: Default Response post: + tags: + - V1Alpha + summary: Create Agent + description: Typed endpoint for proper schema generation. + operationId: create_agent_v1alpha_agents_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AgentConfig' responses: '200': - description: >- - An AgentCreateResponse with the agent ID. + description: An AgentCreateResponse with the agent ID. content: application/json: schema: $ref: '#/components/schemas/AgentCreateResponse' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: >- - Create an agent with the given configuration. - description: >- - Create an agent with the given configuration. - - :param agent_config: The configuration for the agent. - :returns: An AgentCreateResponse with the agent ID. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateAgentRequest' - required: true - deprecated: false + description: Default Response /v1alpha/agents/{agent_id}: + delete: + tags: + - V1Alpha + summary: Delete Agent + description: Generic endpoint - this would be replaced with actual implementation. + operationId: delete_agent_v1alpha_agents__agent_id__delete + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: agent_id + in: path + required: true + schema: + type: string + description: 'Path parameter: agent_id' + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response get: + tags: + - V1Alpha + summary: Get Agent + description: Query endpoint for proper schema generation. + operationId: get_agent_v1alpha_agents__agent_id__get + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + title: Agent Id responses: '200': description: An Agent of the agent. @@ -3853,62 +3824,29 @@ paths: $ref: '#/components/schemas/Agent' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Describe an agent by its ID. - description: >- - Describe an agent by its ID. - - :param agent_id: ID of the agent. - :returns: An Agent of the agent. - parameters: - - name: agent_id - description: ID of the agent. - required: true - schema: - type: string - in: path - deprecated: false - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: >- - Delete an agent by its ID and its associated sessions and turns. - description: >- - Delete an agent by its ID and its associated sessions and turns. - - :param agent_id: The ID of the agent to delete. - parameters: - - name: agent_id - description: The ID of the agent to delete. - required: true - schema: - type: string - in: path - deprecated: false + description: Default Response /v1alpha/agents/{agent_id}/session: post: + tags: + - V1Alpha + summary: Create Agent Session + description: Typed endpoint for proper schema generation. + operationId: create_agent_session_v1alpha_agents__agent_id__session_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/__main_____agents_agent_id_session_Request' + required: true responses: '200': description: An AgentSessionCreateResponse. @@ -3917,41 +3855,97 @@ paths: schema: $ref: '#/components/schemas/AgentSessionCreateResponse' '400': + description: Bad Request $ref: '#/components/responses/BadRequest400' '429': - $ref: >- - #/components/responses/TooManyRequests429 + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: >- - #/components/responses/InternalServerError500 + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + description: 'Path parameter: agent_id' + /v1alpha/agents/{agent_id}/session/{session_id}: + delete: + tags: + - V1Alpha + summary: Delete Agents Session + description: Generic endpoint - this would be replaced with actual implementation. + operationId: delete_agents_session_v1alpha_agents__agent_id__session__session_id__delete + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: agent_id + in: path + required: true + schema: + type: string + description: 'Path parameter: agent_id' + - name: session_id + in: path + required: true + schema: + type: string + description: 'Path parameter: session_id' + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Create a new session for an agent. - description: >- - Create a new session for an agent. - - :param agent_id: The ID of the agent to create the session for. - :param session_name: The name of the session to create. - :returns: An AgentSessionCreateResponse. - parameters: - - name: agent_id - description: >- - The ID of the agent to create the session for. - required: true - schema: - type: string - in: path - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateAgentSessionRequest' - required: true - deprecated: false - /v1alpha/agents/{agent_id}/session/{session_id}: + description: Default Response get: + tags: + - V1Alpha + summary: Get Agents Session + description: Query endpoint for proper schema generation. + operationId: get_agents_session_v1alpha_agents__agent_id__session__session_id__get + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + title: Agent Id + - name: session_id + in: path + required: true + schema: + type: string + title: Session Id + - name: turn_ids + in: query + required: true + schema: + type: string + title: Turn Ids responses: '200': description: A Session. @@ -3961,87 +3955,29 @@ paths: $ref: '#/components/schemas/Session' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Retrieve an agent session by its ID. - description: >- - Retrieve an agent session by its ID. - - :param session_id: The ID of the session to get. - :param agent_id: The ID of the agent to get the session for. - :param turn_ids: (Optional) List of turn IDs to filter the session - by. - :returns: A Session. - parameters: - - name: session_id - description: The ID of the session to get. - required: true - schema: - type: string - in: path - - name: agent_id - description: >- - The ID of the agent to get the session for. - required: true - schema: - type: string - in: path - - name: turn_ids - description: >- - (Optional) List of turn IDs to filter the session by. - required: false - schema: - $ref: '#/components/schemas/list' - in: query - deprecated: false - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: >- - Delete an agent session by its ID and its associated turns. - description: >- - Delete an agent session by its ID and its associated turns. - - :param session_id: The ID of the session to delete. - :param agent_id: The ID of the agent to delete the session for. - parameters: - - name: session_id - description: The ID of the session to delete. - required: true - schema: - type: string - in: path - - name: agent_id - description: >- - The ID of the agent to delete the session for. - required: true - schema: - type: string - in: path - deprecated: false + description: Default Response /v1alpha/agents/{agent_id}/session/{session_id}/turn: post: + tags: + - V1Alpha + summary: Create Agent Turn + description: Typed endpoint for proper schema generation. + operationId: create_agent_turn_v1alpha_agents__agent_id__session__session_id__turn_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/__main_____agents_agent_id_session_session_id_turn_Request' + required: true responses: '200': description: If stream=False, returns a Turn object. @@ -4049,62 +3985,57 @@ paths: application/json: schema: $ref: '#/components/schemas/Turn' - text/event-stream: - schema: - $ref: '#/components/schemas/AsyncIterator' '400': + description: Bad Request $ref: '#/components/responses/BadRequest400' '429': - $ref: >- - #/components/responses/TooManyRequests429 + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: >- - #/components/responses/InternalServerError500 + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: + description: Default Response $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Create a new turn for an agent. - description: >- - Create a new turn for an agent. - - :param agent_id: The ID of the agent to create the turn for. - :param session_id: The ID of the session to create the turn for. - :param messages: List of messages to start the turn with. - :param stream: (Optional) If True, generate an SSE event stream of - the response. Defaults to False. - :param documents: (Optional) List of documents to create the turn - with. - :param toolgroups: (Optional) List of toolgroups to create the turn - with, will be used in addition to the agent's config toolgroups for the request. - :param tool_config: (Optional) The tool configuration to create the - turn with, will be used to override the agent's tool_config. - :returns: If stream=False, returns a Turn object. - If stream=True, returns an SSE event stream of AgentTurnResponseStreamChunk. parameters: - - name: agent_id - description: >- - The ID of the agent to create the turn for. - required: true - schema: - type: string - in: path - - name: session_id - description: >- - The ID of the session to create the turn for. - required: true - schema: - type: string - in: path - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateAgentTurnRequest' + - name: agent_id + in: path required: true - deprecated: false + schema: + type: string + description: 'Path parameter: agent_id' + - name: session_id + in: path + required: true + schema: + type: string + description: 'Path parameter: session_id' /v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}: get: + tags: + - V1Alpha + summary: Get Agents Turn + description: Query endpoint for proper schema generation. + operationId: get_agents_turn_v1alpha_agents__agent_id__session__session_id__turn__turn_id__get + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + title: Agent Id + - name: session_id + in: path + required: true + schema: + type: string + title: Session Id + - name: turn_id + in: path + required: true + schema: + type: string + title: Turn Id responses: '200': description: A Turn. @@ -4114,116 +4045,99 @@ paths: $ref: '#/components/schemas/Turn' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Retrieve an agent turn by its ID. - description: >- - Retrieve an agent turn by its ID. - - :param agent_id: The ID of the agent to get the turn for. - :param session_id: The ID of the session to get the turn for. - :param turn_id: The ID of the turn to get. - :returns: A Turn. - parameters: - - name: agent_id - description: The ID of the agent to get the turn for. - required: true - schema: - type: string - in: path - - name: session_id - description: >- - The ID of the session to get the turn for. - required: true - schema: - type: string - in: path - - name: turn_id - description: The ID of the turn to get. - required: true - schema: - type: string - in: path - deprecated: false + description: Default Response /v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}/resume: post: - responses: - '200': - description: >- - A Turn object if stream is False, otherwise an AsyncIterator of AgentTurnResponseStreamChunk - objects. - content: - application/json: - schema: - $ref: '#/components/schemas/Turn' - text/event-stream: - schema: - $ref: '#/components/schemas/AsyncIterator' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' tags: - - Agents - summary: >- - Resume an agent turn with executed tool call responses. - description: >- - Resume an agent turn with executed tool call responses. - - When a Turn has the status `awaiting_input` due to pending input from client - side tool calls, this endpoint can be used to submit the outputs from the - tool calls once they are ready. - - :param agent_id: The ID of the agent to resume. - :param session_id: The ID of the session to resume. - :param turn_id: The ID of the turn to resume. - :param tool_responses: The tool call responses to resume the turn - with. - :param stream: Whether to stream the response. - :returns: A Turn object if stream is False, otherwise an AsyncIterator - of AgentTurnResponseStreamChunk objects. - parameters: - - name: agent_id - description: The ID of the agent to resume. - required: true - schema: - type: string - in: path - - name: session_id - description: The ID of the session to resume. - required: true - schema: - type: string - in: path - - name: turn_id - description: The ID of the turn to resume. - required: true - schema: - type: string - in: path + - V1Alpha + summary: Resume Agent Turn + description: Typed endpoint for proper schema generation. + operationId: resume_agent_turn_v1alpha_agents__agent_id__session__session_id__turn__turn_id__resume_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/ResumeAgentTurnRequest' + $ref: '#/components/schemas/__main_____agents_agent_id_session_session_id_turn_turn_id_resume_Request' required: true - deprecated: false + responses: + '200': + description: A Turn object if stream is False, otherwise an AsyncIterator of AgentTurnResponseStreamChunk objects. + content: + application/json: + schema: + $ref: '#/components/schemas/Turn' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + description: 'Path parameter: agent_id' + - name: session_id + in: path + required: true + schema: + type: string + description: 'Path parameter: session_id' + - name: turn_id + in: path + required: true + schema: + type: string + description: 'Path parameter: turn_id' /v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}/step/{step_id}: get: + tags: + - V1Alpha + summary: Get Agents Step + description: Query endpoint for proper schema generation. + operationId: get_agents_step_v1alpha_agents__agent_id__session__session_id__turn__turn_id__step__step_id__get + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + title: Agent Id + - name: session_id + in: path + required: true + schema: + type: string + title: Session Id + - name: step_id + in: path + required: true + schema: + type: string + title: Step Id + - name: turn_id + in: path + required: true + schema: + type: string + title: Turn Id responses: '200': description: An AgentStepResponse. @@ -4233,54 +4147,42 @@ paths: $ref: '#/components/schemas/AgentStepResponse' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Retrieve an agent step by its ID. - description: >- - Retrieve an agent step by its ID. - - :param agent_id: The ID of the agent to get the step for. - :param session_id: The ID of the session to get the step for. - :param turn_id: The ID of the turn to get the step for. - :param step_id: The ID of the step to get. - :returns: An AgentStepResponse. - parameters: - - name: agent_id - description: The ID of the agent to get the step for. - required: true - schema: - type: string - in: path - - name: session_id - description: >- - The ID of the session to get the step for. - required: true - schema: - type: string - in: path - - name: turn_id - description: The ID of the turn to get the step for. - required: true - schema: - type: string - in: path - - name: step_id - description: The ID of the step to get. - required: true - schema: - type: string - in: path - deprecated: false + description: Default Response /v1alpha/agents/{agent_id}/sessions: get: + tags: + - V1Alpha + summary: List Agent Sessions + description: Query endpoint for proper schema generation. + operationId: list_agent_sessions_v1alpha_agents__agent_id__sessions_get + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + title: Agent Id + - name: limit + in: query + required: true + schema: + type: integer + title: Limit + - name: start_index + in: query + required: true + schema: + type: integer + title: Start Index responses: '200': description: A PaginatedResponse. @@ -4290,47 +4192,23 @@ paths: $ref: '#/components/schemas/PaginatedResponse' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: List all session(s) of a given agent. - description: >- - List all session(s) of a given agent. - - :param agent_id: The ID of the agent to list sessions for. - :param start_index: The index to start the pagination from. - :param limit: The number of sessions to return. - :returns: A PaginatedResponse. - parameters: - - name: agent_id - description: >- - The ID of the agent to list sessions for. - required: true - schema: - type: string - in: path - - name: start_index - description: The index to start the pagination from. - required: false - schema: - type: integer - in: query - - name: limit - description: The number of sessions to return. - required: false - schema: - type: integer - in: query - deprecated: false + description: Default Response /v1alpha/eval/benchmarks: get: + tags: + - V1Alpha + summary: List Benchmarks + description: Response-only endpoint for proper schema generation. + operationId: list_benchmarks_v1alpha_eval_benchmarks_get responses: '200': description: A ListBenchmarksResponse. @@ -4340,60 +4218,106 @@ paths: $ref: '#/components/schemas/ListBenchmarksResponse' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Benchmarks - summary: List all benchmarks. - description: >- - List all benchmarks. - - :returns: A ListBenchmarksResponse. - parameters: [] - deprecated: false + description: Default Response post: + tags: + - V1Alpha + summary: Register Benchmark + description: Generic endpoint - this would be replaced with actual implementation. + operationId: register_benchmark_v1alpha_eval_benchmarks_post + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs responses: '200': - description: OK + description: Successful Response + content: + application/json: + schema: {} '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Benchmarks - summary: Register a benchmark. - description: >- - Register a benchmark. - - :param benchmark_id: The ID of the benchmark to register. - :param dataset_id: The ID of the dataset to use for the benchmark. - :param scoring_functions: The scoring functions to use for the benchmark. - :param provider_benchmark_id: The ID of the provider benchmark to - use for the benchmark. - :param provider_id: The ID of the provider to use for the benchmark. - :param metadata: The metadata to use for the benchmark. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterBenchmarkRequest' - required: true - deprecated: false + description: Default Response /v1alpha/eval/benchmarks/{benchmark_id}: + delete: + tags: + - V1Alpha + summary: Unregister Benchmark + description: Generic endpoint - this would be replaced with actual implementation. + operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response get: + tags: + - V1Alpha + summary: Get Benchmark + description: Query endpoint for proper schema generation. + operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get + parameters: + - name: benchmark_id + in: path + required: true + schema: + type: string + title: Benchmark Id responses: '200': description: A Benchmark. @@ -4403,151 +4327,161 @@ paths: $ref: '#/components/schemas/Benchmark' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Benchmarks - summary: Get a benchmark by its ID. - description: >- - Get a benchmark by its ID. - - :param benchmark_id: The ID of the benchmark to get. - :returns: A Benchmark. - parameters: - - name: benchmark_id - description: The ID of the benchmark to get. - required: true - schema: - type: string - in: path - deprecated: false - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Benchmarks - summary: Unregister a benchmark. - description: >- - Unregister a benchmark. - - :param benchmark_id: The ID of the benchmark to unregister. - parameters: - - name: benchmark_id - description: The ID of the benchmark to unregister. - required: true - schema: - type: string - in: path - deprecated: false + description: Default Response /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: post: + tags: + - V1Alpha + summary: Evaluate Rows + description: Typed endpoint for proper schema generation. + operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BenchmarkConfig' + required: true responses: '200': - description: >- - EvaluateResponse object containing generations and scores. + description: EvaluateResponse object containing generations and scores. content: application/json: schema: $ref: '#/components/schemas/EvaluateResponse' '400': + description: Bad Request $ref: '#/components/responses/BadRequest400' '429': - $ref: >- - #/components/responses/TooManyRequests429 + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: >- - #/components/responses/InternalServerError500 + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: + description: Default Response $ref: '#/components/responses/DefaultError' - tags: - - Eval - summary: Evaluate a list of rows on a benchmark. - description: >- - Evaluate a list of rows on a benchmark. - - :param benchmark_id: The ID of the benchmark to run the evaluation on. - :param input_rows: The rows to evaluate. - :param scoring_functions: The scoring functions to use for the evaluation. - :param benchmark_config: The configuration for the benchmark. - :returns: EvaluateResponse object containing generations and scores. parameters: - - name: benchmark_id - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - in: path + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs: + post: + tags: + - V1Alpha + summary: Run Eval + description: Typed endpoint for proper schema generation. + operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/EvaluateRowsRequest' + $ref: '#/components/schemas/BenchmarkConfig' required: true - deprecated: false - /v1alpha/eval/benchmarks/{benchmark_id}/jobs: - post: responses: '200': - description: >- - The job that was created to run the evaluation. + description: The job that was created to run the evaluation. content: application/json: schema: $ref: '#/components/schemas/Job' '400': + description: Bad Request $ref: '#/components/responses/BadRequest400' '429': - $ref: >- - #/components/responses/TooManyRequests429 + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: >- - #/components/responses/InternalServerError500 + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: + delete: + tags: + - V1Alpha + summary: Job Cancel + description: Generic endpoint - this would be replaced with actual implementation. + operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' + - name: job_id + in: path + required: true + schema: + type: string + description: 'Path parameter: job_id' + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Eval - summary: Run an evaluation on a benchmark. - description: >- - Run an evaluation on a benchmark. - - :param benchmark_id: The ID of the benchmark to run the evaluation on. - :param benchmark_config: The configuration for the benchmark. - :returns: The job that was created to run the evaluation. - parameters: - - name: benchmark_id - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - in: path - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunEvalRequest' - required: true - deprecated: false - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: + description: Default Response get: + tags: + - V1Alpha + summary: Job Status + description: Query endpoint for proper schema generation. + operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get + parameters: + - name: benchmark_id + in: path + required: true + schema: + type: string + title: Benchmark Id + - name: job_id + in: path + required: true + schema: + type: string + title: Job Id responses: '200': description: The status of the evaluation job. @@ -4557,77 +4491,36 @@ paths: $ref: '#/components/schemas/Job' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Eval - summary: Get the status of a job. - description: >- - Get the status of a job. - - :param benchmark_id: The ID of the benchmark to run the evaluation on. - :param job_id: The ID of the job to get the status of. - :returns: The status of the evaluation job. - parameters: - - name: benchmark_id - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - in: path - - name: job_id - description: The ID of the job to get the status of. - required: true - schema: - type: string - in: path - deprecated: false - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Eval - summary: Cancel a job. - description: >- - Cancel a job. - - :param benchmark_id: The ID of the benchmark to run the evaluation on. - :param job_id: The ID of the job to cancel. - parameters: - - name: benchmark_id - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - in: path - - name: job_id - description: The ID of the job to cancel. - required: true - schema: - type: string - in: path - deprecated: false + description: Default Response /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: get: + tags: + - V1Alpha + summary: Job Result + description: Query endpoint for proper schema generation. + operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get + parameters: + - name: benchmark_id + in: path + required: true + schema: + type: string + title: Benchmark Id + - name: job_id + in: path + required: true + schema: + type: string + title: Job Id responses: '200': description: The result of the job. @@ -4637,85 +4530,62 @@ paths: $ref: '#/components/schemas/EvaluateResponse' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Eval - summary: Get the result of a job. - description: >- - Get the result of a job. - - :param benchmark_id: The ID of the benchmark to run the evaluation on. - :param job_id: The ID of the job to get the result of. - :returns: The result of the job. - parameters: - - name: benchmark_id - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - in: path - - name: job_id - description: The ID of the job to get the result of. - required: true - schema: - type: string - in: path - deprecated: false + description: Default Response /v1alpha/inference/rerank: post: + tags: + - V1Alpha + summary: Rerank + description: Typed endpoint for proper schema generation. + operationId: rerank_v1alpha_inference_rerank_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_inference_rerank_Request' + required: true responses: '200': - description: >- - RerankResponse with indices sorted by relevance score (descending). + description: RerankResponse with indices sorted by relevance score (descending). content: application/json: schema: $ref: '#/components/schemas/RerankResponse' '400': + description: Bad Request $ref: '#/components/responses/BadRequest400' '429': - $ref: >- - #/components/responses/TooManyRequests429 + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: >- - #/components/responses/InternalServerError500 + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: + description: Default Response $ref: '#/components/responses/DefaultError' - tags: - - Inference - summary: >- - Rerank a list of documents based on their relevance to a query. - description: >- - Rerank a list of documents based on their relevance to a query. - - :param model: The identifier of the reranking model to use. - :param query: The search query to rank items against. Can be a string, - text content part, or image content part. The input must not exceed the model's - max input token length. - :param items: List of items to rerank. Each item can be a string, - text content part, or image content part. Each input must not exceed the model's - max input token length. - :param max_num_results: (Optional) Maximum number of results to return. - Default: returns all. - :returns: RerankResponse with indices sorted by relevance score (descending). - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RerankRequest' - required: true - deprecated: false /v1alpha/post-training/job/artifacts: get: + tags: + - V1Alpha + summary: Get Training Job Artifacts + description: Query endpoint for proper schema generation. + operationId: get_training_job_artifacts_v1alpha_post_training_job_artifacts_get + parameters: + - name: job_uuid + in: query + required: true + schema: + type: string + title: Job Uuid responses: '200': description: A PostTrainingJobArtifactsResponse. @@ -4725,63 +4595,66 @@ paths: $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Get the artifacts of a training job. - description: >- - Get the artifacts of a training job. - - :param job_uuid: The UUID of the job to get the artifacts of. - :returns: A PostTrainingJobArtifactsResponse. - parameters: - - name: job_uuid - description: >- - The UUID of the job to get the artifacts of. - required: true - schema: - type: string - in: query - deprecated: false + description: Default Response /v1alpha/post-training/job/cancel: post: + tags: + - V1Alpha + summary: Cancel Training Job + description: Generic endpoint - this would be replaced with actual implementation. + operationId: cancel_training_job_v1alpha_post_training_job_cancel_post + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs responses: '200': - description: OK + description: Successful Response + content: + application/json: + schema: {} '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Cancel a training job. - description: >- - Cancel a training job. - - :param job_uuid: The UUID of the job to cancel. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CancelTrainingJobRequest' - required: true - deprecated: false + description: Default Response /v1alpha/post-training/job/status: get: + tags: + - V1Alpha + summary: Get Training Job Status + description: Query endpoint for proper schema generation. + operationId: get_training_job_status_v1alpha_post_training_job_status_get + parameters: + - name: job_uuid + in: query + required: true + schema: + type: string + title: Job Uuid responses: '200': description: A PostTrainingJobStatusResponse. @@ -4791,33 +4664,23 @@ paths: $ref: '#/components/schemas/PostTrainingJobStatusResponse' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Get the status of a training job. - description: >- - Get the status of a training job. - - :param job_uuid: The UUID of the job to get the status of. - :returns: A PostTrainingJobStatusResponse. - parameters: - - name: job_uuid - description: >- - The UUID of the job to get the status of. - required: true - schema: - type: string - in: query - deprecated: false + description: Default Response /v1alpha/post-training/jobs: get: + tags: + - V1Alpha + summary: Get Training Jobs + description: Response-only endpoint for proper schema generation. + operationId: get_training_jobs_v1alpha_post_training_jobs_get responses: '200': description: A ListPostTrainingJobsResponse. @@ -4826,26 +4689,30 @@ paths: schema: $ref: '#/components/schemas/ListPostTrainingJobsResponse' '400': + description: Bad Request $ref: '#/components/responses/BadRequest400' '429': - $ref: >- - #/components/responses/TooManyRequests429 + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: >- - #/components/responses/InternalServerError500 + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: + description: Default Response $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Get all training jobs. - description: >- - Get all training jobs. - - :returns: A ListPostTrainingJobsResponse. - parameters: [] - deprecated: false /v1alpha/post-training/preference-optimize: post: + tags: + - V1Alpha + summary: Preference Optimize + description: Typed endpoint for proper schema generation. + operationId: preference_optimize_v1alpha_post_training_preference_optimize_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DPOAlignmentConfig' + required: true responses: '200': description: A PostTrainingJob. @@ -4854,38 +4721,30 @@ paths: schema: $ref: '#/components/schemas/PostTrainingJob' '400': + description: Bad Request $ref: '#/components/responses/BadRequest400' '429': - $ref: >- - #/components/responses/TooManyRequests429 + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: >- - #/components/responses/InternalServerError500 + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: + description: Default Response $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Run preference optimization of a model. - description: >- - Run preference optimization of a model. - - :param job_uuid: The UUID of the job to create. - :param finetuned_model: The model to fine-tune. - :param algorithm_config: The algorithm configuration. - :param training_config: The training configuration. - :param hyperparam_search_config: The hyperparam search configuration. - :param logger_config: The logger configuration. - :returns: A PostTrainingJob. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PreferenceOptimizeRequest' - required: true - deprecated: false /v1alpha/post-training/supervised-fine-tune: post: + tags: + - V1Alpha + summary: Supervised Fine Tune + description: Typed endpoint for proper schema generation. + operationId: supervised_fine_tune_v1alpha_post_training_supervised_fine_tune_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TrainingConfig' + required: true responses: '200': description: A PostTrainingJob. @@ -4894,55 +4753,8440 @@ paths: schema: $ref: '#/components/schemas/PostTrainingJob' '400': + description: Bad Request $ref: '#/components/responses/BadRequest400' '429': - $ref: >- - #/components/responses/TooManyRequests429 + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: >- - #/components/responses/InternalServerError500 + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/batches: + get: + tags: + - V1 + summary: List Batches + description: Query endpoint for proper schema generation. + operationId: list_batches_v1_batches_get + parameters: + - name: after + in: query + required: true + schema: + type: string + title: After + - name: limit + in: query + required: false + schema: + type: integer + default: 20 + title: Limit + responses: + '200': + description: A list of batch objects. + content: + application/json: + schema: + $ref: '#/components/schemas/ListBatchesResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' + description: Default Response + post: tags: - - PostTraining (Coming Soon) - summary: Run supervised fine-tuning of a model. - description: >- - Run supervised fine-tuning of a model. - - :param job_uuid: The UUID of the job to create. - :param training_config: The training configuration. - :param hyperparam_search_config: The hyperparam search configuration. - :param logger_config: The logger configuration. - :param model: The model to fine-tune. - :param checkpoint_dir: The directory to save checkpoint(s) to. - :param algorithm_config: The algorithm configuration. - :returns: A PostTrainingJob. - parameters: [] + - V1 + summary: Create Batch + description: Typed endpoint for proper schema generation. + operationId: create_batch_v1_batches_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_batches_Request' + responses: + '200': + description: The created batch object. + content: + application/json: + schema: + $ref: '#/components/schemas/Batch' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/batches/{batch_id}: + get: + tags: + - V1 + summary: Retrieve Batch + description: Query endpoint for proper schema generation. + operationId: retrieve_batch_v1_batches__batch_id__get + parameters: + - name: batch_id + in: path + required: true + schema: + type: string + title: Batch Id + responses: + '200': + description: The batch object. + content: + application/json: + schema: + $ref: '#/components/schemas/Batch' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/batches/{batch_id}/cancel: + post: + tags: + - V1 + summary: Cancel Batch + description: Typed endpoint for proper schema generation. + operationId: cancel_batch_v1_batches__batch_id__cancel_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/SupervisedFineTuneRequest' + $ref: '#/components/schemas/_batches_batch_id_cancel_Request' required: true - deprecated: false -jsonSchemaDialect: >- - https://json-schema.org/draft/2020-12/schema + responses: + '200': + description: The updated batch object. + content: + application/json: + schema: + $ref: '#/components/schemas/Batch' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: batch_id + in: path + required: true + schema: + type: string + description: 'Path parameter: batch_id' + /v1/chat/completions: + get: + tags: + - V1 + summary: List Chat Completions + description: Query endpoint for proper schema generation. + operationId: list_chat_completions_v1_chat_completions_get + parameters: + - name: after + in: query + required: true + schema: + type: string + title: After + - name: model + in: query + required: true + schema: + type: string + title: Model + - name: limit + in: query + required: false + schema: + type: integer + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + $ref: '#/components/schemas/Order' + default: desc + responses: + '200': + description: A ListOpenAIChatCompletionResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListOpenAIChatCompletionResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Openai Chat Completion + description: Typed endpoint for proper schema generation. + operationId: openai_chat_completion_v1_chat_completions_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIChatCompletionRequestWithExtraBody' + responses: + '200': + description: An OpenAIChatCompletion. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIChatCompletion' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/chat/completions/{completion_id}: + get: + tags: + - V1 + summary: Get Chat Completion + description: Query endpoint for proper schema generation. + operationId: get_chat_completion_v1_chat_completions__completion_id__get + parameters: + - name: completion_id + in: path + required: true + schema: + type: string + title: Completion Id + responses: + '200': + description: A OpenAICompletionWithInputMessages. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/completions: + post: + tags: + - V1 + summary: Openai Completion + description: Typed endpoint for proper schema generation. + operationId: openai_completion_v1_completions_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAICompletionRequestWithExtraBody' + required: true + responses: + '200': + description: An OpenAICompletion. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAICompletion' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/conversations: + post: + tags: + - V1 + summary: Create Conversation + description: Typed endpoint for proper schema generation. + operationId: create_conversation_v1_conversations_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_conversations_Request' + required: true + responses: + '200': + description: The created conversation object. + content: + application/json: + schema: + $ref: '#/components/schemas/Conversation' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/conversations/{conversation_id}: + delete: + tags: + - V1 + summary: Openai Delete Conversation + description: Query endpoint for proper schema generation. + operationId: openai_delete_conversation_v1_conversations__conversation_id__delete + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + title: Conversation Id + responses: + '200': + description: The deleted conversation resource. + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationDeletedResource' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Get Conversation + description: Query endpoint for proper schema generation. + operationId: get_conversation_v1_conversations__conversation_id__get + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + title: Conversation Id + responses: + '200': + description: The conversation object. + content: + application/json: + schema: + $ref: '#/components/schemas/Conversation' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Update Conversation + description: Typed endpoint for proper schema generation. + operationId: update_conversation_v1_conversations__conversation_id__post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_conversations_conversation_id_Request' + responses: + '200': + description: The updated conversation object. + content: + application/json: + schema: + $ref: '#/components/schemas/Conversation' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + /v1/conversations/{conversation_id}/items: + get: + tags: + - V1 + summary: List Items + description: Query endpoint for proper schema generation. + operationId: list_items_v1_conversations__conversation_id__items_get + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + title: Conversation Id + - name: after + in: query + required: true + schema: + type: string + title: After + - name: include + in: query + required: true + schema: + $ref: '#/components/schemas/ConversationItemInclude' + - name: limit + in: query + required: true + schema: + type: integer + title: Limit + - name: order + in: query + required: true + schema: + type: string + title: Order + responses: + '200': + description: List of conversation items. + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationItemList' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Add Items + description: Typed endpoint for proper schema generation. + operationId: add_items_v1_conversations__conversation_id__items_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_conversations_conversation_id_items_Request' + responses: + '200': + description: List of created items. + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationItemList' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + /v1/conversations/{conversation_id}/items/{item_id}: + delete: + tags: + - V1 + summary: Openai Delete Conversation Item + description: Query endpoint for proper schema generation. + operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + title: Conversation Id + - name: item_id + in: path + required: true + schema: + type: string + title: Item Id + responses: + '200': + description: The deleted item resource. + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationItemDeletedResource' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Retrieve + description: Query endpoint for proper schema generation. + operationId: retrieve_v1_conversations__conversation_id__items__item_id__get + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + title: Conversation Id + - name: item_id + in: path + required: true + schema: + type: string + title: Item Id + responses: + '200': + description: The conversation item. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIResponseMessage' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/embeddings: + post: + tags: + - V1 + summary: Openai Embeddings + description: Typed endpoint for proper schema generation. + operationId: openai_embeddings_v1_embeddings_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIEmbeddingsRequestWithExtraBody' + required: true + responses: + '200': + description: An OpenAIEmbeddingsResponse containing the embeddings. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIEmbeddingsResponse' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/files: + get: + tags: + - V1 + summary: Openai List Files + description: Query endpoint for proper schema generation. + operationId: openai_list_files_v1_files_get + parameters: + - name: after + in: query + required: true + schema: + type: string + title: After + - name: purpose + in: query + required: true + schema: + $ref: '#/components/schemas/OpenAIFilePurpose' + - name: limit + in: query + required: false + schema: + type: integer + default: 10000 + title: Limit + - name: order + in: query + required: false + schema: + $ref: '#/components/schemas/Order' + default: desc + responses: + '200': + description: An ListOpenAIFileResponse containing the list of files. + content: + application/json: + schema: + $ref: '#/components/schemas/ListOpenAIFileResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Openai Upload File + description: Response-only endpoint for proper schema generation. + operationId: openai_upload_file_v1_files_post + responses: + '200': + description: An OpenAIFileObject representing the uploaded file. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIFileObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/files/{file_id}: + delete: + tags: + - V1 + summary: Openai Delete File + description: Query endpoint for proper schema generation. + operationId: openai_delete_file_v1_files__file_id__delete + parameters: + - name: file_id + in: path + required: true + schema: + type: string + title: File Id + responses: + '200': + description: An OpenAIFileDeleteResponse indicating successful deletion. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIFileDeleteResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Openai Retrieve File + description: Query endpoint for proper schema generation. + operationId: openai_retrieve_file_v1_files__file_id__get + parameters: + - name: file_id + in: path + required: true + schema: + type: string + title: File Id + responses: + '200': + description: An OpenAIFileObject containing file information. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIFileObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/files/{file_id}/content: + get: + tags: + - V1 + summary: Openai Retrieve File Content + description: Generic endpoint - this would be replaced with actual implementation. + operationId: openai_retrieve_file_content_v1_files__file_id__content_get + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' + responses: + '200': + description: The raw file content as a binary response. + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/health: + get: + tags: + - V1 + summary: Health + description: Response-only endpoint for proper schema generation. + operationId: health_v1_health_get + responses: + '200': + description: Health information indicating if the service is operational. + content: + application/json: + schema: + $ref: '#/components/schemas/HealthInfo' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/inspect/routes: + get: + tags: + - V1 + summary: List Routes + description: Response-only endpoint for proper schema generation. + operationId: list_routes_v1_inspect_routes_get + responses: + '200': + description: Response containing information about all available routes. + content: + application/json: + schema: + $ref: '#/components/schemas/ListRoutesResponse' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/models: + get: + tags: + - V1 + summary: List Models + description: Response-only endpoint for proper schema generation. + operationId: list_models_v1_models_get + responses: + '200': + description: A ListModelsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListModelsResponse' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + post: + tags: + - V1 + summary: Register Model + description: Typed endpoint for proper schema generation. + operationId: register_model_v1_models_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_models_Request' + required: true + responses: + '200': + description: A Model. + content: + application/json: + schema: + $ref: '#/components/schemas/Model' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/models/{model_id}: + delete: + tags: + - V1 + summary: Unregister Model + description: Generic endpoint - this would be replaced with actual implementation. + operationId: unregister_model_v1_models__model_id__delete + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: model_id + in: path + required: true + schema: + type: string + description: 'Path parameter: model_id' + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Get Model + description: Query endpoint for proper schema generation. + operationId: get_model_v1_models__model_id__get + parameters: + - name: model_id + in: path + required: true + schema: + type: string + title: Model Id + responses: + '200': + description: A Model. + content: + application/json: + schema: + $ref: '#/components/schemas/Model' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/moderations: + post: + tags: + - V1 + summary: Run Moderation + description: Typed endpoint for proper schema generation. + operationId: run_moderation_v1_moderations_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_moderations_Request' + required: true + responses: + '200': + description: A moderation object. + content: + application/json: + schema: + $ref: '#/components/schemas/ModerationObject' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/prompts: + get: + tags: + - V1 + summary: List Prompts + description: Response-only endpoint for proper schema generation. + operationId: list_prompts_v1_prompts_get + responses: + '200': + description: A ListPromptsResponse containing all prompts. + content: + application/json: + schema: + $ref: '#/components/schemas/ListPromptsResponse' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + post: + tags: + - V1 + summary: Create Prompt + description: Typed endpoint for proper schema generation. + operationId: create_prompt_v1_prompts_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_prompts_Request' + required: true + responses: + '200': + description: The created Prompt resource. + content: + application/json: + schema: + $ref: '#/components/schemas/Prompt' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/prompts/{prompt_id}: + delete: + tags: + - V1 + summary: Delete Prompt + description: Generic endpoint - this would be replaced with actual implementation. + operationId: delete_prompt_v1_prompts__prompt_id__delete + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - &id001 + name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Get Prompt + description: Query endpoint for proper schema generation. + operationId: get_prompt_v1_prompts__prompt_id__get + parameters: + - name: prompt_id + in: path + required: true + schema: + type: string + title: Prompt Id + - name: version + in: query + required: true + schema: + type: integer + title: Version + responses: + '200': + description: A Prompt resource. + content: + application/json: + schema: + $ref: '#/components/schemas/Prompt' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Update Prompt + description: Typed endpoint for proper schema generation. + operationId: update_prompt_v1_prompts__prompt_id__post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_prompts_prompt_id_Request' + responses: + '200': + description: The updated Prompt resource with incremented version. + content: + application/json: + schema: + $ref: '#/components/schemas/Prompt' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + parameters: + - *id001 + /v1/prompts/{prompt_id}/set-default-version: + post: + tags: + - V1 + summary: Set Default Version + description: Typed endpoint for proper schema generation. + operationId: set_default_version_v1_prompts__prompt_id__set_default_version_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_prompts_prompt_id_set_default_version_Request' + required: true + responses: + '200': + description: The prompt with the specified version now set as default. + content: + application/json: + schema: + $ref: '#/components/schemas/Prompt' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' + /v1/prompts/{prompt_id}/versions: + get: + tags: + - V1 + summary: List Prompt Versions + description: Query endpoint for proper schema generation. + operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get + parameters: + - name: prompt_id + in: path + required: true + schema: + type: string + title: Prompt Id + responses: + '200': + description: A ListPromptsResponse containing all versions of the prompt. + content: + application/json: + schema: + $ref: '#/components/schemas/ListPromptsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/providers: + get: + tags: + - V1 + summary: List Providers + description: Response-only endpoint for proper schema generation. + operationId: list_providers_v1_providers_get + responses: + '200': + description: A ListProvidersResponse containing information about all providers. + content: + application/json: + schema: + $ref: '#/components/schemas/ListProvidersResponse' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/providers/{provider_id}: + get: + tags: + - V1 + summary: Inspect Provider + description: Query endpoint for proper schema generation. + operationId: inspect_provider_v1_providers__provider_id__get + parameters: + - name: provider_id + in: path + required: true + schema: + type: string + title: Provider Id + responses: + '200': + description: A ProviderInfo object containing the provider's details. + content: + application/json: + schema: + $ref: '#/components/schemas/ProviderInfo' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/responses: + get: + tags: + - V1 + summary: List Openai Responses + description: Query endpoint for proper schema generation. + operationId: list_openai_responses_v1_responses_get + parameters: + - name: after + in: query + required: true + schema: + type: string + title: After + - name: model + in: query + required: true + schema: + type: string + title: Model + - name: limit + in: query + required: false + schema: + type: integer + default: 50 + title: Limit + - name: order + in: query + required: false + schema: + $ref: '#/components/schemas/Order' + default: desc + responses: + '200': + description: A ListOpenAIResponseObject. + content: + application/json: + schema: + $ref: '#/components/schemas/ListOpenAIResponseObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Create Openai Response + description: Typed endpoint for proper schema generation. + operationId: create_openai_response_v1_responses_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_responses_Request' + responses: + '200': + description: An OpenAIResponseObject. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIResponseObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/responses/{response_id}: + delete: + tags: + - V1 + summary: Delete Openai Response + description: Query endpoint for proper schema generation. + operationId: delete_openai_response_v1_responses__response_id__delete + parameters: + - name: response_id + in: path + required: true + schema: + type: string + title: Response Id + responses: + '200': + description: An OpenAIDeleteResponseObject + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIDeleteResponseObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Get Openai Response + description: Query endpoint for proper schema generation. + operationId: get_openai_response_v1_responses__response_id__get + parameters: + - name: response_id + in: path + required: true + schema: + type: string + title: Response Id + responses: + '200': + description: An OpenAIResponseObject. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIResponseObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/responses/{response_id}/input_items: + get: + tags: + - V1 + summary: List Openai Response Input Items + description: Query endpoint for proper schema generation. + operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get + parameters: + - name: response_id + in: path + required: true + schema: + type: string + title: Response Id + - name: after + in: query + required: true + schema: + type: string + title: After + - name: before + in: query + required: true + schema: + type: string + title: Before + - name: include + in: query + required: true + schema: + type: string + title: Include + - name: limit + in: query + required: false + schema: + type: integer + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + $ref: '#/components/schemas/Order' + default: desc + responses: + '200': + description: An ListOpenAIResponseInputItem. + content: + application/json: + schema: + $ref: '#/components/schemas/ListOpenAIResponseInputItem' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/safety/run-shield: + post: + tags: + - V1 + summary: Run Shield + description: Typed endpoint for proper schema generation. + operationId: run_shield_v1_safety_run_shield_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_safety_run_shield_Request' + required: true + responses: + '200': + description: A RunShieldResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/RunShieldResponse' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/scoring-functions: + get: + tags: + - V1 + summary: List Scoring Functions + description: Response-only endpoint for proper schema generation. + operationId: list_scoring_functions_v1_scoring_functions_get + responses: + '200': + description: A ListScoringFunctionsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListScoringFunctionsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Register Scoring Function + description: Generic endpoint - this would be replaced with actual implementation. + operationId: register_scoring_function_v1_scoring_functions_post + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/scoring-functions/{scoring_fn_id}: + delete: + tags: + - V1 + summary: Unregister Scoring Function + description: Generic endpoint - this would be replaced with actual implementation. + operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: scoring_fn_id + in: path + required: true + schema: + type: string + description: 'Path parameter: scoring_fn_id' + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Get Scoring Function + description: Query endpoint for proper schema generation. + operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get + parameters: + - name: scoring_fn_id + in: path + required: true + schema: + type: string + title: Scoring Fn Id + responses: + '200': + description: A ScoringFn. + content: + application/json: + schema: + $ref: '#/components/schemas/ScoringFn' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/scoring/score: + post: + tags: + - V1 + summary: Score + description: Typed endpoint for proper schema generation. + operationId: score_v1_scoring_score_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_scoring_score_Request' + required: true + responses: + '200': + description: A ScoreResponse object containing rows and aggregated results. + content: + application/json: + schema: + $ref: '#/components/schemas/ScoreResponse' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/scoring/score-batch: + post: + tags: + - V1 + summary: Score Batch + description: Typed endpoint for proper schema generation. + operationId: score_batch_v1_scoring_score_batch_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_scoring_score_batch_Request' + required: true + responses: + '200': + description: A ScoreBatchResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ScoreBatchResponse' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/shields: + get: + tags: + - V1 + summary: List Shields + description: Response-only endpoint for proper schema generation. + operationId: list_shields_v1_shields_get + responses: + '200': + description: A ListShieldsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListShieldsResponse' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + post: + tags: + - V1 + summary: Register Shield + description: Typed endpoint for proper schema generation. + operationId: register_shield_v1_shields_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_shields_Request' + required: true + responses: + '200': + description: A Shield. + content: + application/json: + schema: + $ref: '#/components/schemas/Shield' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/shields/{identifier}: + delete: + tags: + - V1 + summary: Unregister Shield + description: Generic endpoint - this would be replaced with actual implementation. + operationId: unregister_shield_v1_shields__identifier__delete + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: identifier + in: path + required: true + schema: + type: string + description: 'Path parameter: identifier' + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Get Shield + description: Query endpoint for proper schema generation. + operationId: get_shield_v1_shields__identifier__get + parameters: + - name: identifier + in: path + required: true + schema: + type: string + title: Identifier + responses: + '200': + description: A Shield. + content: + application/json: + schema: + $ref: '#/components/schemas/Shield' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/tool-runtime/invoke: + post: + tags: + - V1 + summary: Invoke Tool + description: Typed endpoint for proper schema generation. + operationId: invoke_tool_v1_tool_runtime_invoke_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_tool_runtime_invoke_Request' + required: true + responses: + '200': + description: A ToolInvocationResult. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolInvocationResult' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/tool-runtime/list-tools: + get: + tags: + - V1 + summary: List Runtime Tools + description: Query endpoint for proper schema generation. + operationId: list_runtime_tools_v1_tool_runtime_list_tools_get + parameters: + - name: tool_group_id + in: query + required: true + schema: + type: string + title: Tool Group Id + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/URL' + responses: + '200': + description: A ListToolDefsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListToolDefsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/tool-runtime/rag-tool/insert: + post: + tags: + - V1 + summary: Rag Tool.Insert + description: Generic endpoint - this would be replaced with actual implementation. + operationId: rag_tool_insert_v1_tool_runtime_rag_tool_insert_post + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/tool-runtime/rag-tool/query: + post: + tags: + - V1 + summary: Rag Tool.Query + description: Typed endpoint for proper schema generation. + operationId: rag_tool_query_v1_tool_runtime_rag_tool_query_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_tool_runtime_rag_tool_query_Request' + required: true + responses: + '200': + description: RAGQueryResult containing the retrieved content and metadata + content: + application/json: + schema: + $ref: '#/components/schemas/RAGQueryResult' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/toolgroups: + get: + tags: + - V1 + summary: List Tool Groups + description: Response-only endpoint for proper schema generation. + operationId: list_tool_groups_v1_toolgroups_get + responses: + '200': + description: A ListToolGroupsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListToolGroupsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Register Tool Group + description: Generic endpoint - this would be replaced with actual implementation. + operationId: register_tool_group_v1_toolgroups_post + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/toolgroups/{toolgroup_id}: + delete: + tags: + - V1 + summary: Unregister Toolgroup + description: Generic endpoint - this would be replaced with actual implementation. + operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: toolgroup_id + in: path + required: true + schema: + type: string + description: 'Path parameter: toolgroup_id' + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Get Tool Group + description: Query endpoint for proper schema generation. + operationId: get_tool_group_v1_toolgroups__toolgroup_id__get + parameters: + - name: toolgroup_id + in: path + required: true + schema: + type: string + title: Toolgroup Id + responses: + '200': + description: A ToolGroup. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolGroup' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/tools: + get: + tags: + - V1 + summary: List Tools + description: Query endpoint for proper schema generation. + operationId: list_tools_v1_tools_get + parameters: + - name: toolgroup_id + in: query + required: true + schema: + type: string + title: Toolgroup Id + responses: + '200': + description: A ListToolDefsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListToolDefsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/tools/{tool_name}: + get: + tags: + - V1 + summary: Get Tool + description: Query endpoint for proper schema generation. + operationId: get_tool_v1_tools__tool_name__get + parameters: + - name: tool_name + in: path + required: true + schema: + type: string + title: Tool Name + responses: + '200': + description: A ToolDef. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDef' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/vector-io/insert: + post: + tags: + - V1 + summary: Insert Chunks + description: Generic endpoint - this would be replaced with actual implementation. + operationId: insert_chunks_v1_vector_io_insert_post + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/vector-io/query: + post: + tags: + - V1 + summary: Query Chunks + description: Typed endpoint for proper schema generation. + operationId: query_chunks_v1_vector_io_query_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_vector_io_query_Request' + required: true + responses: + '200': + description: A QueryChunksResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/QueryChunksResponse' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/vector_stores: + get: + tags: + - V1 + summary: Openai List Vector Stores + description: Query endpoint for proper schema generation. + operationId: openai_list_vector_stores_v1_vector_stores_get + parameters: + - name: after + in: query + required: true + schema: + type: string + title: After + - name: before + in: query + required: true + schema: + type: string + title: Before + - name: limit + in: query + required: false + schema: + type: integer + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + type: string + default: desc + title: Order + responses: + '200': + description: A VectorStoreListResponse containing the list of vector stores. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreListResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Openai Create Vector Store + description: Typed endpoint for proper schema generation. + operationId: openai_create_vector_store_v1_vector_stores_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAICreateVectorStoreRequestWithExtraBody' + responses: + '200': + description: A VectorStoreObject representing the created vector store. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/vector_stores/{vector_store_id}: + delete: + tags: + - V1 + summary: Openai Delete Vector Store + description: Query endpoint for proper schema generation. + operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + title: Vector Store Id + responses: + '200': + description: A VectorStoreDeleteResponse indicating the deletion status. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreDeleteResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Openai Retrieve Vector Store + description: Query endpoint for proper schema generation. + operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + title: Vector Store Id + responses: + '200': + description: A VectorStoreObject representing the vector store. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Openai Update Vector Store + description: Typed endpoint for proper schema generation. + operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_vector_stores_vector_store_id_Request' + responses: + '200': + description: A VectorStoreObject representing the updated vector store. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + /v1/vector_stores/{vector_store_id}/file_batches: + post: + tags: + - V1 + summary: Openai Create Vector Store File Batch + description: Typed endpoint for proper schema generation. + operationId: openai_create_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAICreateVectorStoreFileBatchRequestWithExtraBody' + required: true + responses: + '200': + description: A VectorStoreFileBatchObject representing the created file batch. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileBatchObject' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: + get: + tags: + - V1 + summary: Openai Retrieve Vector Store File Batch + description: Query endpoint for proper schema generation. + operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get + parameters: + - name: batch_id + in: path + required: true + schema: + type: string + title: Batch Id + - name: vector_store_id + in: path + required: true + schema: + type: string + title: Vector Store Id + responses: + '200': + description: A VectorStoreFileBatchObject representing the file batch. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileBatchObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: + post: + tags: + - V1 + summary: Openai Cancel Vector Store File Batch + description: Typed endpoint for proper schema generation. + operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_vector_stores_vector_store_id_file_batches_batch_id_cancel_Request' + required: true + responses: + '200': + description: A VectorStoreFileBatchObject representing the cancelled file batch. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileBatchObject' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + - name: batch_id + in: path + required: true + schema: + type: string + description: 'Path parameter: batch_id' + /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files: + get: + tags: + - V1 + summary: Openai List Files In Vector Store File Batch + description: Query endpoint for proper schema generation. + operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get + parameters: + - name: batch_id + in: path + required: true + schema: + type: string + title: Batch Id + - name: vector_store_id + in: path + required: true + schema: + type: string + title: Vector Store Id + - name: after + in: query + required: true + schema: + type: string + title: After + - name: before + in: query + required: true + schema: + type: string + title: Before + - name: filter + in: query + required: true + schema: + type: string + title: Filter + - name: limit + in: query + required: false + schema: + type: integer + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + type: string + default: desc + title: Order + responses: + '200': + description: A VectorStoreFilesListInBatchResponse containing the list of files in the batch. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFilesListInBatchResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/vector_stores/{vector_store_id}/files: + get: + tags: + - V1 + summary: Openai List Files In Vector Store + description: Query endpoint for proper schema generation. + operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + title: Vector Store Id + - name: after + in: query + required: true + schema: + type: string + title: After + - name: before + in: query + required: true + schema: + type: string + title: Before + - name: filter + in: query + required: true + schema: + type: string + title: Filter + - name: limit + in: query + required: false + schema: + type: integer + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + type: string + default: desc + title: Order + responses: + '200': + description: A VectorStoreListFilesResponse containing the list of files. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreListFilesResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Openai Attach File To Vector Store + description: Typed endpoint for proper schema generation. + operationId: openai_attach_file_to_vector_store_v1_vector_stores__vector_store_id__files_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_vector_stores_vector_store_id_files_Request' + responses: + '200': + description: A VectorStoreFileObject representing the attached file. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + /v1/vector_stores/{vector_store_id}/files/{file_id}: + delete: + tags: + - V1 + summary: Openai Delete Vector Store File + description: Query endpoint for proper schema generation. + operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete + parameters: + - name: file_id + in: path + required: true + schema: + type: string + title: File Id + - name: vector_store_id + in: path + required: true + schema: + type: string + title: Vector Store Id + responses: + '200': + description: A VectorStoreFileDeleteResponse indicating the deletion status. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileDeleteResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Openai Retrieve Vector Store File + description: Query endpoint for proper schema generation. + operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get + parameters: + - name: file_id + in: path + required: true + schema: + type: string + title: File Id + - name: vector_store_id + in: path + required: true + schema: + type: string + title: Vector Store Id + responses: + '200': + description: A VectorStoreFileObject representing the file. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Openai Update Vector Store File + description: Typed endpoint for proper schema generation. + operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_vector_stores_vector_store_id_files_file_id_Request' + responses: + '200': + description: A VectorStoreFileObject representing the updated file. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + - name: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' + /v1/vector_stores/{vector_store_id}/files/{file_id}/content: + get: + tags: + - V1 + summary: Openai Retrieve Vector Store File Contents + description: Query endpoint for proper schema generation. + operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get + parameters: + - name: file_id + in: path + required: true + schema: + type: string + title: File Id + - name: vector_store_id + in: path + required: true + schema: + type: string + title: Vector Store Id + responses: + '200': + description: A list of InterleavedContent representing the file contents. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileContentsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/vector_stores/{vector_store_id}/search: + post: + tags: + - V1 + summary: Openai Search Vector Store + description: Typed endpoint for proper schema generation. + operationId: openai_search_vector_store_v1_vector_stores__vector_store_id__search_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_vector_stores_vector_store_id_search_Request' + required: true + responses: + '200': + description: A VectorStoreSearchResponse containing the search results. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreSearchResponsePage' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + /v1/version: + get: + tags: + - V1 + summary: Version + description: Response-only endpoint for proper schema generation. + operationId: version_v1_version_get + responses: + '200': + description: Version information containing the service version number. + content: + application/json: + schema: + $ref: '#/components/schemas/VersionInfo' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' components: schemas: + AgentCandidate: + properties: + type: + type: string + const: agent + title: Type + default: agent + config: + $ref: '#/components/schemas/AgentConfig' + type: object + required: + - config + title: AgentCandidate + description: "An agent candidate for evaluation.\n\n:param config: The configuration for the agent candidate." + AgentConfig: + properties: + sampling_params: + $ref: '#/components/schemas/SamplingParams' + input_shields: + title: Input Shields + items: + type: string + type: array + output_shields: + title: Output Shields + items: + type: string + type: array + toolgroups: + title: Toolgroups + items: + anyOf: + - type: string + - $ref: '#/components/schemas/AgentToolGroupWithArgs' + type: array + client_tools: + title: Client Tools + items: + $ref: '#/components/schemas/ToolDef' + type: array + tool_choice: + deprecated: true + $ref: '#/components/schemas/ToolChoice' + tool_prompt_format: + deprecated: true + $ref: '#/components/schemas/ToolPromptFormat' + tool_config: + $ref: '#/components/schemas/ToolConfig' + max_infer_iters: + title: Max Infer Iters + default: 10 + type: integer + model: + type: string + title: Model + instructions: + type: string + title: Instructions + name: + title: Name + type: string + enable_session_persistence: + title: Enable Session Persistence + default: false + type: boolean + response_format: + title: Response Format + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + - $ref: '#/components/schemas/GrammarResponseFormat' + discriminator: + propertyName: type + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + type: object + required: + - model + - instructions + title: AgentConfig + description: "Configuration for an agent.\n\n:param model: The model identifier to use for the agent\n:param instructions: The system instructions for the agent\n:param name: Optional name for the agent, used in telemetry and identification\n:param enable_session_persistence: Optional flag indicating whether session data has to be persisted\n:param response_format: Optional response format configuration" + AgentCreateResponse: + properties: + agent_id: + type: string + title: Agent Id + type: object + required: + - agent_id + title: AgentCreateResponse + description: "Response returned when creating a new agent.\n\n:param agent_id: Unique identifier for the created agent" + AgentSessionCreateResponse: + properties: + session_id: + type: string + title: Session Id + type: object + required: + - session_id + title: AgentSessionCreateResponse + description: "Response returned when creating a new agent session.\n\n:param session_id: Unique identifier for the created session" + AgentToolGroupWithArgs: + properties: + name: + type: string + title: Name + args: + additionalProperties: true + type: object + title: Args + type: object + required: + - name + - args + title: AgentToolGroupWithArgs + AgentTurnInputType: + properties: + type: + type: string + const: agent_turn_input + title: Type + default: agent_turn_input + type: object + title: AgentTurnInputType + description: "Parameter type for agent turn input.\n\n:param type: Discriminator type. Always \"agent_turn_input\"" + AggregationFunctionType: + type: string + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + description: "Types of aggregation functions for scoring results.\n:cvar average: Calculate the arithmetic mean of scores\n:cvar weighted_average: Calculate a weighted average of scores\n:cvar median: Calculate the median value of scores\n:cvar categorical_count: Count occurrences of categorical values\n:cvar accuracy: Calculate accuracy as the proportion of correct answers" + AllowedToolsFilter: + properties: + tool_names: + title: Tool Names + items: + type: string + type: array + type: object + title: AllowedToolsFilter + description: "Filter configuration for restricting which MCP tools can be used.\n\n:param tool_names: (Optional) List of specific tool names that are allowed" + ApprovalFilter: + properties: + always: + title: Always + items: + type: string + type: array + never: + title: Never + items: + type: string + type: array + type: object + title: ApprovalFilter + description: "Filter configuration for MCP tool approval requirements.\n\n:param always: (Optional) List of tool names that always require approval\n:param never: (Optional) List of tool names that never require approval" + ArrayType: + properties: + type: + type: string + const: array + title: Type + default: array + type: object + title: ArrayType + description: "Parameter type for array values.\n\n:param type: Discriminator type. Always \"array\"" + Attachment-Output: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + - $ref: '#/components/schemas/URL' + title: Content + mime_type: + type: string + title: Mime Type + type: object + required: + - content + - mime_type + title: Attachment + description: "An attachment to an agent turn.\n\n:param content: The content of the attachment.\n:param mime_type: The MIME type of the attachment." + BasicScoringFnParams: + properties: + type: + type: string + const: basic + title: Type + default: basic + aggregation_functions: + items: + $ref: '#/components/schemas/AggregationFunctionType' + type: array + title: Aggregation Functions + description: Aggregation functions to apply to the scores of each row + type: object + title: BasicScoringFnParams + description: "Parameters for basic scoring function configuration.\n:param type: The type of scoring function parameters, always basic\n:param aggregation_functions: Aggregation functions to apply to the scores of each row" + Batch: + properties: + id: + type: string + title: Id + completion_window: + type: string + title: Completion Window + created_at: + type: integer + title: Created At + endpoint: + type: string + title: Endpoint + input_file_id: + type: string + title: Input File Id + object: + type: string + const: batch + title: Object + status: + type: string + enum: + - validating + - failed + - in_progress + - finalizing + - completed + - expired + - cancelling + - cancelled + title: Status + cancelled_at: + title: Cancelled At + type: integer + cancelling_at: + title: Cancelling At + type: integer + completed_at: + title: Completed At + type: integer + error_file_id: + title: Error File Id + type: string + errors: + $ref: '#/components/schemas/Errors' + expired_at: + title: Expired At + type: integer + expires_at: + title: Expires At + type: integer + failed_at: + title: Failed At + type: integer + finalizing_at: + title: Finalizing At + type: integer + in_progress_at: + title: In Progress At + type: integer + metadata: + title: Metadata + additionalProperties: + type: string + type: object + model: + title: Model + type: string + output_file_id: + title: Output File Id + type: string + request_counts: + $ref: '#/components/schemas/BatchRequestCounts' + usage: + $ref: '#/components/schemas/BatchUsage' + additionalProperties: true + type: object + required: + - id + - completion_window + - created_at + - endpoint + - input_file_id + - object + - status + title: Batch + BatchError: + properties: + code: + title: Code + type: string + line: + title: Line + type: integer + message: + title: Message + type: string + param: + title: Param + type: string + additionalProperties: true + type: object + title: BatchError + BatchRequestCounts: + properties: + completed: + type: integer + title: Completed + failed: + type: integer + title: Failed + total: + type: integer + title: Total + additionalProperties: true + type: object + required: + - completed + - failed + - total + title: BatchRequestCounts + BatchUsage: + properties: + input_tokens: + type: integer + title: Input Tokens + input_tokens_details: + $ref: '#/components/schemas/InputTokensDetails' + output_tokens: + type: integer + title: Output Tokens + output_tokens_details: + $ref: '#/components/schemas/OutputTokensDetails' + total_tokens: + type: integer + title: Total Tokens + additionalProperties: true + type: object + required: + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens + title: BatchUsage + Benchmark: + properties: + identifier: + type: string + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: + title: Provider Resource Id + description: Unique identifier for this resource in the provider + type: string + provider_id: + type: string + title: Provider Id + description: ID of the provider that owns this resource + type: + type: string + const: benchmark + title: Type + default: benchmark + dataset_id: + type: string + title: Dataset Id + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + metadata: + additionalProperties: true + type: object + title: Metadata + description: Metadata for this evaluation task + type: object + required: + - identifier + - provider_id + - dataset_id + - scoring_functions + title: Benchmark + description: "A benchmark resource for evaluating model performance.\n\n:param dataset_id: Identifier of the dataset to use for the benchmark evaluation\n:param scoring_functions: List of scoring function identifiers to apply during evaluation\n:param metadata: Metadata for this evaluation task\n:param type: The resource type, always benchmark" + BenchmarkConfig: + properties: + eval_candidate: + oneOf: + - $ref: '#/components/schemas/ModelCandidate' + - $ref: '#/components/schemas/AgentCandidate' + title: Eval Candidate + discriminator: + propertyName: type + mapping: + agent: '#/components/schemas/AgentCandidate' + model: '#/components/schemas/ModelCandidate' + scoring_params: + additionalProperties: + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + - $ref: '#/components/schemas/RegexParserScoringFnParams' + - $ref: '#/components/schemas/BasicScoringFnParams' + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + type: object + title: Scoring Params + description: Map between scoring function id and parameters for each scoring function you want to run + num_examples: + title: Num Examples + description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated + type: integer + type: object + required: + - eval_candidate + title: BenchmarkConfig + description: "A benchmark configuration for evaluation.\n\n:param eval_candidate: The candidate to evaluate.\n:param scoring_params: Map between scoring function id and parameters for each scoring function you want to run\n:param num_examples: (Optional) The number of examples to evaluate. If not provided, all examples in the dataset will be evaluated" + BooleanType: + properties: + type: + type: string + const: boolean + title: Type + default: boolean + type: object + title: BooleanType + description: "Parameter type for boolean values.\n\n:param type: Discriminator type. Always \"boolean\"" + BuiltinTool: + type: string + enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + title: BuiltinTool + ChatCompletionInputType: + properties: + type: + type: string + const: chat_completion_input + title: Type + default: chat_completion_input + type: object + title: ChatCompletionInputType + description: "Parameter type for chat completion input.\n\n:param type: Discriminator type. Always \"chat_completion_input\"" + Chunk-Output: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + chunk_id: + type: string + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: + title: Embedding + items: + type: number + type: array + chunk_metadata: + $ref: '#/components/schemas/ChunkMetadata' + type: object + required: + - content + - chunk_id + title: Chunk + description: "A chunk of content that can be inserted into a vector database.\n:param content: The content of the chunk, which can be interleaved text, images, or other types.\n:param chunk_id: Unique identifier for the chunk. Must be provided explicitly.\n:param metadata: Metadata associated with the chunk that will be used in the model context during inference.\n:param embedding: Optional embedding for the chunk. If not provided, it will be computed later.\n:param chunk_metadata: Metadata for the chunk that will NOT be used in the context during inference.\n The `chunk_metadata` is required backend functionality." + ChunkMetadata: + properties: + chunk_id: + title: Chunk Id + type: string + document_id: + title: Document Id + type: string + source: + title: Source + type: string + created_timestamp: + title: Created Timestamp + type: integer + updated_timestamp: + title: Updated Timestamp + type: integer + chunk_window: + title: Chunk Window + type: string + chunk_tokenizer: + title: Chunk Tokenizer + type: string + chunk_embedding_model: + title: Chunk Embedding Model + type: string + chunk_embedding_dimension: + title: Chunk Embedding Dimension + type: integer + content_token_count: + title: Content Token Count + type: integer + metadata_token_count: + title: Metadata Token Count + type: integer + type: object + title: ChunkMetadata + description: "`ChunkMetadata` is backend metadata for a `Chunk` that is used to store additional information about the chunk that\n will not be used in the context during inference, but is required for backend functionality. The `ChunkMetadata`\n is set during chunk creation in `MemoryToolRuntimeImpl().insert()`and is not expected to change after.\n Use `Chunk.metadata` for metadata that will be used in the context during inference.\n:param chunk_id: The ID of the chunk. If not set, it will be generated based on the document ID and content.\n:param document_id: The ID of the document this chunk belongs to.\n:param source: The source of the content, such as a URL, file path, or other identifier.\n:param created_timestamp: An optional timestamp indicating when the chunk was created.\n:param updated_timestamp: An optional timestamp indicating when the chunk was last updated.\n:param chunk_window: The window of the chunk, which can be used to group related chunks together.\n:param chunk_tokenizer: The tokenizer used to create the chunk. Default is Tiktoken.\n:param chunk_embedding_model: The embedding model used to create the chunk's embedding.\n:param chunk_embedding_dimension: The dimension of the embedding vector for the chunk.\n:param content_token_count: The number of tokens in the content of the chunk.\n:param metadata_token_count: The number of tokens in the metadata of the chunk." + CompletionInputType: + properties: + type: + type: string + const: completion_input + title: Type + default: completion_input + type: object + title: CompletionInputType + description: "Parameter type for completion input.\n\n:param type: Discriminator type. Always \"completion_input\"" + CompletionMessage-Output: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + stop_reason: + $ref: '#/components/schemas/StopReason' + tool_calls: + title: Tool Calls + items: + $ref: '#/components/schemas/ToolCall' + type: array + type: object + required: + - content + - stop_reason + title: CompletionMessage + description: "A message containing the model's (assistant) response in a chat conversation.\n\n:param role: Must be \"assistant\" to identify this as the model's response\n:param content: The content of the model's response\n:param stop_reason: Reason why the model stopped generating. Options are:\n - `StopReason.end_of_turn`: The model finished generating the entire response.\n - `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response.\n - `StopReason.out_of_tokens`: The model ran out of token budget.\n:param tool_calls: List of tool calls. Each tool call is a ToolCall object." + Conversation: + properties: + id: + type: string + title: Id + description: The unique ID of the conversation. + object: + type: string + const: conversation + title: Object + description: The object type, which is always conversation. + default: conversation + created_at: + type: integer + title: Created At + description: The time at which the conversation was created, measured in seconds since the Unix epoch. + metadata: + title: Metadata + description: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. + additionalProperties: + type: string + type: object + items: + title: Items + description: Initial items to include in the conversation context. You may add up to 20 items at a time. + items: + additionalProperties: true + type: object + type: array + type: object + required: + - id + - created_at + title: Conversation + description: OpenAI-compatible conversation object. + ConversationItemInclude: + type: string + enum: + - web_search_call.action.sources + - code_interpreter_call.outputs + - computer_call_output.output.image_url + - file_search_call.results + - message.input_image.image_url + - message.output_text.logprobs + - reasoning.encrypted_content + title: ConversationItemInclude + description: Specify additional output data to include in the model response. + ConversationItemList: + properties: + object: + type: string + title: Object + description: Object type + default: list + data: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + discriminator: + propertyName: type + mapping: + file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + function_call_output: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + mcp_approval_response: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + message: '#/components/schemas/OpenAIResponseMessage-Output' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + type: array + title: Data + description: List of conversation items + first_id: + title: First Id + description: The ID of the first item in the list + type: string + last_id: + title: Last Id + description: The ID of the last item in the list + type: string + has_more: + type: boolean + title: Has More + description: Whether there are more items available + default: false + type: object + required: + - data + title: ConversationItemList + description: List of conversation items with pagination. + DPOAlignmentConfig: + properties: + beta: + type: number + title: Beta + loss_type: + $ref: '#/components/schemas/DPOLossType' + default: sigmoid + type: object + required: + - beta + title: DPOAlignmentConfig + description: "Configuration for Direct Preference Optimization (DPO) alignment.\n\n:param beta: Temperature parameter for the DPO loss\n:param loss_type: The type of loss function to use for DPO" + DPOLossType: + type: string + enum: + - sigmoid + - hinge + - ipo + - kto_pair + title: DPOLossType + DataConfig: + properties: + dataset_id: + type: string + title: Dataset Id + batch_size: + type: integer + title: Batch Size + shuffle: + type: boolean + title: Shuffle + data_format: + $ref: '#/components/schemas/DatasetFormat' + validation_dataset_id: + title: Validation Dataset Id + type: string + packed: + title: Packed + default: false + type: boolean + train_on_input: + title: Train On Input + default: false + type: boolean + type: object + required: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + description: "Configuration for training data and data loading.\n\n:param dataset_id: Unique identifier for the training dataset\n:param batch_size: Number of samples per training batch\n:param shuffle: Whether to shuffle the dataset during training\n:param data_format: Format of the dataset (instruct or dialog)\n:param validation_dataset_id: (Optional) Unique identifier for the validation dataset\n:param packed: (Optional) Whether to pack multiple samples into a single sequence for efficiency\n:param train_on_input: (Optional) Whether to compute loss on input tokens as well as output tokens" + Dataset: + properties: + identifier: + type: string + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: + title: Provider Resource Id + description: Unique identifier for this resource in the provider + type: string + provider_id: + type: string + title: Provider Id + description: ID of the provider that owns this resource + type: + type: string + const: dataset + title: Type + default: dataset + purpose: + $ref: '#/components/schemas/DatasetPurpose' + source: + oneOf: + - $ref: '#/components/schemas/URIDataSource' + - $ref: '#/components/schemas/RowsDataSource' + title: Source + discriminator: + propertyName: type + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + metadata: + additionalProperties: true + type: object + title: Metadata + description: Any additional metadata for this dataset + type: object + required: + - identifier + - provider_id + - purpose + - source + title: Dataset + description: "Dataset resource for storing and accessing training or evaluation data.\n\n:param type: Type of resource, always 'dataset' for datasets" + DatasetFormat: + type: string + enum: + - instruct + - dialog + title: DatasetFormat + description: "Format of the training dataset.\n:cvar instruct: Instruction-following format with prompt and completion\n:cvar dialog: Multi-turn conversation format with messages" + DatasetPurpose: + type: string + enum: + - post-training/messages + - eval/question-answer + - eval/messages-answer + title: DatasetPurpose + description: "Purpose of the dataset. Each purpose has a required input data schema.\n\n:cvar post-training/messages: The dataset contains messages used for post-training.\n {\n \"messages\": [\n {\"role\": \"user\", \"content\": \"Hello, world!\"},\n {\"role\": \"assistant\", \"content\": \"Hello, world!\"},\n ]\n }\n:cvar eval/question-answer: The dataset contains a question column and an answer column.\n {\n \"question\": \"What is the capital of France?\",\n \"answer\": \"Paris\"\n }\n:cvar eval/messages-answer: The dataset contains a messages column with list of messages and an answer column.\n {\n \"messages\": [\n {\"role\": \"user\", \"content\": \"Hello, my name is John Doe.\"},\n {\"role\": \"assistant\", \"content\": \"Hello, John Doe. How can I help you today?\"},\n {\"role\": \"user\", \"content\": \"What's my name?\"},\n ],\n \"answer\": \"John Doe\"\n }" + DefaultRAGQueryGeneratorConfig: + properties: + type: + type: string + const: default + title: Type + default: default + separator: + type: string + title: Separator + default: ' ' + type: object + title: DefaultRAGQueryGeneratorConfig + description: "Configuration for the default RAG query generator.\n\n:param type: Type of query generator, always 'default'\n:param separator: String separator used to join query terms" + Document: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + type: array + - $ref: '#/components/schemas/URL' + title: Content + mime_type: + type: string + title: Mime Type + type: object + required: + - content + - mime_type + title: Document + description: "A document to be used by an agent.\n\n:param content: The content of the document.\n:param mime_type: The MIME type of the document." + EfficiencyConfig: + properties: + enable_activation_checkpointing: + title: Enable Activation Checkpointing + default: false + type: boolean + enable_activation_offloading: + title: Enable Activation Offloading + default: false + type: boolean + memory_efficient_fsdp_wrap: + title: Memory Efficient Fsdp Wrap + default: false + type: boolean + fsdp_cpu_offload: + title: Fsdp Cpu Offload + default: false + type: boolean + type: object + title: EfficiencyConfig + description: "Configuration for memory and compute efficiency optimizations.\n\n:param enable_activation_checkpointing: (Optional) Whether to use activation checkpointing to reduce memory usage\n:param enable_activation_offloading: (Optional) Whether to offload activations to CPU to save GPU memory\n:param memory_efficient_fsdp_wrap: (Optional) Whether to use memory-efficient FSDP wrapping\n:param fsdp_cpu_offload: (Optional) Whether to offload FSDP parameters to CPU" + Errors: + properties: + data: + title: Data + items: + $ref: '#/components/schemas/BatchError' + type: array + object: + title: Object + type: string + additionalProperties: true + type: object + title: Errors + EvaluateResponse: + properties: + generations: + items: + additionalProperties: true + type: object + type: array + title: Generations + scores: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Scores + type: object + required: + - generations + - scores + title: EvaluateResponse + description: "The response from an evaluation.\n\n:param generations: The generations from the evaluation.\n:param scores: The scores from the evaluation." + GrammarResponseFormat: + properties: + type: + type: string + const: grammar + title: Type + default: grammar + bnf: + additionalProperties: true + type: object + title: Bnf + type: object + required: + - bnf + title: GrammarResponseFormat + description: "Configuration for grammar-guided response generation.\n\n:param type: Must be \"grammar\" to identify this format type\n:param bnf: The BNF grammar specification the response should conform to" + GreedySamplingStrategy: + properties: + type: + type: string + const: greedy + title: Type + default: greedy + type: object + title: GreedySamplingStrategy + description: "Greedy sampling strategy that selects the highest probability token at each step.\n\n:param type: Must be \"greedy\" to identify this sampling strategy" + HealthInfo: + properties: + status: + $ref: '#/components/schemas/HealthStatus' + type: object + required: + - status + title: HealthInfo + description: "Health status information for the service.\n\n:param status: Current health status of the service" + HealthStatus: + type: string + enum: + - OK + - Error + - Not Implemented + title: HealthStatus + ImageContentItem-Input: + properties: + type: + type: string + const: image + title: Type + default: image + image: + $ref: '#/components/schemas/_URLOrData' + type: object + required: + - image + title: ImageContentItem + description: "A image content item\n\n:param type: Discriminator type of the content item. Always \"image\"\n:param image: Image as a base64 encoded string or an URL" + ImageContentItem-Output: + properties: + type: + type: string + const: image + title: Type + default: image + image: + $ref: '#/components/schemas/_URLOrData' + type: object + required: + - image + title: ImageContentItem + description: "A image content item\n\n:param type: Discriminator type of the content item. Always \"image\"\n:param image: Image as a base64 encoded string or an URL" + InferenceStep-Output: + properties: + turn_id: + type: string + title: Turn Id + step_id: + type: string + title: Step Id + started_at: + title: Started At + type: string + format: date-time + completed_at: + title: Completed At + type: string + format: date-time + step_type: + type: string + const: inference + title: Step Type + default: inference + model_response: + $ref: '#/components/schemas/CompletionMessage-Output' + type: object + required: + - turn_id + - step_id + - model_response + title: InferenceStep + description: "An inference step in an agent turn.\n\n:param model_response: The response from the LLM." + InputTokensDetails: + properties: + cached_tokens: + type: integer + title: Cached Tokens + additionalProperties: true + type: object + required: + - cached_tokens + title: InputTokensDetails + Job: + properties: + job_id: + type: string + title: Job Id + status: + $ref: '#/components/schemas/JobStatus' + type: object + required: + - job_id + - status + title: Job + description: "A job execution instance with status tracking.\n\n:param job_id: Unique identifier for the job\n:param status: Current execution status of the job" + JobStatus: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + description: "Status of a job execution.\n:cvar completed: Job has finished successfully\n:cvar in_progress: Job is currently running\n:cvar failed: Job has failed during execution\n:cvar scheduled: Job is scheduled but not yet started\n:cvar cancelled: Job was cancelled before completion" + JsonSchemaResponseFormat: + properties: + type: + type: string + const: json_schema + title: Type + default: json_schema + json_schema: + additionalProperties: true + type: object + title: Json Schema + type: object + required: + - json_schema + title: JsonSchemaResponseFormat + description: "Configuration for JSON schema-guided response generation.\n\n:param type: Must be \"json_schema\" to identify this format type\n:param json_schema: The JSON schema the response should conform to. In a Python SDK, this is often a `pydantic` model." + JsonType: + properties: + type: + type: string + const: json + title: Type + default: json + type: object + title: JsonType + description: "Parameter type for JSON values.\n\n:param type: Discriminator type. Always \"json\"" + LLMAsJudgeScoringFnParams: + properties: + type: + type: string + const: llm_as_judge + title: Type + default: llm_as_judge + judge_model: + type: string + title: Judge Model + prompt_template: + title: Prompt Template + type: string + judge_score_regexes: + items: + type: string + type: array + title: Judge Score Regexes + description: Regexes to extract the answer from generated response + aggregation_functions: + items: + $ref: '#/components/schemas/AggregationFunctionType' + type: array + title: Aggregation Functions + description: Aggregation functions to apply to the scores of each row + type: object + required: + - judge_model + title: LLMAsJudgeScoringFnParams + description: "Parameters for LLM-as-judge scoring function configuration.\n:param type: The type of scoring function parameters, always llm_as_judge\n:param judge_model: Identifier of the LLM model to use as a judge for scoring\n:param prompt_template: (Optional) Custom prompt template for the judge model\n:param judge_score_regexes: Regexes to extract the answer from generated response\n:param aggregation_functions: Aggregation functions to apply to the scores of each row" + LLMRAGQueryGeneratorConfig: + properties: + type: + type: string + const: llm + title: Type + default: llm + model: + type: string + title: Model + template: + type: string + title: Template + type: object + required: + - model + - template + title: LLMRAGQueryGeneratorConfig + description: "Configuration for the LLM-based RAG query generator.\n\n:param type: Type of query generator, always 'llm'\n:param model: Name of the language model to use for query generation\n:param template: Template string for formatting the query generation prompt" + ListBenchmarksResponse: + properties: + data: + items: + $ref: '#/components/schemas/Benchmark' + type: array + title: Data + type: object + required: + - data + title: ListBenchmarksResponse + ListDatasetsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Dataset' + type: array + title: Data + type: object + required: + - data + title: ListDatasetsResponse + description: "Response from listing datasets.\n\n:param data: List of datasets" + ListModelsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Model' + type: array + title: Data + type: object + required: + - data + title: ListModelsResponse + ListPostTrainingJobsResponse: + properties: + data: + items: + $ref: '#/components/schemas/PostTrainingJob' + type: array + title: Data + type: object + required: + - data + title: ListPostTrainingJobsResponse + ListPromptsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Prompt' + type: array + title: Data + type: object + required: + - data + title: ListPromptsResponse + description: Response model to list prompts. + ListProvidersResponse: + properties: + data: + items: + $ref: '#/components/schemas/ProviderInfo' + type: array + title: Data + type: object + required: + - data + title: ListProvidersResponse + description: "Response containing a list of all available providers.\n\n:param data: List of provider information objects" + ListRoutesResponse: + properties: + data: + items: + $ref: '#/components/schemas/RouteInfo' + type: array + title: Data + type: object + required: + - data + title: ListRoutesResponse + description: "Response containing a list of all available API routes.\n\n:param data: List of available route information objects" + ListScoringFunctionsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ScoringFn-Output' + type: array + title: Data + type: object + required: + - data + title: ListScoringFunctionsResponse + ListShieldsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Shield' + type: array + title: Data + type: object + required: + - data + title: ListShieldsResponse + ListToolGroupsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ToolGroup' + type: array + title: Data + type: object + required: + - data + title: ListToolGroupsResponse + description: "Response containing a list of tool groups.\n\n:param data: List of tool groups" + MCPListToolsTool: + properties: + input_schema: + additionalProperties: true + type: object + title: Input Schema + name: + type: string + title: Name + description: + title: Description + type: string + type: object + required: + - input_schema + - name + title: MCPListToolsTool + description: "Tool definition returned by MCP list tools operation.\n\n:param input_schema: JSON schema defining the tool's input parameters\n:param name: Name of the tool\n:param description: (Optional) Description of what the tool does" + MemoryRetrievalStep-Output: + properties: + turn_id: + type: string + title: Turn Id + step_id: + type: string + title: Step Id + started_at: + title: Started At + type: string + format: date-time + completed_at: + title: Completed At + type: string + format: date-time + step_type: + type: string + const: memory_retrieval + title: Step Type + default: memory_retrieval + vector_store_ids: + type: string + title: Vector Store Ids + inserted_context: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Inserted Context + type: object + required: + - turn_id + - step_id + - vector_store_ids + - inserted_context + title: MemoryRetrievalStep + description: "A memory retrieval step in an agent turn.\n\n:param vector_store_ids: The IDs of the vector databases to retrieve context from.\n:param inserted_context: The context retrieved from the vector databases." + Model: + properties: + identifier: + type: string + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: + title: Provider Resource Id + description: Unique identifier for this resource in the provider + type: string + provider_id: + type: string + title: Provider Id + description: ID of the provider that owns this resource + type: + type: string + const: model + title: Type + default: model + metadata: + additionalProperties: true + type: object + title: Metadata + description: Any additional metadata for this model + model_type: + $ref: '#/components/schemas/ModelType' + default: llm + type: object + required: + - identifier + - provider_id + title: Model + description: "A model resource representing an AI model registered in Llama Stack.\n\n:param type: The resource type, always 'model' for model resources\n:param model_type: The type of model (LLM or embedding model)\n:param metadata: Any additional metadata for this model\n:param identifier: Unique identifier for this resource in llama stack\n:param provider_resource_id: Unique identifier for this resource in the provider\n:param provider_id: ID of the provider that owns this resource" + ModelCandidate: + properties: + type: + type: string + const: model + title: Type + default: model + model: + type: string + title: Model + sampling_params: + $ref: '#/components/schemas/SamplingParams' + system_message: + $ref: '#/components/schemas/SystemMessage' + type: object + required: + - model + - sampling_params + title: ModelCandidate + description: "A model candidate for evaluation.\n\n:param model: The model ID to evaluate.\n:param sampling_params: The sampling parameters for the model.\n:param system_message: (Optional) The system message providing instructions or context to the model." + ModelType: + type: string + enum: + - llm + - embedding + - rerank + title: ModelType + description: "Enumeration of supported model types in Llama Stack.\n:cvar llm: Large language model for text generation and completion\n:cvar embedding: Embedding model for converting text to vector representations\n:cvar rerank: Reranking model for reordering documents based on their relevance to a query" + ModerationObject: + properties: + id: + type: string + title: Id + model: + type: string + title: Model + results: + items: + $ref: '#/components/schemas/ModerationObjectResults' + type: array + title: Results + type: object + required: + - id + - model + - results + title: ModerationObject + description: "A moderation object.\n:param id: The unique identifier for the moderation request.\n:param model: The model used to generate the moderation results.\n:param results: A list of moderation objects" + ModerationObjectResults: + properties: + flagged: + type: boolean + title: Flagged + categories: + title: Categories + additionalProperties: + type: boolean + type: object + category_applied_input_types: + title: Category Applied Input Types + additionalProperties: + items: + type: string + type: array + type: object + category_scores: + title: Category Scores + additionalProperties: + type: number + type: object + user_message: + title: User Message + type: string + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - flagged + title: ModerationObjectResults + description: "A moderation object.\n:param flagged: Whether any of the below categories are flagged.\n:param categories: A list of the categories, and whether they are flagged or not.\n:param category_applied_input_types: A list of the categories along with the input type(s) that the score applies to.\n:param category_scores: A list of the categories along with their scores as predicted by model." + NumberType: + properties: + type: + type: string + const: number + title: Type + default: number + type: object + title: NumberType + description: "Parameter type for numeric values.\n\n:param type: Discriminator type. Always \"number\"" + ObjectType: + properties: + type: + type: string + const: object + title: Type + default: object + type: object + title: ObjectType + description: "Parameter type for object values.\n\n:param type: Discriminator type. Always \"object\"" + OpenAIAssistantMessageParam-Input: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: Content + name: + title: Name + type: string + tool_calls: + title: Tool Calls + items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + type: object + title: OpenAIAssistantMessageParam + description: "A message containing the model's (assistant) response in an OpenAI-compatible chat completion request.\n\n:param role: Must be \"assistant\" to identify this as the model's response\n:param content: The content of the model's response\n:param name: (Optional) The name of the assistant message participant.\n:param tool_calls: List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object." + OpenAIAssistantMessageParam-Output: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: Content + name: + title: Name + type: string + tool_calls: + title: Tool Calls + items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + type: object + title: OpenAIAssistantMessageParam + description: "A message containing the model's (assistant) response in an OpenAI-compatible chat completion request.\n\n:param role: Must be \"assistant\" to identify this as the model's response\n:param content: The content of the model's response\n:param name: (Optional) The name of the assistant message participant.\n:param tool_calls: List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object." + OpenAIChatCompletion: + properties: + id: + type: string + title: Id + choices: + items: + $ref: '#/components/schemas/OpenAIChoice-Output' + type: array + title: Choices + object: + type: string + const: chat.completion + title: Object + default: chat.completion + created: + type: integer + title: Created + model: + type: string + title: Model + usage: + $ref: '#/components/schemas/OpenAIChatCompletionUsage' + type: object + required: + - id + - choices + - created + - model + title: OpenAIChatCompletion + description: "Response from an OpenAI-compatible chat completion request.\n\n:param id: The ID of the chat completion\n:param choices: List of choices\n:param object: The object type, which will be \"chat.completion\"\n:param created: The Unix timestamp in seconds when the chat completion was created\n:param model: The model that was used to generate the chat completion\n:param usage: Token usage information for the completion" + OpenAIChatCompletionContentPartImageParam: + properties: + type: + type: string + const: image_url + title: Type + default: image_url + image_url: + $ref: '#/components/schemas/OpenAIImageURL' + type: object + required: + - image_url + title: OpenAIChatCompletionContentPartImageParam + description: "Image content part for OpenAI-compatible chat completion messages.\n\n:param type: Must be \"image_url\" to identify this as image content\n:param image_url: Image URL specification and processing details" + OpenAIChatCompletionContentPartTextParam: + properties: + type: + type: string + const: text + title: Type + default: text + text: + type: string + title: Text + type: object + required: + - text + title: OpenAIChatCompletionContentPartTextParam + description: "Text content part for OpenAI-compatible chat completion messages.\n\n:param type: Must be \"text\" to identify this as text content\n:param text: The text content of the message" + OpenAIChatCompletionRequestWithExtraBody: + properties: + model: + type: string + title: Model + messages: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + discriminator: + propertyName: role + mapping: + assistant: '#/components/schemas/OpenAIAssistantMessageParam-Input' + developer: '#/components/schemas/OpenAIDeveloperMessageParam' + system: '#/components/schemas/OpenAISystemMessageParam' + tool: '#/components/schemas/OpenAIToolMessageParam' + user: '#/components/schemas/OpenAIUserMessageParam-Input' + type: array + minItems: 1 + title: Messages + frequency_penalty: + title: Frequency Penalty + type: number + function_call: + anyOf: + - type: string + - additionalProperties: true + type: object + title: Function Call + functions: + title: Functions + items: + additionalProperties: true + type: object + type: array + logit_bias: + title: Logit Bias + additionalProperties: + type: number + type: object + logprobs: + title: Logprobs + type: boolean + max_completion_tokens: + title: Max Completion Tokens + type: integer + max_tokens: + title: Max Tokens + type: integer + n: + title: N + type: integer + parallel_tool_calls: + title: Parallel Tool Calls + type: boolean + presence_penalty: + title: Presence Penalty + type: number + response_format: + title: Response Format + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + discriminator: + propertyName: type + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + seed: + title: Seed + type: integer + stop: + anyOf: + - type: string + - items: + type: string + type: array + title: Stop + stream: + title: Stream + type: boolean + stream_options: + title: Stream Options + additionalProperties: true + type: object + temperature: + title: Temperature + type: number + tool_choice: + anyOf: + - type: string + - additionalProperties: true + type: object + title: Tool Choice + tools: + title: Tools + items: + additionalProperties: true + type: object + type: array + top_logprobs: + title: Top Logprobs + type: integer + top_p: + title: Top P + type: number + user: + title: User + type: string + additionalProperties: true + type: object + required: + - model + - messages + title: OpenAIChatCompletionRequestWithExtraBody + description: "Request parameters for OpenAI-compatible chat completion endpoint.\n\n:param model: The identifier of the model to use. The model must be registered with Llama Stack and available via the /models endpoint.\n:param messages: List of messages in the conversation.\n:param frequency_penalty: (Optional) The penalty for repeated tokens.\n:param function_call: (Optional) The function call to use.\n:param functions: (Optional) List of functions to use.\n:param logit_bias: (Optional) The logit bias to use.\n:param logprobs: (Optional) The log probabilities to use.\n:param max_completion_tokens: (Optional) The maximum number of tokens to generate.\n:param max_tokens: (Optional) The maximum number of tokens to generate.\n:param n: (Optional) The number of completions to generate.\n:param parallel_tool_calls: (Optional) Whether to parallelize tool calls.\n:param presence_penalty: (Optional) The penalty for repeated tokens.\n:param response_format: (Optional) The response format to use.\n:param seed: (Optional) The seed to use.\n:param stop: (Optional) The stop tokens to use.\n:param stream: (Optional) Whether to stream the response.\n:param stream_options: (Optional) The stream options to use.\n:param temperature: (Optional) The temperature to use.\n:param tool_choice: (Optional) The tool choice to use.\n:param tools: (Optional) The tools to use.\n:param top_logprobs: (Optional) The top log probabilities to use.\n:param top_p: (Optional) The top p to use.\n:param user: (Optional) The user to use." + OpenAIChatCompletionToolCall: + properties: + index: + title: Index + type: integer + id: + title: Id + type: string + type: + type: string + const: function + title: Type + default: function + function: + $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + type: object + title: OpenAIChatCompletionToolCall + description: "Tool call specification for OpenAI-compatible chat completion responses.\n\n:param index: (Optional) Index of the tool call in the list\n:param id: (Optional) Unique identifier for the tool call\n:param type: Must be \"function\" to identify this as a function call\n:param function: (Optional) Function call details" + OpenAIChatCompletionToolCallFunction: + properties: + name: + title: Name + type: string + arguments: + title: Arguments + type: string + type: object + title: OpenAIChatCompletionToolCallFunction + description: "Function call details for OpenAI-compatible tool calls.\n\n:param name: (Optional) Name of the function to call\n:param arguments: (Optional) Arguments to pass to the function as a JSON string" + OpenAIChatCompletionUsage: + properties: + prompt_tokens: + type: integer + title: Prompt Tokens + completion_tokens: + type: integer + title: Completion Tokens + total_tokens: + type: integer + title: Total Tokens + prompt_tokens_details: + $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + completion_tokens_details: + $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + type: object + required: + - prompt_tokens + - completion_tokens + - total_tokens + title: OpenAIChatCompletionUsage + description: "Usage information for OpenAI chat completion.\n\n:param prompt_tokens: Number of tokens in the prompt\n:param completion_tokens: Number of tokens in the completion\n:param total_tokens: Total tokens used (prompt + completion)\n:param input_tokens_details: Detailed breakdown of input token usage\n:param output_tokens_details: Detailed breakdown of output token usage" + OpenAIChatCompletionUsageCompletionTokensDetails: + properties: + reasoning_tokens: + title: Reasoning Tokens + type: integer + type: object + title: OpenAIChatCompletionUsageCompletionTokensDetails + description: "Token details for output tokens in OpenAI chat completion usage.\n\n:param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models)" + OpenAIChatCompletionUsagePromptTokensDetails: + properties: + cached_tokens: + title: Cached Tokens + type: integer + type: object + title: OpenAIChatCompletionUsagePromptTokensDetails + description: "Token details for prompt tokens in OpenAI chat completion usage.\n\n:param cached_tokens: Number of tokens retrieved from cache" + OpenAIChoice-Output: + properties: + message: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: Message + discriminator: + propertyName: role + mapping: + assistant: '#/components/schemas/OpenAIAssistantMessageParam-Output' + developer: '#/components/schemas/OpenAIDeveloperMessageParam' + system: '#/components/schemas/OpenAISystemMessageParam' + tool: '#/components/schemas/OpenAIToolMessageParam' + user: '#/components/schemas/OpenAIUserMessageParam-Output' + finish_reason: + type: string + title: Finish Reason + index: + type: integer + title: Index + logprobs: + $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + type: object + required: + - message + - finish_reason + - index + title: OpenAIChoice + description: "A choice from an OpenAI-compatible chat completion response.\n\n:param message: The message from the model\n:param finish_reason: The reason the model stopped generating\n:param index: The index of the choice\n:param logprobs: (Optional) The log probabilities for the tokens in the message" + OpenAIChoiceLogprobs-Output: + properties: + content: + title: Content + items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + refusal: + title: Refusal + items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + type: object + title: OpenAIChoiceLogprobs + description: "The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response.\n\n:param content: (Optional) The log probabilities for the tokens in the message\n:param refusal: (Optional) The log probabilities for the tokens in the message" + OpenAICompletion: + properties: + id: + type: string + title: Id + choices: + items: + $ref: '#/components/schemas/OpenAICompletionChoice-Output' + type: array + title: Choices + created: + type: integer + title: Created + model: + type: string + title: Model + object: + type: string + const: text_completion + title: Object + default: text_completion + type: object + required: + - id + - choices + - created + - model + title: OpenAICompletion + description: "Response from an OpenAI-compatible completion request.\n\n:id: The ID of the completion\n:choices: List of choices\n:created: The Unix timestamp in seconds when the completion was created\n:model: The model that was used to generate the completion\n:object: The object type, which will be \"text_completion\"" + OpenAICompletionChoice-Output: + properties: + finish_reason: + type: string + title: Finish Reason + text: + type: string + title: Text + index: + type: integer + title: Index + logprobs: + $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + type: object + required: + - finish_reason + - text + - index + title: OpenAICompletionChoice + description: "A choice from an OpenAI-compatible completion response.\n\n:finish_reason: The reason the model stopped generating\n:text: The text of the choice\n:index: The index of the choice\n:logprobs: (Optional) The log probabilities for the tokens in the choice" + OpenAICompletionRequestWithExtraBody: + properties: + model: + type: string + title: Model + prompt: + anyOf: + - type: string + - items: + type: string + type: array + - items: + type: integer + type: array + - items: + items: + type: integer + type: array + type: array + title: Prompt + best_of: + title: Best Of + type: integer + echo: + title: Echo + type: boolean + frequency_penalty: + title: Frequency Penalty + type: number + logit_bias: + title: Logit Bias + additionalProperties: + type: number + type: object + logprobs: + title: Logprobs + type: boolean + max_tokens: + title: Max Tokens + type: integer + n: + title: N + type: integer + presence_penalty: + title: Presence Penalty + type: number + seed: + title: Seed + type: integer + stop: + anyOf: + - type: string + - items: + type: string + type: array + title: Stop + stream: + title: Stream + type: boolean + stream_options: + title: Stream Options + additionalProperties: true + type: object + temperature: + title: Temperature + type: number + top_p: + title: Top P + type: number + user: + title: User + type: string + suffix: + title: Suffix + type: string + additionalProperties: true + type: object + required: + - model + - prompt + title: OpenAICompletionRequestWithExtraBody + description: "Request parameters for OpenAI-compatible completion endpoint.\n\n:param model: The identifier of the model to use. The model must be registered with Llama Stack and available via the /models endpoint.\n:param prompt: The prompt to generate a completion for.\n:param best_of: (Optional) The number of completions to generate.\n:param echo: (Optional) Whether to echo the prompt.\n:param frequency_penalty: (Optional) The penalty for repeated tokens.\n:param logit_bias: (Optional) The logit bias to use.\n:param logprobs: (Optional) The log probabilities to use.\n:param max_tokens: (Optional) The maximum number of tokens to generate.\n:param n: (Optional) The number of completions to generate.\n:param presence_penalty: (Optional) The penalty for repeated tokens.\n:param seed: (Optional) The seed to use.\n:param stop: (Optional) The stop tokens to use.\n:param stream: (Optional) Whether to stream the response.\n:param stream_options: (Optional) The stream options to use.\n:param temperature: (Optional) The temperature to use.\n:param top_p: (Optional) The top p to use.\n:param user: (Optional) The user to use.\n:param suffix: (Optional) The suffix that should be appended to the completion." + OpenAICreateVectorStoreFileBatchRequestWithExtraBody: + properties: + file_ids: + items: + type: string + type: array + title: File Ids + attributes: + title: Attributes + additionalProperties: true + type: object + chunking_strategy: + title: Chunking Strategy + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + additionalProperties: true + type: object + required: + - file_ids + title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody + description: "Request to create a vector store file batch with extra_body support.\n\n:param file_ids: A list of File IDs that the vector store should use\n:param attributes: (Optional) Key-value attributes to store with the files\n:param chunking_strategy: (Optional) The chunking strategy used to chunk the file(s). Defaults to auto" + OpenAICreateVectorStoreRequestWithExtraBody: + properties: + name: + title: Name + type: string + file_ids: + title: File Ids + items: + type: string + type: array + expires_after: + title: Expires After + additionalProperties: true + type: object + chunking_strategy: + title: Chunking Strategy + additionalProperties: true + type: object + metadata: + title: Metadata + additionalProperties: true + type: object + additionalProperties: true + type: object + title: OpenAICreateVectorStoreRequestWithExtraBody + description: "Request to create a vector store with extra_body support.\n\n:param name: (Optional) A name for the vector store\n:param file_ids: List of file IDs to include in the vector store\n:param expires_after: (Optional) Expiration policy for the vector store\n:param chunking_strategy: (Optional) Strategy for splitting files into chunks\n:param metadata: Set of key-value pairs that can be attached to the vector store" + OpenAIDeveloperMessageParam: + properties: + role: + type: string + const: developer + title: Role + default: developer + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: Content + name: + title: Name + type: string + type: object + required: + - content + title: OpenAIDeveloperMessageParam + description: "A message from the developer in an OpenAI-compatible chat completion request.\n\n:param role: Must be \"developer\" to identify this as a developer message\n:param content: The content of the developer message\n:param name: (Optional) The name of the developer message participant." + OpenAIEmbeddingData: + properties: + object: + type: string + const: embedding + title: Object + default: embedding + embedding: + anyOf: + - items: + type: number + type: array + - type: string + title: Embedding + index: + type: integer + title: Index + type: object + required: + - embedding + - index + title: OpenAIEmbeddingData + description: "A single embedding data object from an OpenAI-compatible embeddings response.\n\n:param object: The object type, which will be \"embedding\"\n:param embedding: The embedding vector as a list of floats (when encoding_format=\"float\") or as a base64-encoded string (when encoding_format=\"base64\")\n:param index: The index of the embedding in the input list" + OpenAIEmbeddingUsage: + properties: + prompt_tokens: + type: integer + title: Prompt Tokens + total_tokens: + type: integer + title: Total Tokens + type: object + required: + - prompt_tokens + - total_tokens + title: OpenAIEmbeddingUsage + description: "Usage information for an OpenAI-compatible embeddings response.\n\n:param prompt_tokens: The number of tokens in the input\n:param total_tokens: The total number of tokens used" + OpenAIEmbeddingsRequestWithExtraBody: + properties: + model: + type: string + title: Model + input: + anyOf: + - type: string + - items: + type: string + type: array + title: Input + encoding_format: + title: Encoding Format + default: float + type: string + dimensions: + title: Dimensions + type: integer + user: + title: User + type: string + additionalProperties: true + type: object + required: + - model + - input + title: OpenAIEmbeddingsRequestWithExtraBody + description: "Request parameters for OpenAI-compatible embeddings endpoint.\n\n:param model: The identifier of the model to use. The model must be an embedding model registered with Llama Stack and available via the /models endpoint.\n:param input: Input text to embed, encoded as a string or array of strings. To embed multiple inputs in a single request, pass an array of strings.\n:param encoding_format: (Optional) The format to return the embeddings in. Can be either \"float\" or \"base64\". Defaults to \"float\".\n:param dimensions: (Optional) The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.\n:param user: (Optional) A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse." + OpenAIEmbeddingsResponse: + properties: + object: + type: string + const: list + title: Object + default: list + data: + items: + $ref: '#/components/schemas/OpenAIEmbeddingData' + type: array + title: Data + model: + type: string + title: Model + usage: + $ref: '#/components/schemas/OpenAIEmbeddingUsage' + type: object + required: + - data + - model + - usage + title: OpenAIEmbeddingsResponse + description: "Response from an OpenAI-compatible embeddings request.\n\n:param object: The object type, which will be \"list\"\n:param data: List of embedding data objects\n:param model: The model that was used to generate the embeddings\n:param usage: Usage information" + OpenAIFile: + properties: + type: + type: string + const: file + title: Type + default: file + file: + $ref: '#/components/schemas/OpenAIFileFile' + type: object + required: + - file + title: OpenAIFile + OpenAIFileFile: + properties: + file_data: + title: File Data + type: string + file_id: + title: File Id + type: string + filename: + title: Filename + type: string + type: object + title: OpenAIFileFile + OpenAIFileObject: + properties: + object: + type: string + const: file + title: Object + default: file + id: + type: string + title: Id + bytes: + type: integer + title: Bytes + created_at: + type: integer + title: Created At + expires_at: + type: integer + title: Expires At + filename: + type: string + title: Filename + purpose: + $ref: '#/components/schemas/OpenAIFilePurpose' + type: object + required: + - id + - bytes + - created_at + - expires_at + - filename + - purpose + title: OpenAIFileObject + description: "OpenAI File object as defined in the OpenAI Files API.\n\n:param object: The object type, which is always \"file\"\n:param id: The file identifier, which can be referenced in the API endpoints\n:param bytes: The size of the file, in bytes\n:param created_at: The Unix timestamp (in seconds) for when the file was created\n:param expires_at: The Unix timestamp (in seconds) for when the file expires\n:param filename: The name of the file\n:param purpose: The intended purpose of the file" + OpenAIFilePurpose: + type: string + enum: + - assistants + - batch + title: OpenAIFilePurpose + description: Valid purpose values for OpenAI Files API. + OpenAIImageURL: + properties: + url: + type: string + title: Url + detail: + title: Detail + type: string + type: object + required: + - url + title: OpenAIImageURL + description: "Image URL specification for OpenAI-compatible chat completion messages.\n\n:param url: URL of the image to include in the message\n:param detail: (Optional) Level of detail for image processing. Can be \"low\", \"high\", or \"auto\"" + OpenAIJSONSchema: + properties: + name: + type: string + title: Name + description: + title: Description + type: string + strict: + title: Strict + type: boolean + schema: + title: Schema + additionalProperties: true + type: object + type: object + title: OpenAIJSONSchema + description: "JSON schema specification for OpenAI-compatible structured response format.\n\n:param name: Name of the schema\n:param description: (Optional) Description of the schema\n:param strict: (Optional) Whether to enforce strict adherence to the schema\n:param schema: (Optional) The JSON schema definition" + OpenAIResponseAnnotationCitation: + properties: + type: + type: string + const: url_citation + title: Type + default: url_citation + end_index: + type: integer + title: End Index + start_index: + type: integer + title: Start Index + title: + type: string + title: Title + url: + type: string + title: Url + type: object + required: + - end_index + - start_index + - title + - url + title: OpenAIResponseAnnotationCitation + description: "URL citation annotation for referencing external web resources.\n\n:param type: Annotation type identifier, always \"url_citation\"\n:param end_index: End position of the citation span in the content\n:param start_index: Start position of the citation span in the content\n:param title: Title of the referenced web resource\n:param url: URL of the referenced web resource" + OpenAIResponseAnnotationContainerFileCitation: + properties: + type: + type: string + const: container_file_citation + title: Type + default: container_file_citation + container_id: + type: string + title: Container Id + end_index: + type: integer + title: End Index + file_id: + type: string + title: File Id + filename: + type: string + title: Filename + start_index: + type: integer + title: Start Index + type: object + required: + - container_id + - end_index + - file_id + - filename + - start_index + title: OpenAIResponseAnnotationContainerFileCitation + OpenAIResponseAnnotationFileCitation: + properties: + type: + type: string + const: file_citation + title: Type + default: file_citation + file_id: + type: string + title: File Id + filename: + type: string + title: Filename + index: + type: integer + title: Index + type: object + required: + - file_id + - filename + - index + title: OpenAIResponseAnnotationFileCitation + description: "File citation annotation for referencing specific files in response content.\n\n:param type: Annotation type identifier, always \"file_citation\"\n:param file_id: Unique identifier of the referenced file\n:param filename: Name of the referenced file\n:param index: Position index of the citation within the content" + OpenAIResponseAnnotationFilePath: + properties: + type: + type: string + const: file_path + title: Type + default: file_path + file_id: + type: string + title: File Id + index: + type: integer + title: Index + type: object + required: + - file_id + - index + title: OpenAIResponseAnnotationFilePath + OpenAIResponseContentPartRefusal: + properties: + type: + type: string + const: refusal + title: Type + default: refusal + refusal: + type: string + title: Refusal + type: object + required: + - refusal + title: OpenAIResponseContentPartRefusal + description: "Refusal content within a streamed response part.\n\n:param type: Content part type identifier, always \"refusal\"\n:param refusal: Refusal text supplied by the model" + OpenAIResponseError: + properties: + code: + type: string + title: Code + message: + type: string + title: Message + type: object + required: + - code + - message + title: OpenAIResponseError + description: "Error details for failed OpenAI response requests.\n\n:param code: Error code identifying the type of failure\n:param message: Human-readable error message describing the failure" + OpenAIResponseFormatJSONObject: + properties: + type: + type: string + const: json_object + title: Type + default: json_object + type: object + title: OpenAIResponseFormatJSONObject + description: "JSON object response format for OpenAI-compatible chat completion requests.\n\n:param type: Must be \"json_object\" to indicate generic JSON object response format" + OpenAIResponseFormatJSONSchema: + properties: + type: + type: string + const: json_schema + title: Type + default: json_schema + json_schema: + $ref: '#/components/schemas/OpenAIJSONSchema' + type: object + required: + - json_schema + title: OpenAIResponseFormatJSONSchema + description: "JSON schema response format for OpenAI-compatible chat completion requests.\n\n:param type: Must be \"json_schema\" to indicate structured JSON response format\n:param json_schema: The JSON schema specification for the response" + OpenAIResponseFormatText: + properties: + type: + type: string + const: text + title: Type + default: text + type: object + title: OpenAIResponseFormatText + description: "Text response format for OpenAI-compatible chat completion requests.\n\n:param type: Must be \"text\" to indicate plain text response format" + OpenAIResponseInputFunctionToolCallOutput: + properties: + call_id: + type: string + title: Call Id + output: + type: string + title: Output + type: + type: string + const: function_call_output + title: Type + default: function_call_output + id: + title: Id + type: string + status: + title: Status + type: string + type: object + required: + - call_id + - output + title: OpenAIResponseInputFunctionToolCallOutput + description: This represents the output of a function call that gets passed back to the model. + OpenAIResponseInputMessageContentFile: + properties: + type: + type: string + const: input_file + title: Type + default: input_file + file_data: + title: File Data + type: string + file_id: + title: File Id + type: string + file_url: + title: File Url + type: string + filename: + title: Filename + type: string + type: object + title: OpenAIResponseInputMessageContentFile + description: "File content for input messages in OpenAI response format.\n\n:param type: The type of the input item. Always `input_file`.\n:param file_data: The data of the file to be sent to the model.\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param file_url: The URL of the file to be sent to the model.\n:param filename: The name of the file to be sent to the model." + OpenAIResponseInputMessageContentImage: + properties: + detail: + anyOf: + - type: string + const: low + - type: string + const: high + - type: string + const: auto + title: Detail + default: auto + type: + type: string + const: input_image + title: Type + default: input_image + file_id: + title: File Id + type: string + image_url: + title: Image Url + type: string + type: object + title: OpenAIResponseInputMessageContentImage + description: "Image content for input messages in OpenAI response format.\n\n:param detail: Level of detail for image processing, can be \"low\", \"high\", or \"auto\"\n:param type: Content type identifier, always \"input_image\"\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param image_url: (Optional) URL of the image content" + OpenAIResponseInputMessageContentText: + properties: + text: + type: string + title: Text + type: + type: string + const: input_text + title: Type + default: input_text + type: object + required: + - text + title: OpenAIResponseInputMessageContentText + description: "Text content for input messages in OpenAI response format.\n\n:param text: The text content of the input message\n:param type: Content type identifier, always \"input_text\"" + OpenAIResponseInputToolFileSearch: + properties: + type: + type: string + const: file_search + title: Type + default: file_search + vector_store_ids: + items: + type: string + type: array + title: Vector Store Ids + filters: + title: Filters + additionalProperties: true + type: object + max_num_results: + title: Max Num Results + default: 10 + type: integer + maximum: 50.0 + minimum: 1.0 + ranking_options: + $ref: '#/components/schemas/SearchRankingOptions' + type: object + required: + - vector_store_ids + title: OpenAIResponseInputToolFileSearch + description: "File search tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"file_search\"\n:param vector_store_ids: List of vector store identifiers to search within\n:param filters: (Optional) Additional filters to apply to the search\n:param max_num_results: (Optional) Maximum number of search results to return (1-50)\n:param ranking_options: (Optional) Options for ranking and scoring search results" + OpenAIResponseInputToolFunction: + properties: + type: + type: string + const: function + title: Type + default: function + name: + type: string + title: Name + description: + title: Description + type: string + parameters: + title: Parameters + additionalProperties: true + type: object + strict: + title: Strict + type: boolean + type: object + required: + - name + - parameters + title: OpenAIResponseInputToolFunction + description: "Function tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"function\"\n:param name: Name of the function that can be called\n:param description: (Optional) Description of what the function does\n:param parameters: (Optional) JSON schema defining the function's parameters\n:param strict: (Optional) Whether to enforce strict parameter validation" + OpenAIResponseInputToolMCP: + properties: + type: + type: string + const: mcp + title: Type + default: mcp + server_label: + type: string + title: Server Label + server_url: + type: string + title: Server Url + headers: + title: Headers + additionalProperties: true + type: object + require_approval: + anyOf: + - type: string + const: always + - type: string + const: never + - $ref: '#/components/schemas/ApprovalFilter' + title: Require Approval + default: never + allowed_tools: + anyOf: + - items: + type: string + type: array + - $ref: '#/components/schemas/AllowedToolsFilter' + title: Allowed Tools + type: object + required: + - server_label + - server_url + title: OpenAIResponseInputToolMCP + description: "Model Context Protocol (MCP) tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"mcp\"\n:param server_label: Label to identify this MCP server\n:param server_url: URL endpoint of the MCP server\n:param headers: (Optional) HTTP headers to include when connecting to the server\n:param require_approval: Approval requirement for tool calls (\"always\", \"never\", or filter)\n:param allowed_tools: (Optional) Restriction on which tools can be used from this server" + OpenAIResponseInputToolWebSearch: + properties: + type: + anyOf: + - type: string + const: web_search + - type: string + const: web_search_preview + - type: string + const: web_search_preview_2025_03_11 + title: Type + default: web_search + search_context_size: + title: Search Context Size + default: medium + type: string + pattern: ^low|medium|high$ + type: object + title: OpenAIResponseInputToolWebSearch + description: "Web search tool configuration for OpenAI response inputs.\n\n:param type: Web search tool type variant to use\n:param search_context_size: (Optional) Size of search context, must be \"low\", \"medium\", or \"high\"" + OpenAIResponseMCPApprovalRequest: + properties: + arguments: + type: string + title: Arguments + id: + type: string + title: Id + name: + type: string + title: Name + server_label: + type: string + title: Server Label + type: + type: string + const: mcp_approval_request + title: Type + default: mcp_approval_request + type: object + required: + - arguments + - id + - name + - server_label + title: OpenAIResponseMCPApprovalRequest + description: A request for human approval of a tool invocation. + OpenAIResponseMCPApprovalResponse: + properties: + approval_request_id: + type: string + title: Approval Request Id + approve: + type: boolean + title: Approve + type: + type: string + const: mcp_approval_response + title: Type + default: mcp_approval_response + id: + title: Id + type: string + reason: + title: Reason + type: string + type: object + required: + - approval_request_id + - approve + title: OpenAIResponseMCPApprovalResponse + description: A response to an MCP approval request. + OpenAIResponseMessage-Input: + properties: + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + type: array + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + type: array + title: Content + role: + anyOf: + - type: string + const: system + - type: string + const: developer + - type: string + const: user + - type: string + const: assistant + title: Role + type: + type: string + const: message + title: Type + default: message + id: + title: Id + type: string + status: + title: Status + type: string + type: object + required: + - content + - role + title: OpenAIResponseMessage + description: "Corresponds to the various Message types in the Responses API.\nThey are all under one type because the Responses API gives them all\nthe same \"type\" value, and there is no way to tell them apart in certain\nscenarios." + OpenAIResponseMessage-Output: + properties: + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + type: array + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + type: array + title: Content + role: + anyOf: + - type: string + const: system + - type: string + const: developer + - type: string + const: user + - type: string + const: assistant + title: Role + type: + type: string + const: message + title: Type + default: message + id: + title: Id + type: string + status: + title: Status + type: string + type: object + required: + - content + - role + title: OpenAIResponseMessage + description: "Corresponds to the various Message types in the Responses API.\nThey are all under one type because the Responses API gives them all\nthe same \"type\" value, and there is no way to tell them apart in certain\nscenarios." + OpenAIResponseObject: + properties: + created_at: + type: integer + title: Created At + error: + $ref: '#/components/schemas/OpenAIResponseError' + id: + type: string + title: Id + model: + type: string + title: Model + object: + type: string + const: response + title: Object + default: response + output: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + discriminator: + propertyName: type + mapping: + file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + message: '#/components/schemas/OpenAIResponseMessage-Output' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + type: array + title: Output + parallel_tool_calls: + type: boolean + title: Parallel Tool Calls + default: false + previous_response_id: + title: Previous Response Id + type: string + prompt: + $ref: '#/components/schemas/OpenAIResponsePrompt' + status: + type: string + title: Status + temperature: + title: Temperature + type: number + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + title: Top P + type: number + tools: + title: Tools + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + discriminator: + propertyName: type + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + type: array + truncation: + title: Truncation + type: string + usage: + $ref: '#/components/schemas/OpenAIResponseUsage' + instructions: + title: Instructions + type: string + type: object + required: + - created_at + - id + - model + - output + - status + title: OpenAIResponseObject + description: "Complete OpenAI response object containing generation results and metadata.\n\n:param created_at: Unix timestamp when the response was created\n:param error: (Optional) Error details if the response generation failed\n:param id: Unique identifier for this response\n:param model: Model identifier used for generation\n:param object: Object type identifier, always \"response\"\n:param output: List of generated output items (messages, tool calls, etc.)\n:param parallel_tool_calls: Whether tool calls can be executed in parallel\n:param previous_response_id: (Optional) ID of the previous response in a conversation\n:param prompt: (Optional) Reference to a prompt template and its variables.\n:param status: Current status of the response generation\n:param temperature: (Optional) Sampling temperature used for generation\n:param text: Text formatting configuration for the response\n:param top_p: (Optional) Nucleus sampling parameter used for generation\n:param tools: (Optional) An array of tools the model may call while generating a response.\n:param truncation: (Optional) Truncation strategy applied to the response\n:param usage: (Optional) Token usage information for the response\n:param instructions: (Optional) System message inserted into the model's context" + OpenAIResponseOutputMessageContentOutputText: + properties: + text: + type: string + title: Text + type: + type: string + const: output_text + title: Type + default: output_text + annotations: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + discriminator: + propertyName: type + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + type: array + title: Annotations + type: object + required: + - text + title: OpenAIResponseOutputMessageContentOutputText + OpenAIResponseOutputMessageFileSearchToolCall: + properties: + id: + type: string + title: Id + queries: + items: + type: string + type: array + title: Queries + status: + type: string + title: Status + type: + type: string + const: file_search_call + title: Type + default: file_search_call + results: + title: Results + items: + $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' + type: array + type: object + required: + - id + - queries + - status + title: OpenAIResponseOutputMessageFileSearchToolCall + description: "File search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param queries: List of search queries executed\n:param status: Current status of the file search operation\n:param type: Tool call type identifier, always \"file_search_call\"\n:param results: (Optional) Search results returned by the file search operation" + OpenAIResponseOutputMessageFileSearchToolCallResults: + properties: + attributes: + additionalProperties: true + type: object + title: Attributes + file_id: + type: string + title: File Id + filename: + type: string + title: Filename + score: + type: number + title: Score + text: + type: string + title: Text + type: object + required: + - attributes + - file_id + - filename + - score + - text + title: OpenAIResponseOutputMessageFileSearchToolCallResults + description: "Search results returned by the file search operation.\n\n:param attributes: (Optional) Key-value attributes associated with the file\n:param file_id: Unique identifier of the file containing the result\n:param filename: Name of the file containing the result\n:param score: Relevance score for this search result (between 0 and 1)\n:param text: Text content of the search result" + OpenAIResponseOutputMessageFunctionToolCall: + properties: + call_id: + type: string + title: Call Id + name: + type: string + title: Name + arguments: + type: string + title: Arguments + type: + type: string + const: function_call + title: Type + default: function_call + id: + title: Id + type: string + status: + title: Status + type: string + type: object + required: + - call_id + - name + - arguments + title: OpenAIResponseOutputMessageFunctionToolCall + description: "Function tool call output message for OpenAI responses.\n\n:param call_id: Unique identifier for the function call\n:param name: Name of the function being called\n:param arguments: JSON string containing the function arguments\n:param type: Tool call type identifier, always \"function_call\"\n:param id: (Optional) Additional identifier for the tool call\n:param status: (Optional) Current status of the function call execution" + OpenAIResponseOutputMessageMCPCall: + properties: + id: + type: string + title: Id + type: + type: string + const: mcp_call + title: Type + default: mcp_call + arguments: + type: string + title: Arguments + name: + type: string + title: Name + server_label: + type: string + title: Server Label + error: + title: Error + type: string + output: + title: Output + type: string + type: object + required: + - id + - arguments + - name + - server_label + title: OpenAIResponseOutputMessageMCPCall + description: "Model Context Protocol (MCP) call output message for OpenAI responses.\n\n:param id: Unique identifier for this MCP call\n:param type: Tool call type identifier, always \"mcp_call\"\n:param arguments: JSON string containing the MCP call arguments\n:param name: Name of the MCP method being called\n:param server_label: Label identifying the MCP server handling the call\n:param error: (Optional) Error message if the MCP call failed\n:param output: (Optional) Output result from the successful MCP call" + OpenAIResponseOutputMessageMCPListTools: + properties: + id: + type: string + title: Id + type: + type: string + const: mcp_list_tools + title: Type + default: mcp_list_tools + server_label: + type: string + title: Server Label + tools: + items: + $ref: '#/components/schemas/MCPListToolsTool' + type: array + title: Tools + type: object + required: + - id + - server_label + - tools + title: OpenAIResponseOutputMessageMCPListTools + description: "MCP list tools output message containing available tools from an MCP server.\n\n:param id: Unique identifier for this MCP list tools operation\n:param type: Tool call type identifier, always \"mcp_list_tools\"\n:param server_label: Label identifying the MCP server providing the tools\n:param tools: List of available tools provided by the MCP server" + OpenAIResponseOutputMessageWebSearchToolCall: + properties: + id: + type: string + title: Id + status: + type: string + title: Status + type: + type: string + const: web_search_call + title: Type + default: web_search_call + type: object + required: + - id + - status + title: OpenAIResponseOutputMessageWebSearchToolCall + description: "Web search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param status: Current status of the web search operation\n:param type: Tool call type identifier, always \"web_search_call\"" + OpenAIResponsePrompt: + properties: + id: + type: string + title: Id + variables: + title: Variables + additionalProperties: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + type: object + version: + title: Version + type: string + type: object + required: + - id + title: OpenAIResponsePrompt + description: "OpenAI compatible Prompt object that is used in OpenAI responses.\n\n:param id: Unique identifier of the prompt template\n:param variables: Dictionary of variable names to OpenAIResponseInputMessageContent structure for template substitution. The substitution values can either be strings, or other Response input types\nlike images or files.\n:param version: Version number of the prompt to use (defaults to latest if not specified)" + OpenAIResponseText: + properties: + format: + $ref: '#/components/schemas/OpenAIResponseTextFormat' + type: object + title: OpenAIResponseText + description: "Text response configuration for OpenAI responses.\n\n:param format: (Optional) Text format configuration specifying output format requirements" + OpenAIResponseTextFormat: + properties: + type: + anyOf: + - type: string + const: text + - type: string + const: json_schema + - type: string + const: json_object + title: Type + name: + title: Name + type: string + schema: + title: Schema + additionalProperties: true + type: object + description: + title: Description + type: string + strict: + title: Strict + type: boolean + type: object + title: OpenAIResponseTextFormat + description: "Configuration for Responses API text format.\n\n:param type: Must be \"text\", \"json_schema\", or \"json_object\" to identify the format type\n:param name: The name of the response format. Only used for json_schema.\n:param schema: The JSON schema the response should conform to. In a Python SDK, this is often a `pydantic` model. Only used for json_schema.\n:param description: (Optional) A description of the response format. Only used for json_schema.\n:param strict: (Optional) Whether to strictly enforce the JSON schema. If true, the response must match the schema exactly. Only used for json_schema." + OpenAIResponseToolMCP: + properties: + type: + type: string + const: mcp + title: Type + default: mcp + server_label: + type: string + title: Server Label + allowed_tools: + anyOf: + - items: + type: string + type: array + - $ref: '#/components/schemas/AllowedToolsFilter' + title: Allowed Tools + type: object + required: + - server_label + title: OpenAIResponseToolMCP + description: "Model Context Protocol (MCP) tool configuration for OpenAI response object.\n\n:param type: Tool type identifier, always \"mcp\"\n:param server_label: Label to identify this MCP server\n:param allowed_tools: (Optional) Restriction on which tools can be used from this server" + OpenAIResponseUsage: + properties: + input_tokens: + type: integer + title: Input Tokens + output_tokens: + type: integer + title: Output Tokens + total_tokens: + type: integer + title: Total Tokens + input_tokens_details: + $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + output_tokens_details: + $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + type: object + required: + - input_tokens + - output_tokens + - total_tokens + title: OpenAIResponseUsage + description: "Usage information for OpenAI response.\n\n:param input_tokens: Number of tokens in the input\n:param output_tokens: Number of tokens in the output\n:param total_tokens: Total tokens used (input + output)\n:param input_tokens_details: Detailed breakdown of input token usage\n:param output_tokens_details: Detailed breakdown of output token usage" + OpenAIResponseUsageInputTokensDetails: + properties: + cached_tokens: + title: Cached Tokens + type: integer + type: object + title: OpenAIResponseUsageInputTokensDetails + description: "Token details for input tokens in OpenAI response usage.\n\n:param cached_tokens: Number of tokens retrieved from cache" + OpenAIResponseUsageOutputTokensDetails: + properties: + reasoning_tokens: + title: Reasoning Tokens + type: integer + type: object + title: OpenAIResponseUsageOutputTokensDetails + description: "Token details for output tokens in OpenAI response usage.\n\n:param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models)" + OpenAISystemMessageParam: + properties: + role: + type: string + const: system + title: Role + default: system + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: Content + name: + title: Name + type: string + type: object + required: + - content + title: OpenAISystemMessageParam + description: "A system message providing instructions or context to the model.\n\n:param role: Must be \"system\" to identify this as a system message\n:param content: The content of the \"system prompt\". If multiple system messages are provided, they are concatenated. The underlying Llama Stack code may also add other system messages (for example, for formatting tool definitions).\n:param name: (Optional) The name of the system message participant." + OpenAITokenLogProb: + properties: + token: + type: string + title: Token + bytes: + title: Bytes + items: + type: integer + type: array + logprob: + type: number + title: Logprob + top_logprobs: + items: + $ref: '#/components/schemas/OpenAITopLogProb' + type: array + title: Top Logprobs + type: object + required: + - token + - logprob + - top_logprobs + title: OpenAITokenLogProb + description: "The log probability for a token from an OpenAI-compatible chat completion response.\n\n:token: The token\n:bytes: (Optional) The bytes for the token\n:logprob: The log probability of the token\n:top_logprobs: The top log probabilities for the token" + OpenAIToolMessageParam: + properties: + role: + type: string + const: tool + title: Role + default: tool + tool_call_id: + type: string + title: Tool Call Id + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: Content + type: object + required: + - tool_call_id + - content + title: OpenAIToolMessageParam + description: "A message representing the result of a tool invocation in an OpenAI-compatible chat completion request.\n\n:param role: Must be \"tool\" to identify this as a tool response\n:param tool_call_id: Unique identifier for the tool call this response is for\n:param content: The response content from the tool" + OpenAITopLogProb: + properties: + token: + type: string + title: Token + bytes: + title: Bytes + items: + type: integer + type: array + logprob: + type: number + title: Logprob + type: object + required: + - token + - logprob + title: OpenAITopLogProb + description: "The top log probability for a token from an OpenAI-compatible chat completion response.\n\n:token: The token\n:bytes: (Optional) The bytes for the token\n:logprob: The log probability of the token" + OpenAIUserMessageParam-Input: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + - $ref: '#/components/schemas/OpenAIFile' + discriminator: + propertyName: type + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: Content + name: + title: Name + type: string + type: object + required: + - content + title: OpenAIUserMessageParam + description: "A message from the user in an OpenAI-compatible chat completion request.\n\n:param role: Must be \"user\" to identify this as a user message\n:param content: The content of the message, which can include text and other media\n:param name: (Optional) The name of the user message participant." + OpenAIUserMessageParam-Output: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + - $ref: '#/components/schemas/OpenAIFile' + discriminator: + propertyName: type + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: Content + name: + title: Name + type: string + type: object + required: + - content + title: OpenAIUserMessageParam + description: "A message from the user in an OpenAI-compatible chat completion request.\n\n:param role: Must be \"user\" to identify this as a user message\n:param content: The content of the message, which can include text and other media\n:param name: (Optional) The name of the user message participant." + OptimizerConfig: + properties: + optimizer_type: + $ref: '#/components/schemas/OptimizerType' + lr: + type: number + title: Lr + weight_decay: + type: number + title: Weight Decay + num_warmup_steps: + type: integer + title: Num Warmup Steps + type: object + required: + - optimizer_type + - lr + - weight_decay + - num_warmup_steps + title: OptimizerConfig + description: "Configuration parameters for the optimization algorithm.\n\n:param optimizer_type: Type of optimizer to use (adam, adamw, or sgd)\n:param lr: Learning rate for the optimizer\n:param weight_decay: Weight decay coefficient for regularization\n:param num_warmup_steps: Number of steps for learning rate warmup" + OptimizerType: + type: string + enum: + - adam + - adamw + - sgd + title: OptimizerType + description: "Available optimizer algorithms for training.\n:cvar adam: Adaptive Moment Estimation optimizer\n:cvar adamw: AdamW optimizer with weight decay\n:cvar sgd: Stochastic Gradient Descent optimizer" + Order: + type: string + enum: + - asc + - desc + title: Order + description: "Sort order for paginated responses.\n:cvar asc: Ascending order\n:cvar desc: Descending order" + OutputTokensDetails: + properties: + reasoning_tokens: + type: integer + title: Reasoning Tokens + additionalProperties: true + type: object + required: + - reasoning_tokens + title: OutputTokensDetails + PostTrainingJob: + properties: + job_uuid: + type: string + title: Job Uuid + type: object + required: + - job_uuid + title: PostTrainingJob + Prompt: + properties: + prompt: + title: Prompt + description: The system prompt with variable placeholders + type: string + version: + type: integer + minimum: 1.0 + title: Version + description: Version (integer starting at 1, incremented on save) + prompt_id: + type: string + title: Prompt Id + description: Unique identifier in format 'pmpt_<48-digit-hash>' + variables: + items: + type: string + type: array + title: Variables + description: List of variable names that can be used in the prompt template + is_default: + type: boolean + title: Is Default + description: Boolean indicating whether this version is the default version + default: false + type: object + required: + - version + - prompt_id + title: Prompt + description: "A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack.\n\n:param prompt: The system prompt text with variable placeholders. Variables are only supported when using the Responses API.\n:param version: Version (integer starting at 1, incremented on save)\n:param prompt_id: Unique identifier formatted as 'pmpt_<48-digit-hash>'\n:param variables: List of prompt variable names that can be used in the prompt template\n:param is_default: Boolean indicating whether this version is the default version for this prompt" + ProviderInfo: + properties: + api: + type: string + title: Api + provider_id: + type: string + title: Provider Id + provider_type: + type: string + title: Provider Type + config: + additionalProperties: true + type: object + title: Config + health: + additionalProperties: true + type: object + title: Health + type: object + required: + - api + - provider_id + - provider_type + - config + - health + title: ProviderInfo + description: "Information about a registered provider including its configuration and health status.\n\n:param api: The API name this provider implements\n:param provider_id: Unique identifier for the provider\n:param provider_type: The type of provider implementation\n:param config: Configuration parameters for the provider\n:param health: Current health status of the provider" + QueryChunksResponse: + properties: + chunks: + items: + $ref: '#/components/schemas/Chunk-Output' + type: array + title: Chunks + scores: + items: + type: number + type: array + title: Scores + type: object + required: + - chunks + - scores + title: QueryChunksResponse + description: "Response from querying chunks in a vector database.\n\n:param chunks: List of content chunks returned from the query\n:param scores: Relevance scores corresponding to each returned chunk" + RAGQueryConfig: + properties: + query_generator_config: + oneOf: + - $ref: '#/components/schemas/DefaultRAGQueryGeneratorConfig' + - $ref: '#/components/schemas/LLMRAGQueryGeneratorConfig' + title: Query Generator Config + default: + type: default + separator: ' ' + discriminator: + propertyName: type + mapping: + default: '#/components/schemas/DefaultRAGQueryGeneratorConfig' + llm: '#/components/schemas/LLMRAGQueryGeneratorConfig' + max_tokens_in_context: + type: integer + title: Max Tokens In Context + default: 4096 + max_chunks: + type: integer + title: Max Chunks + default: 5 + chunk_template: + type: string + title: Chunk Template + default: "Result {index}\nContent: {chunk.content}\nMetadata: {metadata}\n" + mode: + default: vector + $ref: '#/components/schemas/RAGSearchMode' + ranker: + title: Ranker + oneOf: + - $ref: '#/components/schemas/RRFRanker' + - $ref: '#/components/schemas/WeightedRanker' + discriminator: + propertyName: type + mapping: + rrf: '#/components/schemas/RRFRanker' + weighted: '#/components/schemas/WeightedRanker' + type: object + title: RAGQueryConfig + description: "Configuration for the RAG query generation.\n\n:param query_generator_config: Configuration for the query generator.\n:param max_tokens_in_context: Maximum number of tokens in the context.\n:param max_chunks: Maximum number of chunks to retrieve.\n:param chunk_template: Template for formatting each retrieved chunk in the context.\n Available placeholders: {index} (1-based chunk ordinal), {chunk.content} (chunk content string), {metadata} (chunk metadata dict).\n Default: \"Result {index}\\nContent: {chunk.content}\\nMetadata: {metadata}\\n\"\n:param mode: Search mode for retrievalβ€”either \"vector\", \"keyword\", or \"hybrid\". Default \"vector\".\n:param ranker: Configuration for the ranker to use in hybrid search. Defaults to RRF ranker." + RAGQueryResult: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + title: RAGQueryResult + description: "Result of a RAG query containing retrieved content and metadata.\n\n:param content: (Optional) The retrieved content from the query\n:param metadata: Additional metadata about the query result" + RAGSearchMode: + type: string + enum: + - vector + - keyword + - hybrid + title: RAGSearchMode + description: "Search modes for RAG query retrieval:\n- VECTOR: Uses vector similarity search for semantic matching\n- KEYWORD: Uses keyword-based search for exact matching\n- HYBRID: Combines both vector and keyword search for better results" + RRFRanker: + properties: + type: + type: string + const: rrf + title: Type + default: rrf + impact_factor: + type: number + title: Impact Factor + default: 60.0 + minimum: 0.0 + type: object + title: RRFRanker + description: "Reciprocal Rank Fusion (RRF) ranker configuration.\n\n:param type: The type of ranker, always \"rrf\"\n:param impact_factor: The impact factor for RRF scoring. Higher values give more weight to higher-ranked results.\n Must be greater than 0" + RegexParserScoringFnParams: + properties: + type: + type: string + const: regex_parser + title: Type + default: regex_parser + parsing_regexes: + items: + type: string + type: array + title: Parsing Regexes + description: Regex to extract the answer from generated response + aggregation_functions: + items: + $ref: '#/components/schemas/AggregationFunctionType' + type: array + title: Aggregation Functions + description: Aggregation functions to apply to the scores of each row + type: object + title: RegexParserScoringFnParams + description: "Parameters for regex parser scoring function configuration.\n:param type: The type of scoring function parameters, always regex_parser\n:param parsing_regexes: Regex to extract the answer from generated response\n:param aggregation_functions: Aggregation functions to apply to the scores of each row" + RerankData: + properties: + index: + type: integer + title: Index + relevance_score: + type: number + title: Relevance Score + type: object + required: + - index + - relevance_score + title: RerankData + description: "A single rerank result from a reranking response.\n\n:param index: The original index of the document in the input list\n:param relevance_score: The relevance score from the model output. Values are inverted when applicable so that higher scores indicate greater relevance." + RerankResponse: + properties: + data: + items: + $ref: '#/components/schemas/RerankData' + type: array + title: Data + type: object + required: + - data + title: RerankResponse + description: "Response from a reranking request.\n\n:param data: List of rerank result objects, sorted by relevance score (descending)" + RouteInfo: + properties: + route: + type: string + title: Route + method: + type: string + title: Method + provider_types: + items: + type: string + type: array + title: Provider Types + type: object + required: + - route + - method + - provider_types + title: RouteInfo + description: "Information about an API route including its path, method, and implementing providers.\n\n:param route: The API endpoint path\n:param method: HTTP method for the route\n:param provider_types: List of provider types that implement this route" + RowsDataSource: + properties: + type: + type: string + const: rows + title: Type + default: rows + rows: + items: + additionalProperties: true + type: object + type: array + title: Rows + type: object + required: + - rows + title: RowsDataSource + description: "A dataset stored in rows.\n:param rows: The dataset is stored in rows. E.g.\n - [\n {\"messages\": [{\"role\": \"user\", \"content\": \"Hello, world!\"}, {\"role\": \"assistant\", \"content\": \"Hello, world!\"}]}\n ]" + RunShieldResponse: + properties: + violation: + $ref: '#/components/schemas/SafetyViolation' + type: object + title: RunShieldResponse + description: "Response from running a safety shield.\n\n:param violation: (Optional) Safety violation detected by the shield, if any" + SafetyViolation: + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + user_message: + title: User Message + type: string + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - violation_level + title: SafetyViolation + description: "Details of a safety violation detected by content moderation.\n\n:param violation_level: Severity level of the violation\n:param user_message: (Optional) Message to convey to the user about the violation\n:param metadata: Additional metadata including specific violation codes for debugging and telemetry" + SamplingParams: + properties: + strategy: + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + - $ref: '#/components/schemas/TopPSamplingStrategy' + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: Strategy + discriminator: + propertyName: type + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + max_tokens: + title: Max Tokens + type: integer + repetition_penalty: + title: Repetition Penalty + default: 1.0 + type: number + stop: + title: Stop + items: + type: string + type: array + type: object + title: SamplingParams + description: "Sampling parameters.\n\n:param strategy: The sampling strategy.\n:param max_tokens: The maximum number of tokens that can be generated in the completion. The token count of\n your prompt plus max_tokens cannot exceed the model's context length.\n:param repetition_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens\n based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n:param stop: Up to 4 sequences where the API will stop generating further tokens.\n The returned text will not contain the stop sequence." + ScoreBatchResponse: + properties: + dataset_id: + title: Dataset Id + type: string + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Results + type: object + required: + - results + title: ScoreBatchResponse + description: "Response from batch scoring operations on datasets.\n\n:param dataset_id: (Optional) The identifier of the dataset that was scored\n:param results: A map of scoring function name to ScoringResult" + ScoreResponse: + properties: + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Results + type: object + required: + - results + title: ScoreResponse + description: "The response from scoring.\n\n:param results: A map of scoring function name to ScoringResult." + ScoringFn-Output: + properties: + identifier: + type: string + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: + title: Provider Resource Id + description: Unique identifier for this resource in the provider + type: string + provider_id: + type: string + title: Provider Id + description: ID of the provider that owns this resource + type: + type: string + const: scoring_function + title: Type + default: scoring_function + description: + title: Description + type: string + metadata: + additionalProperties: true + type: object + title: Metadata + description: Any additional metadata for this definition + return_type: + oneOf: + - $ref: '#/components/schemas/StringType' + - $ref: '#/components/schemas/NumberType' + - $ref: '#/components/schemas/BooleanType' + - $ref: '#/components/schemas/ArrayType' + - $ref: '#/components/schemas/ObjectType' + - $ref: '#/components/schemas/JsonType' + - $ref: '#/components/schemas/UnionType' + - $ref: '#/components/schemas/ChatCompletionInputType' + - $ref: '#/components/schemas/CompletionInputType' + - $ref: '#/components/schemas/AgentTurnInputType' + title: Return Type + description: The return type of the deterministic function + discriminator: + propertyName: type + mapping: + agent_turn_input: '#/components/schemas/AgentTurnInputType' + array: '#/components/schemas/ArrayType' + boolean: '#/components/schemas/BooleanType' + chat_completion_input: '#/components/schemas/ChatCompletionInputType' + completion_input: '#/components/schemas/CompletionInputType' + json: '#/components/schemas/JsonType' + number: '#/components/schemas/NumberType' + object: '#/components/schemas/ObjectType' + string: '#/components/schemas/StringType' + union: '#/components/schemas/UnionType' + params: + title: Params + description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + - $ref: '#/components/schemas/RegexParserScoringFnParams' + - $ref: '#/components/schemas/BasicScoringFnParams' + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + type: object + required: + - identifier + - provider_id + - return_type + title: ScoringFn + description: "A scoring function resource for evaluating model outputs.\n:param type: The resource type, always scoring_function" + ScoringResult: + properties: + score_rows: + items: + additionalProperties: true + type: object + type: array + title: Score Rows + aggregated_results: + additionalProperties: true + type: object + title: Aggregated Results + type: object + required: + - score_rows + - aggregated_results + title: ScoringResult + description: "A scoring result for a single row.\n\n:param score_rows: The scoring result for each row. Each row is a map of column name to value.\n:param aggregated_results: Map of metric name to aggregated value" + SearchRankingOptions: + properties: + ranker: + title: Ranker + type: string + score_threshold: + title: Score Threshold + default: 0.0 + type: number + type: object + title: SearchRankingOptions + description: "Options for ranking and filtering search results.\n\n:param ranker: (Optional) Name of the ranking algorithm to use\n:param score_threshold: (Optional) Minimum relevance score threshold for results" + Shield: + properties: + identifier: + type: string + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: + title: Provider Resource Id + description: Unique identifier for this resource in the provider + type: string + provider_id: + type: string + title: Provider Id + description: ID of the provider that owns this resource + type: + type: string + const: shield + title: Type + default: shield + params: + title: Params + additionalProperties: true + type: object + type: object + required: + - identifier + - provider_id + title: Shield + description: "A safety shield resource that can be used to check content.\n\n:param params: (Optional) Configuration parameters for the shield\n:param type: The resource type, always shield" + ShieldCallStep-Output: + properties: + turn_id: + type: string + title: Turn Id + step_id: + type: string + title: Step Id + started_at: + title: Started At + type: string + format: date-time + completed_at: + title: Completed At + type: string + format: date-time + step_type: + type: string + const: shield_call + title: Step Type + default: shield_call + violation: + $ref: '#/components/schemas/SafetyViolation' + type: object + required: + - turn_id + - step_id + - violation + title: ShieldCallStep + description: "A shield call step in an agent turn.\n\n:param violation: The violation from the shield call." + StopReason: + type: string + enum: + - end_of_turn + - end_of_message + - out_of_tokens + title: StopReason + StringType: + properties: + type: + type: string + const: string + title: Type + default: string + type: object + title: StringType + description: "Parameter type for string values.\n\n:param type: Discriminator type. Always \"string\"" + SystemMessage: + properties: + role: + type: string + const: system + title: Role + default: system + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + type: object + required: + - content + title: SystemMessage + description: "A system message providing instructions or context to the model.\n\n:param role: Must be \"system\" to identify this as a system message\n:param content: The content of the \"system prompt\". If multiple system messages are provided, they are concatenated. The underlying Llama Stack code may also add other system messages (for example, for formatting tool definitions)." + SystemMessageBehavior: + type: string + enum: + - append + - replace + title: SystemMessageBehavior + description: "Config for how to override the default system prompt.\n\n:cvar append: Appends the provided system message to the default system prompt:\n https://www.llama.com/docs/model-cards-and-prompt-formats/llama3_2/#-function-definitions-in-the-system-prompt-\n:cvar replace: Replaces the default system prompt with the provided system message. The system message can include the string\n '{{function_definitions}}' to indicate where the function definitions should be inserted." + TextContentItem: + properties: + type: + type: string + const: text + title: Type + default: text + text: + type: string + title: Text + type: object + required: + - text + title: TextContentItem + description: "A text content item\n\n:param type: Discriminator type of the content item. Always \"text\"\n:param text: Text content" + ToolCall: + properties: + call_id: + type: string + title: Call Id + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + arguments: + type: string + title: Arguments + type: object + required: + - call_id + - tool_name + - arguments + title: ToolCall + ToolChoice: + type: string + enum: + - auto + - required + - none + title: ToolChoice + description: "Whether tool use is required or automatic. This is a hint to the model which may not be followed. It depends on the Instruction Following capabilities of the model.\n\n:cvar auto: The model may use tools if it determines that is appropriate.\n:cvar required: The model must use tools.\n:cvar none: The model must not use tools." + ToolConfig: + properties: + tool_choice: + anyOf: + - $ref: '#/components/schemas/ToolChoice' + - type: string + title: Tool Choice + default: auto + tool_prompt_format: + $ref: '#/components/schemas/ToolPromptFormat' + system_message_behavior: + default: append + $ref: '#/components/schemas/SystemMessageBehavior' + type: object + title: ToolConfig + description: "Configuration for tool use.\n\n:param tool_choice: (Optional) Whether tool use is automatic, required, or none. Can also specify a tool name to use a specific tool. Defaults to ToolChoice.auto.\n:param tool_prompt_format: (Optional) Instructs the model how to format tool calls. By default, Llama Stack will attempt to use a format that is best adapted to the model.\n - `ToolPromptFormat.json`: The tool calls are formatted as a JSON object.\n - `ToolPromptFormat.function_tag`: The tool calls are enclosed in a tag.\n - `ToolPromptFormat.python_list`: The tool calls are output as Python syntax -- a list of function calls.\n:param system_message_behavior: (Optional) Config for how to override the default system prompt.\n - `SystemMessageBehavior.append`: Appends the provided system message to the default system prompt.\n - `SystemMessageBehavior.replace`: Replaces the default system prompt with the provided system message. The system message can include the string\n '{{function_definitions}}' to indicate where the function definitions should be inserted." + ToolDef: + properties: + toolgroup_id: + title: Toolgroup Id + type: string + name: + type: string + title: Name + description: + title: Description + type: string + input_schema: + title: Input Schema + additionalProperties: true + type: object + output_schema: + title: Output Schema + additionalProperties: true + type: object + metadata: + title: Metadata + additionalProperties: true + type: object + type: object + required: + - name + title: ToolDef + description: "Tool definition used in runtime contexts.\n\n:param name: Name of the tool\n:param description: (Optional) Human-readable description of what the tool does\n:param input_schema: (Optional) JSON Schema for tool inputs (MCP inputSchema)\n:param output_schema: (Optional) JSON Schema for tool outputs (MCP outputSchema)\n:param metadata: (Optional) Additional metadata about the tool\n:param toolgroup_id: (Optional) ID of the tool group this tool belongs to" + ToolExecutionStep-Output: + properties: + turn_id: + type: string + title: Turn Id + step_id: + type: string + title: Step Id + started_at: + title: Started At + type: string + format: date-time + completed_at: + title: Completed At + type: string + format: date-time + step_type: + type: string + const: tool_execution + title: Step Type + default: tool_execution + tool_calls: + items: + $ref: '#/components/schemas/ToolCall' + type: array + title: Tool Calls + tool_responses: + items: + $ref: '#/components/schemas/ToolResponse-Output' + type: array + title: Tool Responses + type: object + required: + - turn_id + - step_id + - tool_calls + - tool_responses + title: ToolExecutionStep + description: "A tool execution step in an agent turn.\n\n:param tool_calls: The tool calls to execute.\n:param tool_responses: The tool responses from the tool calls." + ToolGroup: + properties: + identifier: + type: string + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: + title: Provider Resource Id + description: Unique identifier for this resource in the provider + type: string + provider_id: + type: string + title: Provider Id + description: ID of the provider that owns this resource + type: + type: string + const: tool_group + title: Type + default: tool_group + mcp_endpoint: + $ref: '#/components/schemas/URL' + args: + title: Args + additionalProperties: true + type: object + type: object + required: + - identifier + - provider_id + title: ToolGroup + description: "A group of related tools managed together.\n\n:param type: Type of resource, always 'tool_group'\n:param mcp_endpoint: (Optional) Model Context Protocol endpoint for remote tools\n:param args: (Optional) Additional arguments for the tool group" + ToolInvocationResult: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + error_message: + title: Error Message + type: string + error_code: + title: Error Code + type: integer + metadata: + title: Metadata + additionalProperties: true + type: object + type: object + title: ToolInvocationResult + description: "Result of a tool invocation.\n\n:param content: (Optional) The output content from the tool execution\n:param error_message: (Optional) Error message if the tool execution failed\n:param error_code: (Optional) Numeric error code if the tool execution failed\n:param metadata: (Optional) Additional metadata about the tool execution" + ToolPromptFormat: + type: string + enum: + - json + - function_tag + - python_list + title: ToolPromptFormat + description: "Prompt format for calling custom / zero shot tools.\n\n:cvar json: JSON format for calling tools. It takes the form:\n {\n \"type\": \"function\",\n \"function\" : {\n \"name\": \"function_name\",\n \"description\": \"function_description\",\n \"parameters\": {...}\n }\n }\n:cvar function_tag: Function tag format, pseudo-XML. This looks like:\n (parameters)\n\n:cvar python_list: Python list. The output is a valid Python expression that can be\n evaluated to a list. Each element in the list is a function call. Example:\n [\"function_name(param1, param2)\", \"function_name(param1, param2)\"]" + ToolResponse-Input: + properties: + call_id: + type: string + title: Call Id + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + metadata: + title: Metadata + additionalProperties: true + type: object + type: object + required: + - call_id + - tool_name + - content + title: ToolResponse + description: "Response from a tool invocation.\n\n:param call_id: Unique identifier for the tool call this response is for\n:param tool_name: Name of the tool that was invoked\n:param content: The response content from the tool\n:param metadata: (Optional) Additional metadata about the tool response" + ToolResponse-Output: + properties: + call_id: + type: string + title: Call Id + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + metadata: + title: Metadata + additionalProperties: true + type: object + type: object + required: + - call_id + - tool_name + - content + title: ToolResponse + description: "Response from a tool invocation.\n\n:param call_id: Unique identifier for the tool call this response is for\n:param tool_name: Name of the tool that was invoked\n:param content: The response content from the tool\n:param metadata: (Optional) Additional metadata about the tool response" + ToolResponseMessage-Output: + properties: + role: + type: string + const: tool + title: Role + default: tool + call_id: + type: string + title: Call Id + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + type: object + required: + - call_id + - content + title: ToolResponseMessage + description: "A message representing the result of a tool invocation.\n\n:param role: Must be \"tool\" to identify this as a tool response\n:param call_id: Unique identifier for the tool call this response is for\n:param content: The response content from the tool" + TopKSamplingStrategy: + properties: + type: + type: string + const: top_k + title: Type + default: top_k + top_k: + type: integer + minimum: 1.0 + title: Top K + type: object + required: + - top_k + title: TopKSamplingStrategy + description: "Top-k sampling strategy that restricts sampling to the k most likely tokens.\n\n:param type: Must be \"top_k\" to identify this sampling strategy\n:param top_k: Number of top tokens to consider for sampling. Must be at least 1" + TopPSamplingStrategy: + properties: + type: + type: string + const: top_p + title: Type + default: top_p + temperature: + title: Temperature + type: number + minimum: 0.0 + top_p: + title: Top P + default: 0.95 + type: number + type: object + required: + - temperature + title: TopPSamplingStrategy + description: "Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p.\n\n:param type: Must be \"top_p\" to identify this sampling strategy\n:param temperature: Controls randomness in sampling. Higher values increase randomness\n:param top_p: Cumulative probability threshold for nucleus sampling. Defaults to 0.95" + TrainingConfig: + properties: + n_epochs: + type: integer + title: N Epochs + max_steps_per_epoch: + type: integer + title: Max Steps Per Epoch + default: 1 + gradient_accumulation_steps: + type: integer + title: Gradient Accumulation Steps + default: 1 + max_validation_steps: + title: Max Validation Steps + default: 1 + type: integer + data_config: + $ref: '#/components/schemas/DataConfig' + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + efficiency_config: + $ref: '#/components/schemas/EfficiencyConfig' + dtype: + title: Dtype + default: bf16 + type: string + type: object + required: + - n_epochs + title: TrainingConfig + description: "Comprehensive configuration for the training process.\n\n:param n_epochs: Number of training epochs to run\n:param max_steps_per_epoch: Maximum number of steps to run per epoch\n:param gradient_accumulation_steps: Number of steps to accumulate gradients before updating\n:param max_validation_steps: (Optional) Maximum number of validation steps per epoch\n:param data_config: (Optional) Configuration for data loading and formatting\n:param optimizer_config: (Optional) Configuration for the optimization algorithm\n:param efficiency_config: (Optional) Configuration for memory and compute optimizations\n:param dtype: (Optional) Data type for model parameters (bf16, fp16, fp32)" + Turn: + properties: + turn_id: + type: string + title: Turn Id + session_id: + type: string + title: Session Id + input_messages: + items: + anyOf: + - $ref: '#/components/schemas/UserMessage-Output' + - $ref: '#/components/schemas/ToolResponseMessage-Output' + type: array + title: Input Messages + steps: + items: + oneOf: + - $ref: '#/components/schemas/InferenceStep-Output' + - $ref: '#/components/schemas/ToolExecutionStep-Output' + - $ref: '#/components/schemas/ShieldCallStep-Output' + - $ref: '#/components/schemas/MemoryRetrievalStep-Output' + discriminator: + propertyName: step_type + mapping: + inference: '#/components/schemas/InferenceStep-Output' + memory_retrieval: '#/components/schemas/MemoryRetrievalStep-Output' + shield_call: '#/components/schemas/ShieldCallStep-Output' + tool_execution: '#/components/schemas/ToolExecutionStep-Output' + type: array + title: Steps + output_message: + $ref: '#/components/schemas/CompletionMessage-Output' + output_attachments: + title: Output Attachments + items: + $ref: '#/components/schemas/Attachment-Output' + type: array + started_at: + type: string + format: date-time + title: Started At + completed_at: + title: Completed At + type: string + format: date-time + type: object + required: + - turn_id + - session_id + - input_messages + - steps + - output_message + - started_at + title: Turn + description: "A single turn in an interaction with an Agentic System.\n\n:param turn_id: Unique identifier for the turn within a session\n:param session_id: Unique identifier for the conversation session\n:param input_messages: List of messages that initiated this turn\n:param steps: Ordered list of processing steps executed during this turn\n:param output_message: The model's generated response containing content and metadata\n:param output_attachments: (Optional) Files or media attached to the agent's response\n:param started_at: Timestamp when the turn began\n:param completed_at: (Optional) Timestamp when the turn finished, if completed" + URIDataSource: + properties: + type: + type: string + const: uri + title: Type + default: uri + uri: + type: string + title: Uri + type: object + required: + - uri + title: URIDataSource + description: "A dataset that can be obtained from a URI.\n:param uri: The dataset can be obtained from a URI. E.g.\n - \"https://mywebsite.com/mydata.jsonl\"\n - \"lsfs://mydata.jsonl\"\n - \"data:csv;base64,{base64_content}\"" + URL: + properties: + uri: + type: string + title: Uri + type: object + required: + - uri + title: URL + description: "A URL reference to external content.\n\n:param uri: The URL string pointing to the resource" + UnionType: + properties: + type: + type: string + const: union + title: Type + default: union + type: object + title: UnionType + description: "Parameter type for union values.\n\n:param type: Discriminator type. Always \"union\"" + UserMessage-Input: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + context: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + type: array + title: Context + type: object + required: + - content + title: UserMessage + description: "A message from the user in a chat conversation.\n\n:param role: Must be \"user\" to identify this as a user message\n:param content: The content of the message, which can include text and other media\n:param context: (Optional) This field is used internally by Llama Stack to pass RAG context. This field may be removed in the API in the future." + UserMessage-Output: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + context: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Context + type: object + required: + - content + title: UserMessage + description: "A message from the user in a chat conversation.\n\n:param role: Must be \"user\" to identify this as a user message\n:param content: The content of the message, which can include text and other media\n:param context: (Optional) This field is used internally by Llama Stack to pass RAG context. This field may be removed in the API in the future." + VectorStoreChunkingStrategyAuto: + properties: + type: + type: string + const: auto + title: Type + default: auto + type: object + title: VectorStoreChunkingStrategyAuto + description: "Automatic chunking strategy for vector store files.\n\n:param type: Strategy type, always \"auto\" for automatic chunking" + VectorStoreChunkingStrategyStatic: + properties: + type: + type: string + const: static + title: Type + default: static + static: + $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' + type: object + required: + - static + title: VectorStoreChunkingStrategyStatic + description: "Static chunking strategy with configurable parameters.\n\n:param type: Strategy type, always \"static\" for static chunking\n:param static: Configuration parameters for the static chunking strategy" + VectorStoreChunkingStrategyStaticConfig: + properties: + chunk_overlap_tokens: + type: integer + title: Chunk Overlap Tokens + default: 400 + max_chunk_size_tokens: + type: integer + maximum: 4096.0 + minimum: 100.0 + title: Max Chunk Size Tokens + default: 800 + type: object + title: VectorStoreChunkingStrategyStaticConfig + description: "Configuration for static chunking strategy.\n\n:param chunk_overlap_tokens: Number of tokens to overlap between adjacent chunks\n:param max_chunk_size_tokens: Maximum number of tokens per chunk, must be between 100 and 4096" + VectorStoreContent: + properties: + type: + type: string + const: text + title: Type + text: + type: string + title: Text + type: object + required: + - type + - text + title: VectorStoreContent + description: "Content item from a vector store file or search result.\n\n:param type: Content type, currently only \"text\" is supported\n:param text: The actual text content" + VectorStoreFileBatchObject: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store.file_batch + created_at: + type: integer + title: Created At + vector_store_id: + type: string + title: Vector Store Id + status: + anyOf: + - type: string + const: completed + - type: string + const: in_progress + - type: string + const: cancelled + - type: string + const: failed + title: Status + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + type: object + required: + - id + - created_at + - vector_store_id + - status + - file_counts + title: VectorStoreFileBatchObject + description: "OpenAI Vector Store File Batch object.\n\n:param id: Unique identifier for the file batch\n:param object: Object type identifier, always \"vector_store.file_batch\"\n:param created_at: Timestamp when the file batch was created\n:param vector_store_id: ID of the vector store containing the file batch\n:param status: Current processing status of the file batch\n:param file_counts: File processing status counts for the batch" + VectorStoreFileCounts: + properties: + completed: + type: integer + title: Completed + cancelled: + type: integer + title: Cancelled + failed: + type: integer + title: Failed + in_progress: + type: integer + title: In Progress + total: + type: integer + title: Total + type: object + required: + - completed + - cancelled + - failed + - in_progress + - total + title: VectorStoreFileCounts + description: "File processing status counts for a vector store.\n\n:param completed: Number of files that have been successfully processed\n:param cancelled: Number of files that had their processing cancelled\n:param failed: Number of files that failed to process\n:param in_progress: Number of files currently being processed\n:param total: Total number of files in the vector store" + VectorStoreFileLastError: + properties: + code: + anyOf: + - type: string + const: server_error + - type: string + const: rate_limit_exceeded + title: Code + message: + type: string + title: Message + type: object + required: + - code + - message + title: VectorStoreFileLastError + description: "Error information for failed vector store file processing.\n\n:param code: Error code indicating the type of failure\n:param message: Human-readable error message describing the failure" + VectorStoreFileObject: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store.file + attributes: + additionalProperties: true + type: object + title: Attributes + chunking_strategy: + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: Chunking Strategy + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + created_at: + type: integer + title: Created At + last_error: + $ref: '#/components/schemas/VectorStoreFileLastError' + status: + anyOf: + - type: string + const: completed + - type: string + const: in_progress + - type: string + const: cancelled + - type: string + const: failed + title: Status + usage_bytes: + type: integer + title: Usage Bytes + default: 0 + vector_store_id: + type: string + title: Vector Store Id + type: object + required: + - id + - chunking_strategy + - created_at + - status + - vector_store_id + title: VectorStoreFileObject + description: "OpenAI Vector Store File object.\n\n:param id: Unique identifier for the file\n:param object: Object type identifier, always \"vector_store.file\"\n:param attributes: Key-value attributes associated with the file\n:param chunking_strategy: Strategy used for splitting the file into chunks\n:param created_at: Timestamp when the file was added to the vector store\n:param last_error: (Optional) Error information if file processing failed\n:param status: Current processing status of the file\n:param usage_bytes: Storage space used by this file in bytes\n:param vector_store_id: ID of the vector store containing this file" + VectorStoreObject: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store + created_at: + type: integer + title: Created At + name: + title: Name + type: string + usage_bytes: + type: integer + title: Usage Bytes + default: 0 + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + status: + type: string + title: Status + default: completed + expires_after: + title: Expires After + additionalProperties: true + type: object + expires_at: + title: Expires At + type: integer + last_active_at: + title: Last Active At + type: integer + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - id + - created_at + - file_counts + title: VectorStoreObject + description: "OpenAI Vector Store object.\n\n:param id: Unique identifier for the vector store\n:param object: Object type identifier, always \"vector_store\"\n:param created_at: Timestamp when the vector store was created\n:param name: (Optional) Name of the vector store\n:param usage_bytes: Storage space used by the vector store in bytes\n:param file_counts: File processing status counts for the vector store\n:param status: Current status of the vector store\n:param expires_after: (Optional) Expiration policy for the vector store\n:param expires_at: (Optional) Timestamp when the vector store will expire\n:param last_active_at: (Optional) Timestamp of last activity on the vector store\n:param metadata: Set of key-value pairs that can be attached to the vector store" + VectorStoreSearchResponse: + properties: + file_id: + type: string + title: File Id + filename: + type: string + title: Filename + score: + type: number + title: Score + attributes: + title: Attributes + additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + type: object + content: + items: + $ref: '#/components/schemas/VectorStoreContent' + type: array + title: Content + type: object + required: + - file_id + - filename + - score + - content + title: VectorStoreSearchResponse + description: "Response from searching a vector store.\n\n:param file_id: Unique identifier of the file containing the result\n:param filename: Name of the file containing the result\n:param score: Relevance score for this search result\n:param attributes: (Optional) Key-value attributes associated with the file\n:param content: List of content items matching the search query" + VectorStoreSearchResponsePage: + properties: + object: + type: string + title: Object + default: vector_store.search_results.page + search_query: + type: string + title: Search Query + data: + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + type: array + title: Data + has_more: + type: boolean + title: Has More + default: false + next_page: + title: Next Page + type: string + type: object + required: + - search_query + - data + title: VectorStoreSearchResponsePage + description: "Paginated response from searching a vector store.\n\n:param object: Object type identifier for the search results page\n:param search_query: The original search query that was executed\n:param data: List of search result objects\n:param has_more: Whether there are more results available beyond this page\n:param next_page: (Optional) Token for retrieving the next page of results" + VersionInfo: + properties: + version: + type: string + title: Version + type: object + required: + - version + title: VersionInfo + description: "Version information for the service.\n\n:param version: Version number of the service" + ViolationLevel: + type: string + enum: + - info + - warn + - error + title: ViolationLevel + description: "Severity level of a safety violation.\n\n:cvar INFO: Informational level violation that does not require action\n:cvar WARN: Warning level violation that suggests caution but allows continuation\n:cvar ERROR: Error level violation that requires blocking or intervention" + WeightedRanker: + properties: + type: + type: string + const: weighted + title: Type + default: weighted + alpha: + type: number + maximum: 1.0 + minimum: 0.0 + title: Alpha + description: Weight factor between 0 and 1. 0 means only keyword scores, 1 means only vector scores. + default: 0.5 + type: object + title: WeightedRanker + description: "Weighted ranker configuration that combines vector and keyword scores.\n\n:param type: The type of ranker, always \"weighted\"\n:param alpha: Weight factor between 0 and 1.\n 0 means only use keyword scores,\n 1 means only use vector scores,\n values in between blend both scores." + _URLOrData: + properties: + url: + $ref: '#/components/schemas/URL' + data: + contentEncoding: base64 + title: Data + type: string + type: object + title: _URLOrData + description: "A URL or a base64 encoded string\n\n:param url: A URL of the image or data URL in the format of data:image/{type};base64,{data}. Note that URL could have length limits.\n:param data: base64 encoded image data as string" + __main_____agents_agent_id_session_Request: + properties: + agent_id: + type: string + title: Agent Id + session_name: + type: string + title: Session Name + type: object + required: + - agent_id + - session_name + title: _agents_agent_id_session_Request + __main_____agents_agent_id_session_session_id_turn_Request: + properties: + agent_id: + type: string + title: Agent Id + session_id: + type: string + title: Session Id + messages: + $ref: '#/components/schemas/UserMessage-Input' + stream: + type: boolean + title: Stream + default: false + documents: + $ref: '#/components/schemas/Document' + toolgroups: + anyOf: + - type: string + - $ref: '#/components/schemas/AgentToolGroupWithArgs' + title: Toolgroups + tool_config: + $ref: '#/components/schemas/ToolConfig' + type: object + required: + - agent_id + - session_id + - messages + - documents + - toolgroups + - tool_config + title: _agents_agent_id_session_session_id_turn_Request + __main_____agents_agent_id_session_session_id_turn_turn_id_resume_Request: + properties: + agent_id: + type: string + title: Agent Id + session_id: + type: string + title: Session Id + turn_id: + type: string + title: Turn Id + tool_responses: + $ref: '#/components/schemas/ToolResponse-Input' + stream: + type: boolean + title: Stream + default: false + type: object + required: + - agent_id + - session_id + - turn_id + - tool_responses + title: _agents_agent_id_session_session_id_turn_turn_id_resume_Request + __main_____datasets_Request: + properties: + purpose: + $ref: '#/components/schemas/DatasetPurpose' + metadata: + type: string + title: Metadata + dataset_id: + type: string + title: Dataset Id + type: object + required: + - purpose + - metadata + - dataset_id + title: _datasets_Request + _batches_Request: + properties: + input_file_id: + type: string + title: Input File Id + endpoint: + type: string + title: Endpoint + completion_window: + type: string + title: Completion Window + metadata: + type: string + title: Metadata + idempotency_key: + type: string + title: Idempotency Key + type: object + required: + - input_file_id + - endpoint + - completion_window + - metadata + - idempotency_key + title: _batches_Request + _batches_batch_id_cancel_Request: + properties: + batch_id: + type: string + title: Batch Id + type: object + required: + - batch_id + title: _batches_batch_id_cancel_Request + _conversations_Request: + properties: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: Items + discriminator: + propertyName: type + mapping: + file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + function_call_output: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + mcp_approval_response: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + message: '#/components/schemas/OpenAIResponseMessage-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + metadata: + type: string + title: Metadata + type: object + required: + - items + - metadata + title: _conversations_Request + _conversations_conversation_id_Request: + properties: + conversation_id: + type: string + title: Conversation Id + metadata: + type: string + title: Metadata + type: object + required: + - conversation_id + - metadata + title: _conversations_conversation_id_Request + _conversations_conversation_id_items_Request: + properties: + conversation_id: + type: string + title: Conversation Id + items: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: Items + type: object + required: + - conversation_id + - items + title: _conversations_conversation_id_items_Request + _inference_rerank_Request: + properties: + model: + type: string + title: Model + query: + type: string + title: Query + items: + type: string + title: Items + max_num_results: + type: integer + title: Max Num Results + type: object + required: + - model + - query + - items + - max_num_results + title: _inference_rerank_Request + _models_Request: + properties: + model_id: + type: string + title: Model Id + provider_model_id: + type: string + title: Provider Model Id + provider_id: + type: string + title: Provider Id + metadata: + type: string + title: Metadata + model_type: + $ref: '#/components/schemas/ModelType' + type: object + required: + - model_id + - provider_model_id + - provider_id + - metadata + - model_type + title: _models_Request + _moderations_Request: + properties: + input: + type: string + title: Input + model: + type: string + title: Model + type: object + required: + - input + - model + title: _moderations_Request + _prompts_Request: + properties: + prompt: + type: string + title: Prompt + variables: + type: string + title: Variables + type: object + required: + - prompt + - variables + title: _prompts_Request + _prompts_prompt_id_Request: + properties: + prompt_id: + type: string + title: Prompt Id + prompt: + type: string + title: Prompt + version: + type: integer + title: Version + variables: + type: string + title: Variables + set_as_default: + type: boolean + title: Set As Default + default: true + type: object + required: + - prompt_id + - prompt + - version + - variables + title: _prompts_prompt_id_Request + _prompts_prompt_id_set_default_version_Request: + properties: + prompt_id: + type: string + title: Prompt Id + version: + type: integer + title: Version + type: object + required: + - prompt_id + - version + title: _prompts_prompt_id_set_default_version_Request + _responses_Request: + properties: + input: + type: string + title: Input + model: + type: string + title: Model + prompt: + $ref: '#/components/schemas/OpenAIResponsePrompt' + instructions: + type: string + title: Instructions + previous_response_id: + type: string + title: Previous Response Id + conversation: + type: string + title: Conversation + store: + type: boolean + title: Store + default: true + stream: + type: boolean + title: Stream + default: false + temperature: + type: number + title: Temperature + text: + $ref: '#/components/schemas/OpenAIResponseText' + tools: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: Tools + discriminator: + propertyName: type + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + include: + type: string + title: Include + max_infer_iters: + type: integer + title: Max Infer Iters + default: 10 + type: object + required: + - input + - model + - prompt + - instructions + - previous_response_id + - conversation + - temperature + - text + - tools + - include + title: _responses_Request + _scoring_score_Request: + properties: + input_rows: + type: string + title: Input Rows + scoring_functions: + type: string + title: Scoring Functions + type: object + required: + - input_rows + - scoring_functions + title: _scoring_score_Request + _scoring_score_batch_Request: + properties: + dataset_id: + type: string + title: Dataset Id + scoring_functions: + type: string + title: Scoring Functions + save_results_dataset: + type: boolean + title: Save Results Dataset + default: false + type: object + required: + - dataset_id + - scoring_functions + title: _scoring_score_batch_Request + _shields_Request: + properties: + shield_id: + type: string + title: Shield Id + provider_shield_id: + type: string + title: Provider Shield Id + provider_id: + type: string + title: Provider Id + params: + type: string + title: Params + type: object + required: + - shield_id + - provider_shield_id + - provider_id + - params + title: _shields_Request + _tool_runtime_invoke_Request: + properties: + tool_name: + type: string + title: Tool Name + kwargs: + type: string + title: Kwargs + type: object + required: + - tool_name + - kwargs + title: _tool_runtime_invoke_Request + _tool_runtime_rag_tool_query_Request: + properties: + content: + type: string + title: Content + vector_store_ids: + type: string + title: Vector Store Ids + query_config: + $ref: '#/components/schemas/RAGQueryConfig' + type: object + required: + - content + - vector_store_ids + - query_config + title: _tool_runtime_rag_tool_query_Request + _vector_io_query_Request: + properties: + vector_store_id: + type: string + title: Vector Store Id + query: + type: string + title: Query + params: + type: string + title: Params + type: object + required: + - vector_store_id + - query + - params + title: _vector_io_query_Request + _vector_stores_vector_store_id_Request: + properties: + vector_store_id: + type: string + title: Vector Store Id + name: + type: string + title: Name + expires_after: + type: string + title: Expires After + metadata: + type: string + title: Metadata + type: object + required: + - vector_store_id + - name + - expires_after + - metadata + title: _vector_stores_vector_store_id_Request + _vector_stores_vector_store_id_file_batches_batch_id_cancel_Request: + properties: + batch_id: + type: string + title: Batch Id + vector_store_id: + type: string + title: Vector Store Id + type: object + required: + - batch_id + - vector_store_id + title: _vector_stores_vector_store_id_file_batches_batch_id_cancel_Request + _vector_stores_vector_store_id_files_Request: + properties: + vector_store_id: + type: string + title: Vector Store Id + file_id: + type: string + title: File Id + attributes: + type: string + title: Attributes + chunking_strategy: + anyOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: Chunking Strategy + type: object + required: + - vector_store_id + - file_id + - attributes + - chunking_strategy + title: _vector_stores_vector_store_id_files_Request + _vector_stores_vector_store_id_files_file_id_Request: + properties: + vector_store_id: + type: string + title: Vector Store Id + file_id: + type: string + title: File Id + attributes: + type: string + title: Attributes + type: object + required: + - vector_store_id + - file_id + - attributes + title: _vector_stores_vector_store_id_files_file_id_Request + _vector_stores_vector_store_id_search_Request: + properties: + vector_store_id: + type: string + title: Vector Store Id + query: + type: string + title: Query + filters: + type: string + title: Filters + max_num_results: + type: integer + title: Max Num Results + default: 10 + ranking_options: + $ref: '#/components/schemas/SearchRankingOptions' + rewrite_query: + type: boolean + title: Rewrite Query + default: false + search_mode: + type: string + title: Search Mode + default: vector + type: object + required: + - vector_store_id + - query + - filters + - ranking_options + title: _vector_stores_vector_store_id_search_Request Error: - description: >- - Error response from the API. Roughly follows RFC 7807. - - - :param status: HTTP status code - - :param title: Error title, a short summary of the error which is invariant - for an error type - - :param detail: Error detail, a longer human-readable description of the error - - :param instance: (Optional) A URL which can be used to retrieve more information - about the specific occurrence of the error + description: "Error response from the API. Roughly follows RFC 7807.\n\n:param status: HTTP status code\n:param title: Error title, a short summary of the error which is invariant for an error type\n:param detail: Error detail, a longer human-readable description of the error\n:param instance: (Optional) A URL which can be used to retrieve more information about the specific occurrence of the error" properties: status: title: Status @@ -4954,982 +13198,172 @@ components: title: Detail type: string instance: - anyOf: - - type: string - - type: 'null' title: Instance + type: string + nullable: true required: - - status - - title - - detail + - status + - title + - detail title: Error - description: >- - Error response from the API. Roughly follows RFC 7807. - ListBatchesResponse: type: object + Agent: + description: "An agent instance with configuration and metadata.\n\n:param agent_id: Unique identifier for the agent\n:param agent_config: Configuration settings for the agent\n:param created_at: Timestamp when the agent was created" properties: - object: - type: string - const: list - default: list - data: - type: array - items: - type: object - properties: - id: - type: string - completion_window: - type: string - created_at: - type: integer - endpoint: - type: string - input_file_id: - type: string - object: - type: string - const: batch - status: - type: string - enum: - - validating - - failed - - in_progress - - finalizing - - completed - - expired - - cancelling - - cancelled - cancelled_at: - type: integer - cancelling_at: - type: integer - completed_at: - type: integer - error_file_id: - type: string - errors: - type: object - properties: - data: - type: array - items: - type: object - properties: - code: - type: string - line: - type: integer - message: - type: string - param: - type: string - additionalProperties: false - title: BatchError - object: - type: string - additionalProperties: false - title: Errors - expired_at: - type: integer - expires_at: - type: integer - failed_at: - type: integer - finalizing_at: - type: integer - in_progress_at: - type: integer - metadata: - type: object - additionalProperties: - type: string - model: - type: string - output_file_id: - type: string - request_counts: - type: object - properties: - completed: - type: integer - failed: - type: integer - total: - type: integer - additionalProperties: false - required: - - completed - - failed - - total - title: BatchRequestCounts - usage: - type: object - properties: - input_tokens: - type: integer - input_tokens_details: - type: object - properties: - cached_tokens: - type: integer - additionalProperties: false - required: - - cached_tokens - title: InputTokensDetails - output_tokens: - type: integer - output_tokens_details: - type: object - properties: - reasoning_tokens: - type: integer - additionalProperties: false - required: - - reasoning_tokens - title: OutputTokensDetails - total_tokens: - type: integer - additionalProperties: false - required: - - input_tokens - - input_tokens_details - - output_tokens - - output_tokens_details - - total_tokens - title: BatchUsage - additionalProperties: false - required: - - id - - completion_window - - created_at - - endpoint - - input_file_id - - object - - status - title: Batch - first_id: - type: string - last_id: - type: string - has_more: - type: boolean - default: false - additionalProperties: false - required: - - object - - data - - has_more - title: ListBatchesResponse - description: >- - Response containing a list of batch objects. - CreateBatchRequest: - type: object - properties: - input_file_id: - type: string - description: >- - The ID of an uploaded file containing requests for the batch. - endpoint: - type: string - description: >- - The endpoint to be used for all requests in the batch. - completion_window: - type: string - const: 24h - description: >- - The time window within which the batch should be processed. - metadata: - type: object - additionalProperties: - type: string - description: Optional metadata for the batch. - idempotency_key: - type: string - description: >- - Optional idempotency key. When provided, enables idempotent behavior. - additionalProperties: false - required: - - input_file_id - - endpoint - - completion_window - title: CreateBatchRequest - Batch: - type: object - properties: - id: - type: string - completion_window: + agent_id: + title: Agent Id type: string + agent_config: + $ref: '#/components/schemas/AgentConfig' created_at: - type: integer - endpoint: + format: date-time + title: Created At type: string - input_file_id: - type: string - object: - type: string - const: batch - status: - type: string - enum: - - validating - - failed - - in_progress - - finalizing - - completed - - expired - - cancelling - - cancelled - cancelled_at: - type: integer - cancelling_at: - type: integer - completed_at: - type: integer - error_file_id: - type: string - errors: - type: object - properties: - data: - type: array - items: - type: object - properties: - code: - type: string - line: - type: integer - message: - type: string - param: - type: string - additionalProperties: false - title: BatchError - object: - type: string - additionalProperties: false - title: Errors - expired_at: - type: integer - expires_at: - type: integer - failed_at: - type: integer - finalizing_at: - type: integer - in_progress_at: - type: integer - metadata: - type: object - additionalProperties: - type: string - model: - type: string - output_file_id: - type: string - request_counts: - type: object - properties: - completed: - type: integer - failed: - type: integer - total: - type: integer - additionalProperties: false - required: - - completed - - failed - - total - title: BatchRequestCounts - usage: - type: object - properties: - input_tokens: - type: integer - input_tokens_details: - type: object - properties: - cached_tokens: - type: integer - additionalProperties: false - required: - - cached_tokens - title: InputTokensDetails - output_tokens: - type: integer - output_tokens_details: - type: object - properties: - reasoning_tokens: - type: integer - additionalProperties: false - required: - - reasoning_tokens - title: OutputTokensDetails - total_tokens: - type: integer - additionalProperties: false - required: - - input_tokens - - input_tokens_details - - output_tokens - - output_tokens_details - - total_tokens - title: BatchUsage - additionalProperties: false required: - - id - - completion_window - - created_at - - endpoint - - input_file_id - - object - - status - title: Batch - Order: - type: string - enum: - - asc - - desc - title: Order - description: Sort order for paginated responses. - ListOpenAIChatCompletionResponse: + - agent_id + - agent_config + - created_at + title: Agent type: object - Order: + AgentStepResponse: + description: "Response containing details of a specific agent step.\n\n:param step: The complete step data and execution details" + properties: + step: + discriminator: + mapping: + inference: '#/$defs/InferenceStep' + memory_retrieval: '#/$defs/MemoryRetrievalStep' + shield_call: '#/$defs/ShieldCallStep' + tool_execution: '#/$defs/ToolExecutionStep' + propertyName: step_type + oneOf: + - $ref: '#/components/schemas/InferenceStep' + - $ref: '#/components/schemas/ToolExecutionStep' + - $ref: '#/components/schemas/ShieldCallStep' + - $ref: '#/components/schemas/MemoryRetrievalStep' + title: Step + required: + - step + title: AgentStepResponse type: object - ListOpenAIChatCompletionResponse: - $defs: - OpenAIAssistantMessageParam: - description: >- - A message containing the model's (assistant) response in an OpenAI-compatible - chat completion request. - - - :param role: Must be "assistant" to identify this as the model's response - - :param content: The content of the model's response - - :param name: (Optional) The name of the assistant message participant. - - :param tool_calls: List of tool calls. Each tool call is an OpenAIChatCompletionToolCall - object. - properties: - role: - const: assistant - default: assistant - title: Role - type: string - content: - anyOf: - - type: string - - items: - $ref: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - type: array - - type: 'null' - title: Content - name: - anyOf: - - type: string - - type: 'null' - title: Name - tool_calls: - anyOf: - - items: - $ref: '#/$defs/OpenAIChatCompletionToolCall' - type: array - - type: 'null' - title: Tool Calls - title: OpenAIAssistantMessageParam - type: object - "OpenAIChatCompletionContentPartImageParam": - description: >- - Image content part for OpenAI-compatible chat completion messages. - - - :param type: Must be "image_url" to identify this as image content - - :param image_url: Image URL specification and processing details - properties: - type: - const: image_url - default: image_url - title: Type - type: string - image_url: - $ref: '#/$defs/OpenAIImageURL' - required: - - image_url - title: >- - OpenAIChatCompletionContentPartImageParam - type: object - OpenAIChatCompletionContentPartTextParam: - description: >- - Text content part for OpenAI-compatible chat completion messages. - - - :param type: Must be "text" to identify this as text content - - :param text: The text content of the message - properties: - type: - const: text - default: text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: OpenAIChatCompletionContentPartTextParam - type: object - OpenAIChatCompletionToolCall: - description: >- - Tool call specification for OpenAI-compatible chat completion responses. - - - :param index: (Optional) Index of the tool call in the list - - :param id: (Optional) Unique identifier for the tool call - - :param type: Must be "function" to identify this as a function call - - :param function: (Optional) Function call details - properties: - index: - anyOf: - - type: integer - - type: 'null' - title: Index - id: - anyOf: - - type: string - - type: 'null' - title: Id - type: - const: function - default: function - title: Type - type: string - function: - anyOf: - - $ref: >- - #/$defs/OpenAIChatCompletionToolCallFunction - - type: 'null' - title: OpenAIChatCompletionToolCall - type: object - OpenAIChatCompletionToolCallFunction: - description: >- - Function call details for OpenAI-compatible tool calls. - - - :param name: (Optional) Name of the function to call - - :param arguments: (Optional) Arguments to pass to the function as a JSON - string - properties: - name: - anyOf: - - type: string - - type: 'null' - title: Name - arguments: - anyOf: - - type: string - - type: 'null' - title: Arguments - title: OpenAIChatCompletionToolCallFunction - type: object - OpenAIChatCompletionUsage: - description: >- - Usage information for OpenAI chat completion. - - - :param prompt_tokens: Number of tokens in the prompt - - :param completion_tokens: Number of tokens in the completion - - :param total_tokens: Total tokens used (prompt + completion) - - :param input_tokens_details: Detailed breakdown of input token usage - - :param output_tokens_details: Detailed breakdown of output token usage - properties: - prompt_tokens: - title: Prompt Tokens - type: integer - completion_tokens: - title: Completion Tokens - type: integer - total_tokens: - title: Total Tokens - type: integer - prompt_tokens_details: - anyOf: - - $ref: >- - #/$defs/OpenAIChatCompletionUsagePromptTokensDetails - - type: 'null' - completion_tokens_details: - anyOf: - - $ref: >- - #/$defs/OpenAIChatCompletionUsageCompletionTokensDetails - - type: 'null' - required: - - prompt_tokens - - completion_tokens - - total_tokens - title: OpenAIChatCompletionUsage - type: object - "OpenAIChatCompletionUsageCompletionTokensDetails": - description: >- - Token details for output tokens in OpenAI chat completion usage. - - - :param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models) - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - title: Reasoning Tokens - title: >- - OpenAIChatCompletionUsageCompletionTokensDetails - type: object - "OpenAIChatCompletionUsagePromptTokensDetails": - description: >- - Token details for prompt tokens in OpenAI chat completion usage. - - - :param cached_tokens: Number of tokens retrieved from cache - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - title: Cached Tokens - title: >- - OpenAIChatCompletionUsagePromptTokensDetails - type: object - OpenAIChoice: - description: >- - A choice from an OpenAI-compatible chat completion response. - - - :param message: The message from the model - - :param finish_reason: The reason the model stopped generating - - :param index: The index of the choice - - :param logprobs: (Optional) The log probabilities for the tokens in the - message - properties: - message: + CompletionMessage: + description: "A message containing the model's (assistant) response in a chat conversation.\n\n:param role: Must be \"assistant\" to identify this as the model's response\n:param content: The content of the model's response\n:param stop_reason: Reason why the model stopped generating. Options are:\n - `StopReason.end_of_turn`: The model finished generating the entire response.\n - `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response.\n - `StopReason.out_of_tokens`: The model ran out of token budget.\n:param tool_calls: List of tool calls. Each tool call is a ToolCall object." + properties: + role: + const: assistant + default: assistant + title: Role + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/$defs/ImageContentItem' + text: '#/$defs/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: discriminator: mapping: - assistant: '#/$defs/OpenAIAssistantMessageParam' - developer: '#/$defs/OpenAIDeveloperMessageParam' - system: '#/$defs/OpenAISystemMessageParam' - tool: '#/$defs/OpenAIToolMessageParam' - user: '#/$defs/OpenAIUserMessageParam' - propertyName: role + image: '#/$defs/ImageContentItem' + text: '#/$defs/TextContentItem' + propertyName: type oneOf: - - $ref: '#/$defs/OpenAIUserMessageParam' - - $ref: '#/$defs/OpenAISystemMessageParam' - - $ref: '#/$defs/OpenAIAssistantMessageParam' - - $ref: '#/$defs/OpenAIToolMessageParam' - - $ref: '#/$defs/OpenAIDeveloperMessageParam' - title: Message - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: - anyOf: - - $ref: '#/$defs/OpenAIChoiceLogprobs' - - type: 'null' - required: - - message - - finish_reason - - index - title: OpenAIChoice - type: object - OpenAIChoiceLogprobs: - description: >- - The log probabilities for the tokens in the message from an OpenAI-compatible - chat completion response. - - - :param content: (Optional) The log probabilities for the tokens in the - message - - :param refusal: (Optional) The log probabilities for the tokens in the - message - properties: - content: - anyOf: - - items: - $ref: '#/$defs/OpenAITokenLogProb' - type: array - - type: 'null' - title: Content - refusal: - anyOf: - - items: - $ref: '#/$defs/OpenAITokenLogProb' - type: array - - type: 'null' - title: Refusal - title: OpenAIChoiceLogprobs - type: object - OpenAICompletionWithInputMessages: - properties: - id: - title: Id - type: string - choices: - items: - $ref: '#/$defs/OpenAIChoice' - title: Choices - type: array - object: - const: chat.completion - default: chat.completion - title: Object - type: string - created: - title: Created - type: integer - model: - title: Model - type: string - usage: - anyOf: - - $ref: '#/$defs/OpenAIChatCompletionUsage' - - type: 'null' - input_messages: - items: - discriminator: - mapping: - assistant: '#/$defs/OpenAIAssistantMessageParam' - developer: '#/$defs/OpenAIDeveloperMessageParam' - system: '#/$defs/OpenAISystemMessageParam' - tool: '#/$defs/OpenAIToolMessageParam' - user: '#/$defs/OpenAIUserMessageParam' - propertyName: role - oneOf: - - $ref: '#/$defs/OpenAIUserMessageParam' - - $ref: '#/$defs/OpenAISystemMessageParam' - - $ref: '#/$defs/OpenAIAssistantMessageParam' - - $ref: '#/$defs/OpenAIToolMessageParam' - - $ref: '#/$defs/OpenAIDeveloperMessageParam' - title: Input Messages - type: array - required: - - id - - choices - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages - type: object - OpenAIDeveloperMessageParam: - description: >- - A message from the developer in an OpenAI-compatible chat completion request. - - - :param role: Must be "developer" to identify this as a developer message - - :param content: The content of the developer message - - :param name: (Optional) The name of the developer message participant. - properties: - role: - const: developer - default: developer - title: Role - type: string - content: - anyOf: - - type: string - - items: - $ref: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - type: array - title: Content - name: - anyOf: - - type: string - - type: 'null' - title: Name - required: - - content - title: OpenAIDeveloperMessageParam - type: object - OpenAIFile: - properties: - type: - const: file - default: file - title: Type - type: string - file: - $ref: '#/$defs/OpenAIFileFile' - required: - - file - title: OpenAIFile - type: object - OpenAIFileFile: - properties: - file_data: - anyOf: - - type: string - - type: 'null' - title: File Data - file_id: - anyOf: - - type: string - - type: 'null' - title: File Id - filename: - anyOf: - - type: string - - type: 'null' - title: Filename - title: OpenAIFileFile - type: object - OpenAIImageURL: - description: >- - Image URL specification for OpenAI-compatible chat completion messages. - - - :param url: URL of the image to include in the message - - :param detail: (Optional) Level of detail for image processing. Can be - "low", "high", or "auto" - properties: - url: - title: Url - type: string - detail: - anyOf: - - type: string - - type: 'null' - title: Detail - required: - - url - title: OpenAIImageURL - type: object - OpenAISystemMessageParam: - description: >- - A system message providing instructions or context to the model. - - - :param role: Must be "system" to identify this as a system message - - :param content: The content of the "system prompt". If multiple system - messages are provided, they are concatenated. The underlying Llama Stack - code may also add other system messages (for example, for formatting tool - definitions). - - :param name: (Optional) The name of the system message participant. - properties: - role: - const: system - default: system - title: Role - type: string - content: - anyOf: - - type: string - - items: - $ref: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - type: array - title: Content - name: - anyOf: - - type: string - - type: 'null' - title: Name - required: - - content - title: OpenAISystemMessageParam - type: object - OpenAITokenLogProb: - description: >- - The log probability for a token from an OpenAI-compatible chat completion - response. - - - :token: The token - - :bytes: (Optional) The bytes for the token - - :logprob: The log probability of the token - - :top_logprobs: The top log probabilities for the token - properties: - token: - title: Token - type: string - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - title: Bytes - logprob: - title: Logprob - type: number - top_logprobs: - items: - $ref: '#/$defs/OpenAITopLogProb' - title: Top Logprobs - type: array - required: - - token - - logprob - - top_logprobs - title: OpenAITokenLogProb - type: object - OpenAIToolMessageParam: - description: >- - A message representing the result of a tool invocation in an OpenAI-compatible - chat completion request. - - - :param role: Must be "tool" to identify this as a tool response - - :param tool_call_id: Unique identifier for the tool call this response - is for - - :param content: The response content from the tool - properties: - role: - const: tool - default: tool - title: Role - type: string - tool_call_id: - title: Tool Call Id - type: string - content: - anyOf: - - type: string - - items: - $ref: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - type: array - title: Content - required: - - tool_call_id - - content - title: OpenAIToolMessageParam - type: object - OpenAITopLogProb: - description: >- - The top log probability for a token from an OpenAI-compatible chat completion - response. - - - :token: The token - - :bytes: (Optional) The bytes for the token - - :logprob: The log probability of the token - properties: - token: - title: Token - type: string - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - title: Bytes - logprob: - title: Logprob - type: number - required: - - token - - logprob - title: OpenAITopLogProb - type: object - OpenAIUserMessageParam: - description: >- - A message from the user in an OpenAI-compatible chat completion request. - - - :param role: Must be "user" to identify this as a user message - - :param content: The content of the message, which can include text and - other media - - :param name: (Optional) The name of the user message participant. - properties: - role: - const: user - default: user - title: Role - type: string - content: - anyOf: - - type: string - - items: - discriminator: - mapping: - file: '#/$defs/OpenAIFile' - image_url: >- - #/$defs/OpenAIChatCompletionContentPartImageParam - text: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - - $ref: >- - #/$defs/OpenAIChatCompletionContentPartImageParam - - $ref: '#/$defs/OpenAIFile' - type: array - title: Content - name: - anyOf: - - type: string - - type: 'null' - title: Name - required: - - content - title: OpenAIUserMessageParam - type: object - description: >- - Response from listing OpenAI-compatible chat completions. - - - :param data: List of chat completion objects with their input messages - - :param has_more: Whether there are more completions available beyond this - list - - :param first_id: ID of the first completion in this list - - :param last_id: ID of the last completion in this list - - :param object: Must be "list" to identify this as a list response + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + stop_reason: + $ref: '#/components/schemas/StopReason' + tool_calls: + title: Tool Calls + items: + $ref: '#/components/schemas/ToolCall' + type: array + required: + - content + - stop_reason + title: CompletionMessage + type: object + InferenceStep: + description: "An inference step in an agent turn.\n\n:param model_response: The response from the LLM." + properties: + turn_id: + title: Turn Id + type: string + step_id: + title: Step Id + type: string + started_at: + title: Started At + format: date-time + type: string + nullable: true + completed_at: + title: Completed At + format: date-time + type: string + nullable: true + step_type: + const: inference + default: inference + title: Step Type + type: string + model_response: + $ref: '#/components/schemas/CompletionMessage' + required: + - turn_id + - step_id + - model_response + title: InferenceStep + type: object + ListOpenAIResponseInputItem: + description: "List container for OpenAI response input items.\n\n:param data: List of input items\n:param object: Object type identifier, always \"list\"" properties: data: items: - $ref: >- - #/$defs/OpenAICompletionWithInputMessages + anyOf: + - discriminator: + mapping: + file_search_call: '#/$defs/OpenAIResponseOutputMessageFileSearchToolCall' + function_call: '#/$defs/OpenAIResponseOutputMessageFunctionToolCall' + mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest' + mcp_call: '#/$defs/OpenAIResponseOutputMessageMCPCall' + mcp_list_tools: '#/$defs/OpenAIResponseOutputMessageMCPListTools' + message: '#/$defs/OpenAIResponseMessage' + web_search_call: '#/$defs/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: Data + type: array + object: + const: list + default: list + title: Object + type: string + required: + - data + title: ListOpenAIResponseInputItem + type: object + ListOpenAIResponseObject: + description: "Paginated list of OpenAI response objects with navigation metadata.\n\n:param data: List of response objects with their input context\n:param has_more: Whether there are more results available beyond this page\n:param first_id: Identifier of the first item in this page\n:param last_id: Identifier of the last item in this page\n:param object: Object type identifier, always \"list\"" + properties: + data: + items: + $ref: '#/components/schemas/OpenAIResponseObjectWithInput' title: Data type: array has_more: @@ -5947,1496 +13381,282 @@ components: title: Object type: string required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIChatCompletionResponse + - data + - has_more + - first_id + - last_id + title: ListOpenAIResponseObject type: object - Annotated: - type: object - ? >- - llama_stack.apis.inference.inference.OpenAIChatCompletion | collections.abc.AsyncIterator[llama_stack.apis.inference.inference.OpenAIChatCompletionChunk] - : type: object - OpenAICompletionWithInputMessages: - $defs: - OpenAIAssistantMessageParam: - description: >- - A message containing the model's (assistant) response in an OpenAI-compatible - chat completion request. - - - :param role: Must be "assistant" to identify this as the model's response - - :param content: The content of the model's response - - :param name: (Optional) The name of the assistant message participant. - - :param tool_calls: List of tool calls. Each tool call is an OpenAIChatCompletionToolCall - object. - properties: - role: - const: assistant - default: assistant - title: Role - type: string - content: - anyOf: - - type: string - - items: - $ref: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - type: array - - type: 'null' - title: Content - name: - anyOf: - - type: string - - type: 'null' - title: Name - tool_calls: - anyOf: - - items: - $ref: '#/$defs/OpenAIChatCompletionToolCall' - type: array - - type: 'null' - title: Tool Calls - title: OpenAIAssistantMessageParam - type: object - "OpenAIChatCompletionContentPartImageParam": - description: >- - Image content part for OpenAI-compatible chat completion messages. - - - :param type: Must be "image_url" to identify this as image content - - :param image_url: Image URL specification and processing details - properties: - type: - const: image_url - default: image_url - title: Type - type: string - image_url: - $ref: '#/$defs/OpenAIImageURL' - required: - - image_url - title: >- - OpenAIChatCompletionContentPartImageParam - type: object - OpenAIChatCompletionContentPartTextParam: - description: >- - Text content part for OpenAI-compatible chat completion messages. - - - :param type: Must be "text" to identify this as text content - - :param text: The text content of the message - properties: - type: - const: text - default: text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: OpenAIChatCompletionContentPartTextParam - type: object - OpenAIChatCompletionToolCall: - description: >- - Tool call specification for OpenAI-compatible chat completion responses. - - - :param index: (Optional) Index of the tool call in the list - - :param id: (Optional) Unique identifier for the tool call - - :param type: Must be "function" to identify this as a function call - - :param function: (Optional) Function call details - properties: - index: - anyOf: - - type: integer - - type: 'null' - title: Index - id: - anyOf: - - type: string - - type: 'null' - title: Id - type: - const: function - default: function - title: Type - type: string - function: - anyOf: - - $ref: >- - #/$defs/OpenAIChatCompletionToolCallFunction - - type: 'null' - title: OpenAIChatCompletionToolCall - type: object - OpenAIChatCompletionToolCallFunction: - description: >- - Function call details for OpenAI-compatible tool calls. - - - :param name: (Optional) Name of the function to call - - :param arguments: (Optional) Arguments to pass to the function as a JSON - string - properties: - name: - anyOf: - - type: string - - type: 'null' - title: Name - arguments: - anyOf: - - type: string - - type: 'null' - title: Arguments - title: OpenAIChatCompletionToolCallFunction - type: object - OpenAIChatCompletionUsage: - description: >- - Usage information for OpenAI chat completion. - - - :param prompt_tokens: Number of tokens in the prompt - - :param completion_tokens: Number of tokens in the completion - - :param total_tokens: Total tokens used (prompt + completion) - - :param input_tokens_details: Detailed breakdown of input token usage - - :param output_tokens_details: Detailed breakdown of output token usage - properties: - prompt_tokens: - title: Prompt Tokens - type: integer - completion_tokens: - title: Completion Tokens - type: integer - total_tokens: - title: Total Tokens - type: integer - prompt_tokens_details: - anyOf: - - $ref: >- - #/$defs/OpenAIChatCompletionUsagePromptTokensDetails - - type: 'null' - completion_tokens_details: - anyOf: - - $ref: >- - #/$defs/OpenAIChatCompletionUsageCompletionTokensDetails - - type: 'null' - required: - - prompt_tokens - - completion_tokens - - total_tokens - title: OpenAIChatCompletionUsage - type: object - "OpenAIChatCompletionUsageCompletionTokensDetails": - description: >- - Token details for output tokens in OpenAI chat completion usage. - - - :param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models) - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - title: Reasoning Tokens - title: >- - OpenAIChatCompletionUsageCompletionTokensDetails - type: object - "OpenAIChatCompletionUsagePromptTokensDetails": - description: >- - Token details for prompt tokens in OpenAI chat completion usage. - - - :param cached_tokens: Number of tokens retrieved from cache - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - title: Cached Tokens - title: >- - OpenAIChatCompletionUsagePromptTokensDetails - type: object - OpenAIChoice: - description: >- - A choice from an OpenAI-compatible chat completion response. - - - :param message: The message from the model - - :param finish_reason: The reason the model stopped generating - - :param index: The index of the choice - - :param logprobs: (Optional) The log probabilities for the tokens in the - message - properties: - message: + MemoryRetrievalStep: + description: "A memory retrieval step in an agent turn.\n\n:param vector_store_ids: The IDs of the vector databases to retrieve context from.\n:param inserted_context: The context retrieved from the vector databases." + properties: + turn_id: + title: Turn Id + type: string + step_id: + title: Step Id + type: string + started_at: + title: Started At + format: date-time + type: string + nullable: true + completed_at: + title: Completed At + format: date-time + type: string + nullable: true + step_type: + const: memory_retrieval + default: memory_retrieval + title: Step Type + type: string + vector_store_ids: + title: Vector Store Ids + type: string + inserted_context: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/$defs/ImageContentItem' + text: '#/$defs/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: discriminator: mapping: - assistant: '#/$defs/OpenAIAssistantMessageParam' - developer: '#/$defs/OpenAIDeveloperMessageParam' - system: '#/$defs/OpenAISystemMessageParam' - tool: '#/$defs/OpenAIToolMessageParam' - user: '#/$defs/OpenAIUserMessageParam' - propertyName: role + image: '#/$defs/ImageContentItem' + text: '#/$defs/TextContentItem' + propertyName: type oneOf: - - $ref: '#/$defs/OpenAIUserMessageParam' - - $ref: '#/$defs/OpenAISystemMessageParam' - - $ref: '#/$defs/OpenAIAssistantMessageParam' - - $ref: '#/$defs/OpenAIToolMessageParam' - - $ref: '#/$defs/OpenAIDeveloperMessageParam' - title: Message - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: - anyOf: - - $ref: '#/$defs/OpenAIChoiceLogprobs' - - type: 'null' - required: - - message - - finish_reason - - index - title: OpenAIChoice - type: object - OpenAIChoiceLogprobs: - description: >- - The log probabilities for the tokens in the message from an OpenAI-compatible - chat completion response. - - - :param content: (Optional) The log probabilities for the tokens in the - message - - :param refusal: (Optional) The log probabilities for the tokens in the - message - properties: - content: - anyOf: - - items: - $ref: '#/$defs/OpenAITokenLogProb' - type: array - - type: 'null' - title: Content - refusal: - anyOf: - - items: - $ref: '#/$defs/OpenAITokenLogProb' - type: array - - type: 'null' - title: Refusal - title: OpenAIChoiceLogprobs - type: object - OpenAIDeveloperMessageParam: - description: >- - A message from the developer in an OpenAI-compatible chat completion request. - - - :param role: Must be "developer" to identify this as a developer message - - :param content: The content of the developer message - - :param name: (Optional) The name of the developer message participant. - properties: - role: - const: developer - default: developer - title: Role - type: string - content: - anyOf: - - type: string - - items: - $ref: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - type: array - title: Content - name: - anyOf: - - type: string - - type: 'null' - title: Name - required: - - content - title: OpenAIDeveloperMessageParam - type: object - OpenAIFile: - properties: - type: - const: file - default: file - title: Type - type: string - file: - $ref: '#/$defs/OpenAIFileFile' - required: - - file - title: OpenAIFile - type: object - OpenAIFileFile: - properties: - file_data: - anyOf: - - type: string - - type: 'null' - title: File Data - file_id: - anyOf: - - type: string - - type: 'null' - title: File Id - filename: - anyOf: - - type: string - - type: 'null' - title: Filename - title: OpenAIFileFile - type: object - OpenAIImageURL: - description: >- - Image URL specification for OpenAI-compatible chat completion messages. - - - :param url: URL of the image to include in the message - - :param detail: (Optional) Level of detail for image processing. Can be - "low", "high", or "auto" - properties: - url: - title: Url - type: string - detail: - anyOf: - - type: string - - type: 'null' - title: Detail - required: - - url - title: OpenAIImageURL - type: object - OpenAISystemMessageParam: - description: >- - A system message providing instructions or context to the model. - - - :param role: Must be "system" to identify this as a system message - - :param content: The content of the "system prompt". If multiple system - messages are provided, they are concatenated. The underlying Llama Stack - code may also add other system messages (for example, for formatting tool - definitions). - - :param name: (Optional) The name of the system message participant. - properties: - role: - const: system - default: system - title: Role - type: string - content: - anyOf: - - type: string - - items: - $ref: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - type: array - title: Content - name: - anyOf: - - type: string - - type: 'null' - title: Name - required: - - content - title: OpenAISystemMessageParam - type: object - OpenAITokenLogProb: - description: >- - The log probability for a token from an OpenAI-compatible chat completion - response. - - - :token: The token - - :bytes: (Optional) The bytes for the token - - :logprob: The log probability of the token - - :top_logprobs: The top log probabilities for the token - properties: - token: - title: Token - type: string - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - title: Bytes - logprob: - title: Logprob - type: number - top_logprobs: - items: - $ref: '#/$defs/OpenAITopLogProb' - title: Top Logprobs - type: array - required: - - token - - logprob - - top_logprobs - title: OpenAITokenLogProb - type: object - OpenAIToolMessageParam: - description: >- - A message representing the result of a tool invocation in an OpenAI-compatible - chat completion request. - - - :param role: Must be "tool" to identify this as a tool response - - :param tool_call_id: Unique identifier for the tool call this response - is for - - :param content: The response content from the tool - properties: - role: - const: tool - default: tool - title: Role - type: string - tool_call_id: - title: Tool Call Id - type: string - content: - anyOf: - - type: string - - items: - $ref: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - type: array - title: Content - required: - - tool_call_id - - content - title: OpenAIToolMessageParam - type: object - OpenAITopLogProb: - description: >- - The top log probability for a token from an OpenAI-compatible chat completion - response. - - - :token: The token - - :bytes: (Optional) The bytes for the token - - :logprob: The log probability of the token - properties: - token: - title: Token - type: string - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - title: Bytes - logprob: - title: Logprob - type: number - required: - - token - - logprob - title: OpenAITopLogProb - type: object - OpenAIUserMessageParam: - description: >- - A message from the user in an OpenAI-compatible chat completion request. - - - :param role: Must be "user" to identify this as a user message - - :param content: The content of the message, which can include text and - other media - - :param name: (Optional) The name of the user message participant. - properties: - role: - const: user - default: user - title: Role - type: string - content: - anyOf: - - type: string - - items: - discriminator: - mapping: - file: '#/$defs/OpenAIFile' - image_url: >- - #/$defs/OpenAIChatCompletionContentPartImageParam - text: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - - $ref: >- - #/$defs/OpenAIChatCompletionContentPartImageParam - - $ref: '#/$defs/OpenAIFile' - type: array - title: Content - name: - anyOf: - - type: string - - type: 'null' - title: Name - required: - - content - title: OpenAIUserMessageParam - type: object + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Inserted Context + required: + - turn_id + - step_id + - vector_store_ids + - inserted_context + title: MemoryRetrievalStep + type: object + OpenAIDeleteResponseObject: + description: "Response object confirming deletion of an OpenAI response.\n\n:param id: Unique identifier of the deleted response\n:param object: Object type identifier, always \"response\"\n:param deleted: Deletion confirmation flag, always True" properties: id: title: Id type: string - choices: - items: - $ref: '#/$defs/OpenAIChoice' - title: Choices - type: array object: - const: chat.completion - default: chat.completion + const: response + default: response title: Object type: string - created: - title: Created - type: integer - model: - title: Model - type: string - usage: - anyOf: - - $ref: '#/$defs/OpenAIChatCompletionUsage' - - type: 'null' - input_messages: - items: - discriminator: - mapping: - assistant: '#/$defs/OpenAIAssistantMessageParam' - developer: '#/$defs/OpenAIDeveloperMessageParam' - system: '#/$defs/OpenAISystemMessageParam' - tool: '#/$defs/OpenAIToolMessageParam' - user: '#/$defs/OpenAIUserMessageParam' - propertyName: role - oneOf: - - $ref: '#/$defs/OpenAIUserMessageParam' - - $ref: '#/$defs/OpenAISystemMessageParam' - - $ref: '#/$defs/OpenAIAssistantMessageParam' - - $ref: '#/$defs/OpenAIToolMessageParam' - - $ref: '#/$defs/OpenAIDeveloperMessageParam' - title: Input Messages - type: array - required: - - id - - choices - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages - type: object - OpenAICompletion: - $defs: - OpenAIChoiceLogprobs: - description: >- - The log probabilities for the tokens in the message from an OpenAI-compatible - chat completion response. - - - :param content: (Optional) The log probabilities for the tokens in the - message - - :param refusal: (Optional) The log probabilities for the tokens in the - message - properties: - content: - anyOf: - - items: - $ref: '#/$defs/OpenAITokenLogProb' - type: array - - type: 'null' - title: Content - refusal: - anyOf: - - items: - $ref: '#/$defs/OpenAITokenLogProb' - type: array - - type: 'null' - title: Refusal - title: OpenAIChoiceLogprobs - type: object - OpenAICompletionChoice: - description: >- - A choice from an OpenAI-compatible completion response. - - - :finish_reason: The reason the model stopped generating - - :text: The text of the choice - - :index: The index of the choice - - :logprobs: (Optional) The log probabilities for the tokens in the choice - properties: - finish_reason: - title: Finish Reason - type: string - text: - title: Text - type: string - index: - title: Index - type: integer - logprobs: - anyOf: - - $ref: '#/$defs/OpenAIChoiceLogprobs' - - type: 'null' - required: - - finish_reason - - text - - index - title: OpenAICompletionChoice - type: object - OpenAITokenLogProb: - description: >- - The log probability for a token from an OpenAI-compatible chat completion - response. - - - :token: The token - - :bytes: (Optional) The bytes for the token - - :logprob: The log probability of the token - - :top_logprobs: The top log probabilities for the token - properties: - token: - title: Token - type: string - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - title: Bytes - logprob: - title: Logprob - type: number - top_logprobs: - items: - $ref: '#/$defs/OpenAITopLogProb' - title: Top Logprobs - type: array - required: - - token - - logprob - - top_logprobs - title: OpenAITokenLogProb - type: object - OpenAITopLogProb: - description: >- - The top log probability for a token from an OpenAI-compatible chat completion - response. - - - :token: The token - - :bytes: (Optional) The bytes for the token - - :logprob: The log probability of the token - properties: - token: - title: Token - type: string - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - title: Bytes - logprob: - title: Logprob - type: number - required: - - token - - logprob - title: OpenAITopLogProb - type: object - description: >- - Response from an OpenAI-compatible completion request. - - - :id: The ID of the completion - - :choices: List of choices - - :created: The Unix timestamp in seconds when the completion was created - - :model: The model that was used to generate the completion - - :object: The object type, which will be "text_completion" - properties: - id: - title: Id - type: string - choices: - items: - $ref: '#/$defs/OpenAICompletionChoice' - title: Choices - type: array - created: - title: Created - type: integer - model: - title: Model - type: string - object: - const: text_completion - default: text_completion - title: Object - type: string - required: - - id - - choices - - created - - model - title: OpenAICompletion - type: object - properties: - finish_reason: - type: string - text: - type: string - index: - type: integer - logprobs: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - additionalProperties: false - required: - - finish_reason - - text - - index - title: OpenAICompletionChoice - description: >- - A choice from an OpenAI-compatible completion response. - ConversationItem: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - discriminator: - propertyName: type - mapping: - message: '#/components/schemas/OpenAIResponseMessage' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - function_call_output: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - mcp_approval_response: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - OpenAIResponseAnnotationCitation: - type: object - properties: - type: - type: string - const: url_citation - default: url_citation - description: >- - Annotation type identifier, always "url_citation" - end_index: - type: integer - description: >- - End position of the citation span in the content - start_index: - type: integer - description: >- - Start position of the citation span in the content - title: - type: string - description: Title of the referenced web resource - url: - type: string - description: URL of the referenced web resource - additionalProperties: false - required: - - type - - end_index - - start_index - - title - - url - title: OpenAIResponseAnnotationCitation - description: >- - URL citation annotation for referencing external web resources. - "OpenAIResponseAnnotationContainerFileCitation": - type: object - properties: - type: - type: string - const: container_file_citation - default: container_file_citation - container_id: - type: string - end_index: - type: integer - file_id: - type: string - filename: - type: string - start_index: - type: integer - additionalProperties: false - required: - - type - - container_id - - end_index - - file_id - - filename - - start_index - title: >- - OpenAIResponseAnnotationContainerFileCitation - OpenAIResponseAnnotationFileCitation: - type: object - properties: - type: - type: string - const: file_citation - default: file_citation - description: >- - Annotation type identifier, always "file_citation" - file_id: - type: string - description: Unique identifier of the referenced file - filename: - type: string - description: Name of the referenced file - index: - type: integer - description: >- - Position index of the citation within the content - additionalProperties: false - required: - - type - - file_id - - filename - - index - title: OpenAIResponseAnnotationFileCitation - description: >- - File citation annotation for referencing specific files in response content. - OpenAIResponseAnnotationFilePath: - type: object - properties: - type: - type: string - const: file_path - default: file_path - file_id: - type: string - index: - type: integer - additionalProperties: false - required: - - type - - file_id - - index - title: OpenAIResponseAnnotationFilePath - OpenAIResponseAnnotations: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - discriminator: - propertyName: type - mapping: - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - OpenAIResponseContentPartRefusal: - type: object - properties: - type: - type: string - const: refusal - default: refusal - description: >- - Content part type identifier, always "refusal" - refusal: - type: string - description: Refusal text supplied by the model - additionalProperties: false - required: - - type - - refusal - title: OpenAIResponseContentPartRefusal - description: >- - Refusal content within a streamed response part. - "OpenAIResponseInputFunctionToolCallOutput": - type: object - properties: - call_id: - type: string - output: - type: string - type: - type: string - const: function_call_output - default: function_call_output - id: - type: string - status: - type: string - additionalProperties: false - required: - - call_id - - output - - type - title: >- - OpenAIResponseInputFunctionToolCallOutput - description: >- - This represents the output of a function call that gets passed back to the - model. - OpenAIResponseInputMessageContent: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - discriminator: - propertyName: type - mapping: - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - OpenAIResponseInputMessageContentFile: - type: object - properties: - type: - type: string - const: input_file - default: input_file - description: >- - The type of the input item. Always `input_file`. - file_data: - type: string - description: >- - The data of the file to be sent to the model. - file_id: - type: string - description: >- - (Optional) The ID of the file to be sent to the model. - file_url: - type: string - description: >- - The URL of the file to be sent to the model. - filename: - type: string - description: >- - The name of the file to be sent to the model. - additionalProperties: false - required: - - type - title: OpenAIResponseInputMessageContentFile - description: >- - File content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentImage: - type: object - properties: - detail: - oneOf: - - type: string - const: low - - type: string - const: high - - type: string - const: auto - default: auto - description: >- - Level of detail for image processing, can be "low", "high", or "auto" - type: - type: string - const: input_image - default: input_image - description: >- - Content type identifier, always "input_image" - file_id: - type: string - description: >- - (Optional) The ID of the file to be sent to the model. - image_url: - type: string - description: (Optional) URL of the image content - additionalProperties: false - required: - - detail - - type - title: OpenAIResponseInputMessageContentImage - description: >- - Image content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentText: - type: object - properties: - text: - type: string - description: The text content of the input message - type: - type: string - const: input_text - default: input_text - description: >- - Content type identifier, always "input_text" - additionalProperties: false - required: - - text - - type - title: OpenAIResponseInputMessageContentText - description: >- - Text content for input messages in OpenAI response format. - OpenAIResponseMCPApprovalRequest: - type: object - properties: - arguments: - type: string - id: - type: string - name: - type: string - server_label: - type: string - type: - type: string - const: mcp_approval_request - default: mcp_approval_request - additionalProperties: false - required: - - arguments - - id - - name - - server_label - - type - title: OpenAIResponseMCPApprovalRequest - description: >- - A request for human approval of a tool invocation. - OpenAIResponseMCPApprovalResponse: - type: object - properties: - approval_request_id: - type: string - approve: + deleted: + default: true + title: Deleted type: boolean - type: - type: string - const: mcp_approval_response - default: mcp_approval_response - id: - type: string - reason: - type: string - additionalProperties: false required: - - approval_request_id - - approve - - type - title: OpenAIResponseMCPApprovalResponse - description: A response to an MCP approval request. - OpenAIResponseMessage: + - id + title: OpenAIDeleteResponseObject type: object + PaginatedResponse: + description: "A generic paginated response that follows a simple format.\n\n:param data: The list of items for the current page\n:param has_more: Whether there are more items available after this set\n:param url: The URL for accessing this list" properties: - content: - oneOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInputMessageContent' - - type: array - items: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContent' - role: - oneOf: - - type: string - const: system - - type: string - const: developer - - type: string - const: user - - type: string - const: assistant - type: - type: string - const: message - default: message - id: - type: string - status: - type: string - additionalProperties: false - required: - - content - - role - - type - title: OpenAIResponseMessage - description: >- - Corresponds to the various Message types in the Responses API. They are all - under one type because the Responses API gives them all the same "type" value, - and there is no way to tell them apart in certain scenarios. - OpenAIResponseOutputMessageContent: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - "OpenAIResponseOutputMessageContentOutputText": - type: object - properties: - text: - type: string - type: - type: string - const: output_text - default: output_text - annotations: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseAnnotations' - additionalProperties: false - required: - - text - - type - - annotations - title: >- - OpenAIResponseOutputMessageContentOutputText - "OpenAIResponseOutputMessageFileSearchToolCall": - type: object - properties: - id: - type: string - description: Unique identifier for this tool call - queries: - type: array - items: - type: string - description: List of search queries executed - status: - type: string - description: >- - Current status of the file search operation - type: - type: string - const: file_search_call - default: file_search_call - description: >- - Tool call type identifier, always "file_search_call" - results: - type: array + data: items: + additionalProperties: true type: object - properties: - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Key-value attributes associated with the file - file_id: - type: string - description: >- - Unique identifier of the file containing the result - filename: - type: string - description: Name of the file containing the result - score: - type: number - description: >- - Relevance score for this search result (between 0 and 1) - text: - type: string - description: Text content of the search result - additionalProperties: false - required: - - attributes - - file_id - - filename - - score - - text - title: >- - OpenAIResponseOutputMessageFileSearchToolCallResults - description: >- - Search results returned by the file search operation. - description: >- - (Optional) Search results returned by the file search operation - additionalProperties: false + title: Data + type: array + has_more: + title: Has More + type: boolean + url: + title: Url + type: string + nullable: true required: - - id - - queries - - status - - type - title: >- - OpenAIResponseOutputMessageFileSearchToolCall - description: >- - File search tool call output message for OpenAI responses. - "OpenAIResponseOutputMessageFunctionToolCall": + - data + - has_more + title: PaginatedResponse type: object + Session: + description: "A single session of an interaction with an Agentic System.\n\n:param session_id: Unique identifier for the conversation session\n:param session_name: Human-readable name for the session\n:param turns: List of all turns that have occurred in this session\n:param started_at: Timestamp when the session was created" + properties: + session_id: + title: Session Id + type: string + session_name: + title: Session Name + type: string + turns: + items: + $ref: '#/components/schemas/Turn' + title: Turns + type: array + started_at: + format: date-time + title: Started At + type: string + required: + - session_id + - session_name + - turns + - started_at + title: Session + type: object + ShieldCallStep: + description: "A shield call step in an agent turn.\n\n:param violation: The violation from the shield call." + properties: + turn_id: + title: Turn Id + type: string + step_id: + title: Step Id + type: string + started_at: + title: Started At + format: date-time + type: string + nullable: true + completed_at: + title: Completed At + format: date-time + type: string + nullable: true + step_type: + const: shield_call + default: shield_call + title: Step Type + type: string + violation: + $ref: '#/components/schemas/SafetyViolation' + required: + - turn_id + - step_id + - violation + title: ShieldCallStep + type: object + ToolExecutionStep: + description: "A tool execution step in an agent turn.\n\n:param tool_calls: The tool calls to execute.\n:param tool_responses: The tool responses from the tool calls." + properties: + turn_id: + title: Turn Id + type: string + step_id: + title: Step Id + type: string + started_at: + title: Started At + format: date-time + type: string + nullable: true + completed_at: + title: Completed At + format: date-time + type: string + nullable: true + step_type: + const: tool_execution + default: tool_execution + title: Step Type + type: string + tool_calls: + items: + $ref: '#/components/schemas/ToolCall' + title: Tool Calls + type: array + tool_responses: + items: + $ref: '#/components/schemas/ToolResponse' + title: Tool Responses + type: array + required: + - turn_id + - step_id + - tool_calls + - tool_responses + title: ToolExecutionStep + type: object + ToolResponse: + description: "Response from a tool invocation.\n\n:param call_id: Unique identifier for the tool call this response is for\n:param tool_name: Name of the tool that was invoked\n:param content: The response content from the tool\n:param metadata: (Optional) Additional metadata about the tool response" properties: call_id: + title: Call Id type: string - description: Unique identifier for the function call - name: - type: string - description: Name of the function being called - arguments: - type: string - description: >- - JSON string containing the function arguments - type: - type: string - const: function_call - default: function_call - description: >- - Tool call type identifier, always "function_call" - id: - type: string - description: >- - (Optional) Additional identifier for the tool call - status: - type: string - description: >- - (Optional) Current status of the function call execution - additionalProperties: false + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/$defs/ImageContentItem' + text: '#/$defs/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/$defs/ImageContentItem' + text: '#/$defs/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + metadata: + title: Metadata + additionalProperties: true + type: object + nullable: true required: - - call_id - - name - - arguments - - type - title: >- - OpenAIResponseOutputMessageFunctionToolCall - description: >- - Function tool call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPCall: + - call_id + - tool_name + - content + title: ToolResponse type: object + ListBatchesResponse: + description: Response containing a list of batch objects. properties: - id: - type: string - description: Unique identifier for this MCP call - type: - type: string - const: mcp_call - default: mcp_call - description: >- - Tool call type identifier, always "mcp_call" - arguments: - type: string - description: >- - JSON string containing the MCP call arguments - name: - type: string - description: Name of the MCP method being called - server_label: - type: string - description: >- - Label identifying the MCP server handling the call - error: - type: string - description: >- - (Optional) Error message if the MCP call failed - output: - type: string - description: >- - (Optional) Output result from the successful MCP call - additionalProperties: false - required: - - id - - type - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall - description: >- - Model Context Protocol (MCP) call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPListTools: - type: object - properties: - id: - type: string - description: >- - Unique identifier for this MCP list tools operation - type: - type: string - const: mcp_list_tools - default: mcp_list_tools - description: >- - Tool call type identifier, always "mcp_list_tools" - server_label: - type: string - description: >- - Label identifying the MCP server providing the tools - tools: - type: array - items: - type: object - properties: - input_schema: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - JSON schema defining the tool's input parameters - name: - type: string - description: Name of the tool - description: - type: string - description: >- - (Optional) Description of what the tool does - additionalProperties: false - required: - - input_schema - - name - title: MCPListToolsTool - description: >- - Tool definition returned by MCP list tools operation. - description: >- - List of available tools provided by the MCP server - additionalProperties: false - required: - - id - - type - - server_label - - tools - title: OpenAIResponseOutputMessageMCPListTools - description: >- - MCP list tools output message containing available tools from an MCP server. - "OpenAIResponseOutputMessageWebSearchToolCall": - type: object - properties: - id: - type: string - description: Unique identifier for this tool call - status: - type: string - description: >- - Current status of the web search operation - type: - type: string - const: web_search_call - default: web_search_call - description: >- - Tool call type identifier, always "web_search_call" - additionalProperties: false - required: - - id - - status - - type - title: >- - OpenAIResponseOutputMessageWebSearchToolCall - description: >- - Web search tool call output message for OpenAI responses. - CreateConversationRequest: - type: object - Conversation: - description: OpenAI-compatible conversation object. - properties: - id: - description: The unique ID of the conversation. - title: Id - type: string object: - const: conversation - default: conversation - description: >- - The object type, which is always conversation. + const: list + default: list title: Object type: string - created_at: - description: >- - The time at which the conversation was created, measured in seconds since - the Unix epoch. - title: Created At - type: integer - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - description: >- - Set of 16 key-value pairs that can be attached to an object. This can - be useful for storing additional information about the object in a structured - format, and querying for objects via API or the dashboard. - title: Metadata - items: - anyOf: - - items: - additionalProperties: true - type: object - type: array - - type: 'null' - description: >- - Initial items to include in the conversation context. You may add up to - 20 items at a time. - title: Items + data: + description: List of batch objects + items: + $ref: '#/components/schemas/Batch' + title: Data + type: array + first_id: + description: ID of the first batch in the list + title: First Id + type: string + nullable: true + last_id: + description: ID of the last batch in the list + title: Last Id + type: string + nullable: true + has_more: + default: false + description: Whether there are more batches available + title: Has More + type: boolean required: - - id - - created_at - title: Conversation - type: object - UpdateConversationRequest: + - data + title: ListBatchesResponse type: object ConversationDeletedResource: description: Response for deleted conversation. @@ -7456,759 +13676,9 @@ components: title: Deleted type: boolean required: - - id + - id title: ConversationDeletedResource type: object - list: - type: object - Literal: - type: object - ConversationItemList: - $defs: - MCPListToolsTool: - description: >- - Tool definition returned by MCP list tools operation. - - - :param input_schema: JSON schema defining the tool's input parameters - - :param name: Name of the tool - - :param description: (Optional) Description of what the tool does - properties: - input_schema: - additionalProperties: true - title: Input Schema - type: object - name: - title: Name - type: string - description: - anyOf: - - type: string - - type: 'null' - title: Description - required: - - input_schema - - name - title: MCPListToolsTool - type: object - OpenAIResponseAnnotationCitation: - description: >- - URL citation annotation for referencing external web resources. - - - :param type: Annotation type identifier, always "url_citation" - - :param end_index: End position of the citation span in the content - - :param start_index: Start position of the citation span in the content - - :param title: Title of the referenced web resource - - :param url: URL of the referenced web resource - properties: - type: - const: url_citation - default: url_citation - title: Type - type: string - end_index: - title: End Index - type: integer - start_index: - title: Start Index - type: integer - title: - title: Title - type: string - url: - title: Url - type: string - required: - - end_index - - start_index - - title - - url - title: OpenAIResponseAnnotationCitation - type: object - "OpenAIResponseAnnotationContainerFileCitation": - properties: - type: - const: container_file_citation - default: container_file_citation - title: Type - type: string - container_id: - title: Container Id - type: string - end_index: - title: End Index - type: integer - file_id: - title: File Id - type: string - filename: - title: Filename - type: string - start_index: - title: Start Index - type: integer - required: - - container_id - - end_index - - file_id - - filename - - start_index - title: >- - OpenAIResponseAnnotationContainerFileCitation - type: object - OpenAIResponseAnnotationFileCitation: - description: >- - File citation annotation for referencing specific files in response content. - - - :param type: Annotation type identifier, always "file_citation" - - :param file_id: Unique identifier of the referenced file - - :param filename: Name of the referenced file - - :param index: Position index of the citation within the content - properties: - type: - const: file_citation - default: file_citation - title: Type - type: string - file_id: - title: File Id - type: string - filename: - title: Filename - type: string - index: - title: Index - type: integer - required: - - file_id - - filename - - index - title: OpenAIResponseAnnotationFileCitation - type: object - OpenAIResponseAnnotationFilePath: - properties: - type: - const: file_path - default: file_path - title: Type - type: string - file_id: - title: File Id - type: string - index: - title: Index - type: integer - required: - - file_id - - index - title: OpenAIResponseAnnotationFilePath - type: object - OpenAIResponseContentPartRefusal: - description: >- - Refusal content within a streamed response part. - - - :param type: Content part type identifier, always "refusal" - - :param refusal: Refusal text supplied by the model - properties: - type: - const: refusal - default: refusal - title: Type - type: string - refusal: - title: Refusal - type: string - required: - - refusal - title: OpenAIResponseContentPartRefusal - type: object - "OpenAIResponseInputFunctionToolCallOutput": - description: >- - This represents the output of a function call that gets passed back to - the model. - properties: - call_id: - title: Call Id - type: string - output: - title: Output - type: string - type: - const: function_call_output - default: function_call_output - title: Type - type: string - id: - anyOf: - - type: string - - type: 'null' - title: Id - status: - anyOf: - - type: string - - type: 'null' - title: Status - required: - - call_id - - output - title: >- - OpenAIResponseInputFunctionToolCallOutput - type: object - OpenAIResponseInputMessageContentImage: - description: >- - Image content for input messages in OpenAI response format. - - - :param detail: Level of detail for image processing, can be "low", "high", - or "auto" - - :param type: Content type identifier, always "input_image" - - :param image_url: (Optional) URL of the image content - properties: - detail: - anyOf: - - const: low - type: string - - const: high - type: string - - const: auto - type: string - default: auto - title: Detail - type: - const: input_image - default: input_image - title: Type - type: string - image_url: - anyOf: - - type: string - - type: 'null' - title: Image Url - title: OpenAIResponseInputMessageContentImage - type: object - OpenAIResponseInputMessageContentText: - description: >- - Text content for input messages in OpenAI response format. - - - :param text: The text content of the input message - - :param type: Content type identifier, always "input_text" - properties: - text: - title: Text - type: string - type: - const: input_text - default: input_text - title: Type - type: string - required: - - text - title: OpenAIResponseInputMessageContentText - type: object - OpenAIResponseMCPApprovalRequest: - description: >- - A request for human approval of a tool invocation. - properties: - arguments: - title: Arguments - type: string - id: - title: Id - type: string - name: - title: Name - type: string - server_label: - title: Server Label - type: string - type: - const: mcp_approval_request - default: mcp_approval_request - title: Type - type: string - required: - - arguments - - id - - name - - server_label - title: OpenAIResponseMCPApprovalRequest - type: object - OpenAIResponseMCPApprovalResponse: - description: A response to an MCP approval request. - properties: - approval_request_id: - title: Approval Request Id - type: string - approve: - title: Approve - type: boolean - type: - const: mcp_approval_response - default: mcp_approval_response - title: Type - type: string - id: - anyOf: - - type: string - - type: 'null' - title: Id - reason: - anyOf: - - type: string - - type: 'null' - title: Reason - required: - - approval_request_id - - approve - title: OpenAIResponseMCPApprovalResponse - type: object - OpenAIResponseMessage: - description: >- - Corresponds to the various Message types in the Responses API. - - They are all under one type because the Responses API gives them all - - the same "type" value, and there is no way to tell them apart in certain - - scenarios. - properties: - content: - anyOf: - - type: string - - items: - discriminator: - mapping: - input_image: >- - #/$defs/OpenAIResponseInputMessageContentImage - input_text: >- - #/$defs/OpenAIResponseInputMessageContentText - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIResponseInputMessageContentText - - $ref: >- - #/$defs/OpenAIResponseInputMessageContentImage - type: array - - items: - discriminator: - mapping: - output_text: >- - #/$defs/OpenAIResponseOutputMessageContentOutputText - refusal: '#/$defs/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIResponseOutputMessageContentOutputText - - $ref: '#/$defs/OpenAIResponseContentPartRefusal' - type: array - title: Content - role: - anyOf: - - const: system - type: string - - const: developer - type: string - - const: user - type: string - - const: assistant - type: string - title: Role - type: - const: message - default: message - title: Type - type: string - id: - anyOf: - - type: string - - type: 'null' - title: Id - status: - anyOf: - - type: string - - type: 'null' - title: Status - required: - - content - - role - title: OpenAIResponseMessage - type: object - "OpenAIResponseOutputMessageContentOutputText": - properties: - text: - title: Text - type: string - type: - const: output_text - default: output_text - title: Type - type: string - annotations: - items: - discriminator: - mapping: - container_file_citation: >- - #/$defs/OpenAIResponseAnnotationContainerFileCitation - file_citation: >- - #/$defs/OpenAIResponseAnnotationFileCitation - file_path: '#/$defs/OpenAIResponseAnnotationFilePath' - url_citation: '#/$defs/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIResponseAnnotationFileCitation - - $ref: '#/$defs/OpenAIResponseAnnotationCitation' - - $ref: >- - #/$defs/OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/$defs/OpenAIResponseAnnotationFilePath' - title: Annotations - type: array - required: - - text - title: >- - OpenAIResponseOutputMessageContentOutputText - type: object - "OpenAIResponseOutputMessageFileSearchToolCall": - description: >- - File search tool call output message for OpenAI responses. - - - :param id: Unique identifier for this tool call - - :param queries: List of search queries executed - - :param status: Current status of the file search operation - - :param type: Tool call type identifier, always "file_search_call" - - :param results: (Optional) Search results returned by the file search - operation - properties: - id: - title: Id - type: string - queries: - items: - type: string - title: Queries - type: array - status: - title: Status - type: string - type: - const: file_search_call - default: file_search_call - title: Type - type: string - results: - anyOf: - - items: - $ref: >- - #/$defs/OpenAIResponseOutputMessageFileSearchToolCallResults - type: array - - type: 'null' - title: Results - required: - - id - - queries - - status - title: >- - OpenAIResponseOutputMessageFileSearchToolCall - type: object - "OpenAIResponseOutputMessageFileSearchToolCallResults": - description: >- - Search results returned by the file search operation. - - - :param attributes: (Optional) Key-value attributes associated with the - file - - :param file_id: Unique identifier of the file containing the result - - :param filename: Name of the file containing the result - - :param score: Relevance score for this search result (between 0 and 1) - - :param text: Text content of the search result - properties: - attributes: - additionalProperties: true - title: Attributes - type: object - file_id: - title: File Id - type: string - filename: - title: Filename - type: string - score: - title: Score - type: number - text: - title: Text - type: string - required: - - attributes - - file_id - - filename - - score - - text - title: >- - OpenAIResponseOutputMessageFileSearchToolCallResults - type: object - "OpenAIResponseOutputMessageFunctionToolCall": - description: >- - Function tool call output message for OpenAI responses. - - - :param call_id: Unique identifier for the function call - - :param name: Name of the function being called - - :param arguments: JSON string containing the function arguments - - :param type: Tool call type identifier, always "function_call" - - :param id: (Optional) Additional identifier for the tool call - - :param status: (Optional) Current status of the function call execution - properties: - call_id: - title: Call Id - type: string - name: - title: Name - type: string - arguments: - title: Arguments - type: string - type: - const: function_call - default: function_call - title: Type - type: string - id: - anyOf: - - type: string - - type: 'null' - title: Id - status: - anyOf: - - type: string - - type: 'null' - title: Status - required: - - call_id - - name - - arguments - title: >- - OpenAIResponseOutputMessageFunctionToolCall - type: object - OpenAIResponseOutputMessageMCPCall: - description: >- - Model Context Protocol (MCP) call output message for OpenAI responses. - - - :param id: Unique identifier for this MCP call - - :param type: Tool call type identifier, always "mcp_call" - - :param arguments: JSON string containing the MCP call arguments - - :param name: Name of the MCP method being called - - :param server_label: Label identifying the MCP server handling the call - - :param error: (Optional) Error message if the MCP call failed - - :param output: (Optional) Output result from the successful MCP call - properties: - id: - title: Id - type: string - type: - const: mcp_call - default: mcp_call - title: Type - type: string - arguments: - title: Arguments - type: string - name: - title: Name - type: string - server_label: - title: Server Label - type: string - error: - anyOf: - - type: string - - type: 'null' - title: Error - output: - anyOf: - - type: string - - type: 'null' - title: Output - required: - - id - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall - type: object - OpenAIResponseOutputMessageMCPListTools: - description: >- - MCP list tools output message containing available tools from an MCP server. - - - :param id: Unique identifier for this MCP list tools operation - - :param type: Tool call type identifier, always "mcp_list_tools" - - :param server_label: Label identifying the MCP server providing the tools - - :param tools: List of available tools provided by the MCP server - properties: - id: - title: Id - type: string - type: - const: mcp_list_tools - default: mcp_list_tools - title: Type - type: string - server_label: - title: Server Label - type: string - tools: - items: - $ref: '#/$defs/MCPListToolsTool' - title: Tools - type: array - required: - - id - - server_label - - tools - title: OpenAIResponseOutputMessageMCPListTools - type: object - "OpenAIResponseOutputMessageWebSearchToolCall": - description: >- - Web search tool call output message for OpenAI responses. - - - :param id: Unique identifier for this tool call - - :param status: Current status of the web search operation - - :param type: Tool call type identifier, always "web_search_call" - properties: - id: - title: Id - type: string - status: - title: Status - type: string - type: - const: web_search_call - default: web_search_call - title: Type - type: string - required: - - id - - status - title: >- - OpenAIResponseOutputMessageWebSearchToolCall - type: object - description: >- - List of conversation items with pagination. - properties: - object: - default: list - description: Object type - title: Object - type: string - data: - description: List of conversation items - items: - discriminator: - mapping: - file_search_call: >- - #/$defs/OpenAIResponseOutputMessageFileSearchToolCall - function_call: >- - #/$defs/OpenAIResponseOutputMessageFunctionToolCall - function_call_output: >- - #/$defs/OpenAIResponseInputFunctionToolCallOutput - mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest' - mcp_approval_response: >- - #/$defs/OpenAIResponseMCPApprovalResponse - mcp_call: >- - #/$defs/OpenAIResponseOutputMessageMCPCall - mcp_list_tools: >- - #/$defs/OpenAIResponseOutputMessageMCPListTools - message: '#/$defs/OpenAIResponseMessage' - web_search_call: >- - #/$defs/OpenAIResponseOutputMessageWebSearchToolCall - propertyName: type - oneOf: - - $ref: '#/$defs/OpenAIResponseMessage' - - $ref: >- - #/$defs/OpenAIResponseOutputMessageWebSearchToolCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageFileSearchToolCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageFunctionToolCall - - $ref: >- - #/$defs/OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/$defs/OpenAIResponseMCPApprovalRequest' - - $ref: >- - #/$defs/OpenAIResponseMCPApprovalResponse - - $ref: >- - #/$defs/OpenAIResponseOutputMessageMCPCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageMCPListTools - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - description: The ID of the first item in the list - title: First Id - last_id: - anyOf: - - type: string - - type: 'null' - description: The ID of the last item in the list - title: Last Id - has_more: - default: false - description: Whether there are more items available - title: Has More - type: boolean - required: - - data - title: ConversationItemList - type: object - AddItemsRequest: - type: object ConversationItemDeletedResource: description: Response for deleted conversation item. properties: @@ -8227,176 +13697,15 @@ components: title: Deleted type: boolean required: - - id + - id title: ConversationItemDeletedResource type: object - OpenAIEmbeddingsResponse: - $defs: - OpenAIEmbeddingData: - description: >- - A single embedding data object from an OpenAI-compatible embeddings response. - - - :param object: The object type, which will be "embedding" - - :param embedding: The embedding vector as a list of floats (when encoding_format="float") - or as a base64-encoded string (when encoding_format="base64") - - :param index: The index of the embedding in the input list - properties: - object: - const: embedding - default: embedding - title: Object - type: string - embedding: - anyOf: - - items: - type: number - type: array - - type: string - title: Embedding - index: - title: Index - type: integer - required: - - embedding - - index - title: OpenAIEmbeddingData - type: object - OpenAIEmbeddingUsage: - description: >- - Usage information for an OpenAI-compatible embeddings response. - - - :param prompt_tokens: The number of tokens in the input - - :param total_tokens: The total number of tokens used - properties: - prompt_tokens: - title: Prompt Tokens - type: integer - total_tokens: - title: Total Tokens - type: integer - required: - - prompt_tokens - - total_tokens - title: OpenAIEmbeddingUsage - type: object - description: >- - Response from an OpenAI-compatible embeddings request. - - - :param object: The object type, which will be "list" - - :param data: List of embedding data objects - - :param model: The model that was used to generate the embeddings - - :param usage: Usage information - properties: - object: - const: list - default: list - title: Object - type: string - data: - items: - $ref: '#/$defs/OpenAIEmbeddingData' - title: Data - type: array - model: - title: Model - type: string - usage: - $ref: '#/$defs/OpenAIEmbeddingUsage' - required: - - data - - model - - usage - title: OpenAIEmbeddingsResponse - type: object - OpenAIFilePurpose: - type: object ListOpenAIFileResponse: - $defs: - OpenAIFileObject: - description: >- - OpenAI File object as defined in the OpenAI Files API. - - - :param object: The object type, which is always "file" - - :param id: The file identifier, which can be referenced in the API endpoints - - :param bytes: The size of the file, in bytes - - :param created_at: The Unix timestamp (in seconds) for when the file was - created - - :param expires_at: The Unix timestamp (in seconds) for when the file expires - - :param filename: The name of the file - - :param purpose: The intended purpose of the file - properties: - object: - const: file - default: file - title: Object - type: string - id: - title: Id - type: string - bytes: - title: Bytes - type: integer - created_at: - title: Created At - type: integer - expires_at: - title: Expires At - type: integer - filename: - title: Filename - type: string - purpose: - $ref: '#/$defs/OpenAIFilePurpose' - required: - - id - - bytes - - created_at - - expires_at - - filename - - purpose - title: OpenAIFileObject - type: object - OpenAIFilePurpose: - description: >- - Valid purpose values for OpenAI Files API. - enum: - - assistants - - batch - title: OpenAIFilePurpose - type: string - description: >- - Response for listing files in OpenAI Files API. - - - :param data: List of file objects - - :param has_more: Whether there are more files available beyond this page - - :param first_id: ID of the first file in the list for pagination - - :param last_id: ID of the last file in the list for pagination - - :param object: The object type, which is always "list" + description: "Response for listing files in OpenAI Files API.\n\n:param data: List of file objects\n:param has_more: Whether there are more files available beyond this page\n:param first_id: ID of the first file in the list for pagination\n:param last_id: ID of the last file in the list for pagination\n:param object: The object type, which is always \"list\"" properties: data: items: - $ref: '#/$defs/OpenAIFileObject' + $ref: '#/components/schemas/OpenAIFileObject' title: Data type: array has_more: @@ -8414,104 +13723,14 @@ components: title: Object type: string required: - - data - - has_more - - first_id - - last_id + - data + - has_more + - first_id + - last_id title: ListOpenAIFileResponse type: object - ExpiresAfter: - description: >- - Control expiration of uploaded files. - - - Params: - - anchor, must be "created_at" - - seconds, must be int between 3600 and 2592000 (1 hour to 30 days) - properties: - anchor: - const: created_at - title: Anchor - type: string - seconds: - maximum: 2592000 - minimum: 3600 - title: Seconds - type: integer - required: - - anchor - - seconds - title: ExpiresAfter - type: object - OpenAIFileObject: - $defs: - OpenAIFilePurpose: - description: >- - Valid purpose values for OpenAI Files API. - enum: - - assistants - - batch - title: OpenAIFilePurpose - type: string - description: >- - OpenAI File object as defined in the OpenAI Files API. - - - :param object: The object type, which is always "file" - - :param id: The file identifier, which can be referenced in the API endpoints - - :param bytes: The size of the file, in bytes - - :param created_at: The Unix timestamp (in seconds) for when the file was created - - :param expires_at: The Unix timestamp (in seconds) for when the file expires - - :param filename: The name of the file - - :param purpose: The intended purpose of the file - properties: - object: - const: file - default: file - title: Object - type: string - id: - title: Id - type: string - bytes: - title: Bytes - type: integer - created_at: - title: Created At - type: integer - expires_at: - title: Expires At - type: integer - filename: - title: Filename - type: string - purpose: - $ref: '#/$defs/OpenAIFilePurpose' - required: - - id - - bytes - - created_at - - expires_at - - filename - - purpose - title: OpenAIFileObject - type: object OpenAIFileDeleteResponse: - description: >- - Response for deleting a file in OpenAI Files API. - - - :param id: The file identifier that was deleted - - :param object: The object type, which is always "file" - - :param deleted: Whether the file was successfully deleted + description: "Response for deleting a file in OpenAI Files API.\n\n:param id: The file identifier that was deleted\n:param object: The object type, which is always \"file\"\n:param deleted: Whether the file was successfully deleted" properties: id: title: Id @@ -8525,69 +13744,12 @@ components: title: Deleted type: boolean required: - - id - - deleted + - id + - deleted title: OpenAIFileDeleteResponse type: object - Response: - type: object - HealthInfo: - $defs: - HealthStatus: - enum: - - OK - - Error - - Not Implemented - title: HealthStatus - type: string - description: >- - Health status information for the service. - - - :param status: Current health status of the service - properties: - status: - $ref: '#/$defs/HealthStatus' - required: - - status - title: HealthInfo - type: object - ListRoutesResponse: - $defs: - RouteInfo: - description: >- - Information about an API route including its path, method, and implementing - providers. - - - :param route: The API endpoint path - - :param method: HTTP method for the route - - :param provider_types: List of provider types that implement this route - properties: - route: - title: Route - type: string - method: - title: Method - type: string - provider_types: - items: - type: string - title: Provider Types - type: array - required: - - route - - method - - provider_types - title: RouteInfo - type: object - description: >- - Response containing a list of all available API routes. - - - :param data: List of available route information objects + ListOpenAIChatCompletionResponse: + description: "Response from listing OpenAI-compatible chat completions.\n\n:param data: List of chat completion objects with their input messages\n:param has_more: Whether there are more completions available beyond this list\n:param first_id: ID of the first completion in this list\n:param last_id: ID of the last completion in this list\n:param object: Must be \"list\" to identify this as a list response" properties: data: items: @@ -10271,3183 +15433,270 @@ components: title: Object type: string required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIResponseObject + - data + - has_more + - first_id + - last_id + title: ListOpenAIChatCompletionResponse type: object + OpenAIAssistantMessageParam: + description: "A message containing the model's (assistant) response in an OpenAI-compatible chat completion request.\n\n:param role: Must be \"assistant\" to identify this as the model's response\n:param content: The content of the model's response\n:param name: (Optional) The name of the assistant message participant.\n:param tool_calls: List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object." properties: - code: + role: + const: assistant + default: assistant + title: Role type: string - description: >- - Error code identifying the type of failure - message: - type: string - description: >- - Human-readable error message describing the failure - additionalProperties: false - required: - - code - - message - title: OpenAIResponseError - description: >- - Error details for failed OpenAI response requests. - OpenAIResponseInput: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutput' - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - - $ref: '#/components/schemas/OpenAIResponseMessage' - OpenAIResponseInputToolFileSearch: - type: object - properties: - type: - type: string - const: file_search - default: file_search - description: >- - Tool type identifier, always "file_search" - vector_store_ids: - type: array - items: - type: string - description: >- - List of vector store identifiers to search within - filters: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Additional filters to apply to the search - max_num_results: - type: integer - default: 10 - description: >- - (Optional) Maximum number of search results to return (1-50) - ranking_options: - type: object - properties: - ranker: - type: string - description: >- - (Optional) Name of the ranking algorithm to use - score_threshold: - type: number - default: 0.0 - description: >- - (Optional) Minimum relevance score threshold for results - additionalProperties: false - description: >- - (Optional) Options for ranking and scoring search results - additionalProperties: false - required: - - type - - vector_store_ids - title: OpenAIResponseInputToolFileSearch - description: >- - File search tool configuration for OpenAI response inputs. - OpenAIResponseInputToolFunction: - type: object - properties: - type: - type: string - const: function - default: function - description: Tool type identifier, always "function" - name: - type: string - description: Name of the function that can be called - description: - type: string - description: >- - (Optional) Description of what the function does - parameters: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) JSON schema defining the function's parameters - strict: - type: boolean - description: >- - (Optional) Whether to enforce strict parameter validation - additionalProperties: false - required: - - type - - name - title: OpenAIResponseInputToolFunction - description: >- - Function tool configuration for OpenAI response inputs. - OpenAIResponseInputToolWebSearch: - type: object - properties: - type: - oneOf: - - type: string - const: web_search - - type: string - const: web_search_preview - - type: string - const: web_search_preview_2025_03_11 - default: web_search - description: Web search tool type variant to use - search_context_size: - type: string - default: medium - description: >- - (Optional) Size of search context, must be "low", "medium", or "high" - additionalProperties: false - required: - - type - title: OpenAIResponseInputToolWebSearch - description: >- - Web search tool configuration for OpenAI response inputs. - OpenAIResponseObjectWithInput: - type: object - properties: - created_at: - type: integer - description: >- - Unix timestamp when the response was created - error: - $ref: '#/components/schemas/OpenAIResponseError' - description: >- - (Optional) Error details if the response generation failed - id: - type: string - description: Unique identifier for this response - model: - type: string - description: Model identifier used for generation - object: - type: string - const: response - default: response - description: >- - Object type identifier, always "response" - output: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseOutput' - description: >- - List of generated output items (messages, tool calls, etc.) - parallel_tool_calls: - type: boolean - default: false - description: >- - Whether tool calls can be executed in parallel - previous_response_id: - type: string - description: >- - (Optional) ID of the previous response in a conversation - prompt: - $ref: '#/components/schemas/OpenAIResponsePrompt' - description: >- - (Optional) Reference to a prompt template and its variables. - status: - type: string - description: >- - Current status of the response generation - temperature: - type: number - description: >- - (Optional) Sampling temperature used for generation - text: - $ref: '#/components/schemas/OpenAIResponseText' - description: >- - Text formatting configuration for the response - top_p: - type: number - description: >- - (Optional) Nucleus sampling parameter used for generation - tools: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseTool' - description: >- - (Optional) An array of tools the model may call while generating a response. - truncation: - type: string - description: >- - (Optional) Truncation strategy applied to the response - usage: - $ref: '#/components/schemas/OpenAIResponseUsage' - description: >- - (Optional) Token usage information for the response - instructions: - type: string - description: >- - (Optional) System message inserted into the model's context - input: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInput' - description: >- - List of input items that led to this response - additionalProperties: false - required: - - created_at - - id - - model - - object - - output - - parallel_tool_calls - - status - - text - - input - title: OpenAIResponseObjectWithInput - description: >- - OpenAI response object extended with input context information. - OpenAIResponseOutput: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - discriminator: - propertyName: type - mapping: - message: '#/components/schemas/OpenAIResponseMessage' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - OpenAIResponsePrompt: - type: object - properties: - id: - type: string - description: Unique identifier of the prompt template - variables: - type: object - additionalProperties: - $ref: '#/components/schemas/OpenAIResponseInputMessageContent' - description: >- - Dictionary of variable names to OpenAIResponseInputMessageContent structure - for template substitution. The substitution values can either be strings, - or other Response input types like images or files. - version: - type: string - description: >- - Version number of the prompt to use (defaults to latest if not specified) - additionalProperties: false - required: - - id - title: OpenAIResponsePrompt - description: >- - OpenAI compatible Prompt object that is used in OpenAI responses. - OpenAIResponseText: - type: object - properties: - format: - type: object - properties: - type: - oneOf: - - type: string - const: text - - type: string - const: json_schema - - type: string - const: json_object - description: >- - Must be "text", "json_schema", or "json_object" to identify the format - type - name: - type: string - description: >- - The name of the response format. Only used for json_schema. - schema: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The JSON schema the response should conform to. In a Python SDK, this - is often a `pydantic` model. Only used for json_schema. - description: - type: string - description: >- - (Optional) A description of the response format. Only used for json_schema. - strict: - type: boolean - description: >- - (Optional) Whether to strictly enforce the JSON schema. If true, the - response must match the schema exactly. Only used for json_schema. - additionalProperties: false - required: - - type - description: >- - (Optional) Text format configuration specifying output format requirements - additionalProperties: false - title: OpenAIResponseText - description: >- - Text response configuration for OpenAI responses. - OpenAIResponseTool: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - discriminator: - propertyName: type - mapping: - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - OpenAIResponseToolMCP: - type: object - properties: - type: - type: string - const: mcp - default: mcp - description: Tool type identifier, always "mcp" - server_label: - type: string - description: Label to identify this MCP server - allowed_tools: - oneOf: - - type: array - items: - type: string - - type: object - properties: - tool_names: - type: array - items: - type: string - description: >- - (Optional) List of specific tool names that are allowed - additionalProperties: false - title: AllowedToolsFilter - description: >- - Filter configuration for restricting which MCP tools can be used. - description: >- - (Optional) Restriction on which tools can be used from this server - additionalProperties: false - required: - - type - - server_label - title: OpenAIResponseToolMCP - description: >- - Model Context Protocol (MCP) tool configuration for OpenAI response object. - OpenAIResponseUsage: - type: object - properties: - input_tokens: - type: integer - description: Number of tokens in the input - output_tokens: - type: integer - description: Number of tokens in the output - total_tokens: - type: integer - description: Total tokens used (input + output) - input_tokens_details: - type: object - properties: - cached_tokens: - type: integer - description: Number of tokens retrieved from cache - additionalProperties: false - description: Detailed breakdown of input token usage - output_tokens_details: - type: object - properties: - reasoning_tokens: - type: integer - description: >- - Number of tokens used for reasoning (o1/o3 models) - additionalProperties: false - description: Detailed breakdown of output token usage - additionalProperties: false - required: - - input_tokens - - output_tokens - - total_tokens - title: OpenAIResponseUsage - description: Usage information for OpenAI response. - ResponseGuardrailSpec: - type: object - properties: - type: - type: string - description: The type/identifier of the guardrail. - additionalProperties: false - required: - - type - title: ResponseGuardrailSpec - description: >- - Specification for a guardrail to apply during response generation. - OpenAIResponseInputTool: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - discriminator: - propertyName: type - mapping: - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - OpenAIResponseInputToolMCP: - type: object - properties: - type: - type: string - const: mcp - default: mcp - description: Tool type identifier, always "mcp" - server_label: - type: string - description: Label to identify this MCP server - server_url: - type: string - description: URL endpoint of the MCP server - headers: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) HTTP headers to include when connecting to the server - require_approval: - oneOf: - - type: string - const: always - - type: string - const: never - - type: object - properties: - always: - type: array - items: - type: string - description: >- - (Optional) List of tool names that always require approval - never: - type: array - items: - type: string - description: >- - (Optional) List of tool names that never require approval - additionalProperties: false - title: ApprovalFilter - description: >- - Filter configuration for MCP tool approval requirements. - default: never - description: >- - Approval requirement for tool calls ("always", "never", or filter) - allowed_tools: - oneOf: - - type: array - items: - type: string - - type: object - properties: - tool_names: - type: array - items: - type: string - description: >- - (Optional) List of specific tool names that are allowed - additionalProperties: false - title: AllowedToolsFilter - description: >- - Filter configuration for restricting which MCP tools can be used. - description: >- - (Optional) Restriction on which tools can be used from this server - additionalProperties: false - required: - - type - - server_label - - server_url - - require_approval - title: OpenAIResponseInputToolMCP - description: >- - Model Context Protocol (MCP) tool configuration for OpenAI response inputs. - CreateOpenaiResponseRequest: - type: object - properties: - input: - oneOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInput' - description: Input message(s) to create the response. - model: - type: string - description: The underlying LLM used for completions. - prompt: - $ref: '#/components/schemas/OpenAIResponsePrompt' - description: >- - (Optional) Prompt object with ID, version, and variables. - instructions: - type: string - previous_response_id: - type: string - description: >- - (Optional) if specified, the new response will be a continuation of the - previous response. This can be used to easily fork-off new responses from - existing responses. - conversation: - type: string - description: >- - (Optional) The ID of a conversation to add the response to. Must begin - with 'conv_'. Input and output messages will be automatically added to - the conversation. - store: - type: boolean - stream: - type: boolean - temperature: - type: number - text: - $ref: '#/components/schemas/OpenAIResponseText' - tools: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInputTool' - include: - type: array - items: - type: string - description: >- - (Optional) Additional fields to include in the response. - max_infer_iters: - type: integer - additionalProperties: false - required: - - input - - model - title: CreateOpenaiResponseRequest - OpenAIResponseObject: - $defs: - AllowedToolsFilter: - description: >- - Filter configuration for restricting which MCP tools can be used. - - - :param tool_names: (Optional) List of specific tool names that are allowed - properties: - tool_names: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Tool Names - title: AllowedToolsFilter - type: object - MCPListToolsTool: - description: >- - Tool definition returned by MCP list tools operation. - - - :param input_schema: JSON schema defining the tool's input parameters - - :param name: Name of the tool - - :param description: (Optional) Description of what the tool does - properties: - input_schema: - additionalProperties: true - title: Input Schema - type: object - name: - title: Name - type: string - description: - anyOf: - - type: string - - type: 'null' - title: Description - required: - - input_schema - - name - title: MCPListToolsTool - type: object - OpenAIResponseAnnotationCitation: - description: >- - URL citation annotation for referencing external web resources. - - - :param type: Annotation type identifier, always "url_citation" - - :param end_index: End position of the citation span in the content - - :param start_index: Start position of the citation span in the content - - :param title: Title of the referenced web resource - - :param url: URL of the referenced web resource - properties: - type: - const: url_citation - default: url_citation - title: Type - type: string - end_index: - title: End Index - type: integer - start_index: - title: Start Index - type: integer - title: - title: Title - type: string - url: - title: Url - type: string - required: - - end_index - - start_index - - title - - url - title: OpenAIResponseAnnotationCitation - type: object - "OpenAIResponseAnnotationContainerFileCitation": - properties: - type: - const: container_file_citation - default: container_file_citation - title: Type - type: string - container_id: - title: Container Id - type: string - end_index: - title: End Index - type: integer - file_id: - title: File Id - type: string - filename: - title: Filename - type: string - start_index: - title: Start Index - type: integer - required: - - container_id - - end_index - - file_id - - filename - - start_index - title: >- - OpenAIResponseAnnotationContainerFileCitation - type: object - OpenAIResponseAnnotationFileCitation: - description: >- - File citation annotation for referencing specific files in response content. - - - :param type: Annotation type identifier, always "file_citation" - - :param file_id: Unique identifier of the referenced file - - :param filename: Name of the referenced file - - :param index: Position index of the citation within the content - properties: - type: - const: file_citation - default: file_citation - title: Type - type: string - file_id: - title: File Id - type: string - filename: - title: Filename - type: string - index: - title: Index - type: integer - required: - - file_id - - filename - - index - title: OpenAIResponseAnnotationFileCitation - type: object - OpenAIResponseAnnotationFilePath: - properties: - type: - const: file_path - default: file_path - title: Type - type: string - file_id: - title: File Id - type: string - index: - title: Index - type: integer - required: - - file_id - - index - title: OpenAIResponseAnnotationFilePath - type: object - OpenAIResponseContentPartRefusal: - description: >- - Refusal content within a streamed response part. - - - :param type: Content part type identifier, always "refusal" - - :param refusal: Refusal text supplied by the model - properties: - type: - const: refusal - default: refusal - title: Type - type: string - refusal: - title: Refusal - type: string - required: - - refusal - title: OpenAIResponseContentPartRefusal - type: object - OpenAIResponseError: - description: >- - Error details for failed OpenAI response requests. - - - :param code: Error code identifying the type of failure - - :param message: Human-readable error message describing the failure - properties: - code: - title: Code - type: string - message: - title: Message - type: string - required: - - code - - message - title: OpenAIResponseError - type: object - OpenAIResponseInputMessageContentImage: - description: >- - Image content for input messages in OpenAI response format. - - - :param detail: Level of detail for image processing, can be "low", "high", - or "auto" - - :param type: Content type identifier, always "input_image" - - :param image_url: (Optional) URL of the image content - properties: - detail: - anyOf: - - const: low - type: string - - const: high - type: string - - const: auto - type: string - default: auto - title: Detail - type: - const: input_image - default: input_image - title: Type - type: string - image_url: - anyOf: - - type: string - - type: 'null' - title: Image Url - title: OpenAIResponseInputMessageContentImage - type: object - OpenAIResponseInputMessageContentText: - description: >- - Text content for input messages in OpenAI response format. - - - :param text: The text content of the input message - - :param type: Content type identifier, always "input_text" - properties: - text: - title: Text - type: string - type: - const: input_text - default: input_text - title: Type - type: string - required: - - text - title: OpenAIResponseInputMessageContentText - type: object - OpenAIResponseInputToolFileSearch: - description: >- - File search tool configuration for OpenAI response inputs. - - - :param type: Tool type identifier, always "file_search" - - :param vector_store_ids: List of vector store identifiers to search within - - :param filters: (Optional) Additional filters to apply to the search - - :param max_num_results: (Optional) Maximum number of search results to - return (1-50) - - :param ranking_options: (Optional) Options for ranking and scoring search - results - properties: - type: - const: file_search - default: file_search - title: Type - type: string - vector_store_ids: - items: - type: string - title: Vector Store Ids - type: array - filters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Filters - max_num_results: - anyOf: - - maximum: 50 - minimum: 1 - type: integer - - type: 'null' - default: 10 - title: Max Num Results - ranking_options: - anyOf: - - $ref: '#/$defs/SearchRankingOptions' - - type: 'null' - required: - - vector_store_ids - title: OpenAIResponseInputToolFileSearch - type: object - OpenAIResponseInputToolFunction: - description: >- - Function tool configuration for OpenAI response inputs. - - - :param type: Tool type identifier, always "function" - - :param name: Name of the function that can be called - - :param description: (Optional) Description of what the function does - - :param parameters: (Optional) JSON schema defining the function's parameters - - :param strict: (Optional) Whether to enforce strict parameter validation - properties: - type: - const: function - default: function - title: Type - type: string - name: - title: Name - type: string - description: - anyOf: - - type: string - - type: 'null' - title: Description - parameters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Parameters - strict: - anyOf: - - type: boolean - - type: 'null' - title: Strict - required: - - name - - parameters - title: OpenAIResponseInputToolFunction - type: object - OpenAIResponseInputToolWebSearch: - description: >- - Web search tool configuration for OpenAI response inputs. - - - :param type: Web search tool type variant to use - - :param search_context_size: (Optional) Size of search context, must be - "low", "medium", or "high" - properties: - type: - anyOf: - - const: web_search - type: string - - const: web_search_preview - type: string - - const: web_search_preview_2025_03_11 - type: string - default: web_search - title: Type - search_context_size: - anyOf: - - pattern: ^low|medium|high$ - type: string - - type: 'null' - default: medium - title: Search Context Size - title: OpenAIResponseInputToolWebSearch - type: object - OpenAIResponseMCPApprovalRequest: - description: >- - A request for human approval of a tool invocation. - properties: - arguments: - title: Arguments - type: string - id: - title: Id - type: string - name: - title: Name - type: string - server_label: - title: Server Label - type: string - type: - const: mcp_approval_request - default: mcp_approval_request - title: Type - type: string - required: - - arguments - - id - - name - - server_label - title: OpenAIResponseMCPApprovalRequest - type: object - OpenAIResponseMessage: - description: >- - Corresponds to the various Message types in the Responses API. - - They are all under one type because the Responses API gives them all - - the same "type" value, and there is no way to tell them apart in certain - - scenarios. - properties: - content: - anyOf: - - type: string - - items: - discriminator: - mapping: - input_image: >- - #/$defs/OpenAIResponseInputMessageContentImage - input_text: >- - #/$defs/OpenAIResponseInputMessageContentText - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIResponseInputMessageContentText - - $ref: >- - #/$defs/OpenAIResponseInputMessageContentImage - type: array - - items: - discriminator: - mapping: - output_text: >- - #/$defs/OpenAIResponseOutputMessageContentOutputText - refusal: '#/$defs/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIResponseOutputMessageContentOutputText - - $ref: '#/$defs/OpenAIResponseContentPartRefusal' - type: array - title: Content - role: - anyOf: - - const: system - type: string - - const: developer - type: string - - const: user - type: string - - const: assistant - type: string - title: Role - type: - const: message - default: message - title: Type - type: string - id: - anyOf: - - type: string - - type: 'null' - title: Id - status: - anyOf: - - type: string - - type: 'null' - title: Status - required: - - content - - role - title: OpenAIResponseMessage - type: object - "OpenAIResponseOutputMessageContentOutputText": - properties: - text: - title: Text - type: string - type: - const: output_text - default: output_text - title: Type - type: string - annotations: - items: - discriminator: - mapping: - container_file_citation: >- - #/$defs/OpenAIResponseAnnotationContainerFileCitation - file_citation: >- - #/$defs/OpenAIResponseAnnotationFileCitation - file_path: '#/$defs/OpenAIResponseAnnotationFilePath' - url_citation: '#/$defs/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIResponseAnnotationFileCitation - - $ref: '#/$defs/OpenAIResponseAnnotationCitation' - - $ref: >- - #/$defs/OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/$defs/OpenAIResponseAnnotationFilePath' - title: Annotations - type: array - required: - - text - title: >- - OpenAIResponseOutputMessageContentOutputText - type: object - "OpenAIResponseOutputMessageFileSearchToolCall": - description: >- - File search tool call output message for OpenAI responses. - - - :param id: Unique identifier for this tool call - - :param queries: List of search queries executed - - :param status: Current status of the file search operation - - :param type: Tool call type identifier, always "file_search_call" - - :param results: (Optional) Search results returned by the file search - operation - properties: - id: - title: Id - type: string - queries: - items: - type: string - title: Queries - type: array - status: - title: Status - type: string - type: - const: file_search_call - default: file_search_call - title: Type - type: string - results: - anyOf: - - items: - $ref: >- - #/$defs/OpenAIResponseOutputMessageFileSearchToolCallResults - type: array - - type: 'null' - title: Results - required: - - id - - queries - - status - title: >- - OpenAIResponseOutputMessageFileSearchToolCall - type: object - "OpenAIResponseOutputMessageFileSearchToolCallResults": - description: >- - Search results returned by the file search operation. - - - :param attributes: (Optional) Key-value attributes associated with the - file - - :param file_id: Unique identifier of the file containing the result - - :param filename: Name of the file containing the result - - :param score: Relevance score for this search result (between 0 and 1) - - :param text: Text content of the search result - properties: - attributes: - additionalProperties: true - title: Attributes - type: object - file_id: - title: File Id - type: string - filename: - title: Filename - type: string - score: - title: Score - type: number - text: - title: Text - type: string - required: - - attributes - - file_id - - filename - - score - - text - title: >- - OpenAIResponseOutputMessageFileSearchToolCallResults - type: object - "OpenAIResponseOutputMessageFunctionToolCall": - description: >- - Function tool call output message for OpenAI responses. - - - :param call_id: Unique identifier for the function call - - :param name: Name of the function being called - - :param arguments: JSON string containing the function arguments - - :param type: Tool call type identifier, always "function_call" - - :param id: (Optional) Additional identifier for the tool call - - :param status: (Optional) Current status of the function call execution - properties: - call_id: - title: Call Id - type: string - name: - title: Name - type: string - arguments: - title: Arguments - type: string - type: - const: function_call - default: function_call - title: Type - type: string - id: - anyOf: - - type: string - - type: 'null' - title: Id - status: - anyOf: - - type: string - - type: 'null' - title: Status - required: - - call_id - - name - - arguments - title: >- - OpenAIResponseOutputMessageFunctionToolCall - type: object - OpenAIResponseOutputMessageMCPCall: - description: >- - Model Context Protocol (MCP) call output message for OpenAI responses. - - - :param id: Unique identifier for this MCP call - - :param type: Tool call type identifier, always "mcp_call" - - :param arguments: JSON string containing the MCP call arguments - - :param name: Name of the MCP method being called - - :param server_label: Label identifying the MCP server handling the call - - :param error: (Optional) Error message if the MCP call failed - - :param output: (Optional) Output result from the successful MCP call - properties: - id: - title: Id - type: string - type: - const: mcp_call - default: mcp_call - title: Type - type: string - arguments: - title: Arguments - type: string - name: - title: Name - type: string - server_label: - title: Server Label - type: string - error: - anyOf: - - type: string - - type: 'null' - title: Error - output: - anyOf: - - type: string - - type: 'null' - title: Output - required: - - id - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall - type: object - OpenAIResponseOutputMessageMCPListTools: - description: >- - MCP list tools output message containing available tools from an MCP server. - - - :param id: Unique identifier for this MCP list tools operation - - :param type: Tool call type identifier, always "mcp_list_tools" - - :param server_label: Label identifying the MCP server providing the tools - - :param tools: List of available tools provided by the MCP server - properties: - id: - title: Id - type: string - type: - const: mcp_list_tools - default: mcp_list_tools - title: Type - type: string - server_label: - title: Server Label - type: string - tools: - items: - $ref: '#/$defs/MCPListToolsTool' - title: Tools - type: array - required: - - id - - server_label - - tools - title: OpenAIResponseOutputMessageMCPListTools - type: object - "OpenAIResponseOutputMessageWebSearchToolCall": - description: >- - Web search tool call output message for OpenAI responses. - - - :param id: Unique identifier for this tool call - - :param status: Current status of the web search operation - - :param type: Tool call type identifier, always "web_search_call" - properties: - id: - title: Id - type: string - status: - title: Status - type: string - type: - const: web_search_call - default: web_search_call - title: Type - type: string - required: - - id - - status - title: >- - OpenAIResponseOutputMessageWebSearchToolCall - type: object - OpenAIResponseText: - description: >- - Text response configuration for OpenAI responses. - - - :param format: (Optional) Text format configuration specifying output - format requirements - properties: - format: - anyOf: - - $ref: '#/$defs/OpenAIResponseTextFormat' - - type: 'null' - title: OpenAIResponseText - type: object - OpenAIResponseTextFormat: - description: >- - Configuration for Responses API text format. - - - :param type: Must be "text", "json_schema", or "json_object" to identify - the format type - - :param name: The name of the response format. Only used for json_schema. - - :param schema: The JSON schema the response should conform to. In a Python - SDK, this is often a `pydantic` model. Only used for json_schema. - - :param description: (Optional) A description of the response format. Only - used for json_schema. - - :param strict: (Optional) Whether to strictly enforce the JSON schema. - If true, the response must match the schema exactly. Only used for json_schema. - properties: - type: - anyOf: - - const: text - type: string - - const: json_schema - type: string - - const: json_object - type: string - title: Type - name: - anyOf: - - type: string - - type: 'null' - title: Name - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Schema - description: - anyOf: - - type: string - - type: 'null' - title: Description - strict: - anyOf: - - type: boolean - - type: 'null' - title: Strict - title: OpenAIResponseTextFormat - type: object - OpenAIResponseToolMCP: - description: >- - Model Context Protocol (MCP) tool configuration for OpenAI response object. - - - :param type: Tool type identifier, always "mcp" - - :param server_label: Label to identify this MCP server - - :param allowed_tools: (Optional) Restriction on which tools can be used - from this server - properties: - type: - const: mcp - default: mcp - title: Type - type: string - server_label: - title: Server Label - type: string - allowed_tools: - anyOf: - - items: - type: string - type: array - - $ref: '#/$defs/AllowedToolsFilter' - - type: 'null' - title: Allowed Tools - required: - - server_label - title: OpenAIResponseToolMCP - type: object - OpenAIResponseUsage: - description: >- - Usage information for OpenAI response. - - - :param input_tokens: Number of tokens in the input - - :param output_tokens: Number of tokens in the output - - :param total_tokens: Total tokens used (input + output) - - :param input_tokens_details: Detailed breakdown of input token usage - - :param output_tokens_details: Detailed breakdown of output token usage - properties: - input_tokens: - title: Input Tokens - type: integer - output_tokens: - title: Output Tokens - type: integer - total_tokens: - title: Total Tokens - type: integer - input_tokens_details: - anyOf: - - $ref: >- - #/$defs/OpenAIResponseUsageInputTokensDetails - - type: 'null' - output_tokens_details: - anyOf: - - $ref: >- - #/$defs/OpenAIResponseUsageOutputTokensDetails - - type: 'null' - required: - - input_tokens - - output_tokens - - total_tokens - title: OpenAIResponseUsage - type: object - OpenAIResponseUsageInputTokensDetails: - description: >- - Token details for input tokens in OpenAI response usage. - - - :param cached_tokens: Number of tokens retrieved from cache - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - title: Cached Tokens - title: OpenAIResponseUsageInputTokensDetails - type: object - OpenAIResponseUsageOutputTokensDetails: - description: >- - Token details for output tokens in OpenAI response usage. - - - :param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models) - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - title: Reasoning Tokens - title: OpenAIResponseUsageOutputTokensDetails - type: object - SearchRankingOptions: - description: >- - Options for ranking and filtering search results. - - - :param ranker: (Optional) Name of the ranking algorithm to use - - :param score_threshold: (Optional) Minimum relevance score threshold for - results - properties: - ranker: - anyOf: - - type: string - - type: 'null' - title: Ranker - score_threshold: - anyOf: - - type: number - - type: 'null' - default: 0.0 - title: Score Threshold - title: SearchRankingOptions - type: object - description: >- - Complete OpenAI response object containing generation results and metadata. - - - :param created_at: Unix timestamp when the response was created - - :param error: (Optional) Error details if the response generation failed - - :param id: Unique identifier for this response - - :param model: Model identifier used for generation - - :param object: Object type identifier, always "response" - - :param output: List of generated output items (messages, tool calls, etc.) - - :param parallel_tool_calls: Whether tool calls can be executed in parallel - - :param previous_response_id: (Optional) ID of the previous response in a conversation - - :param status: Current status of the response generation - - :param temperature: (Optional) Sampling temperature used for generation - - :param text: Text formatting configuration for the response - - :param top_p: (Optional) Nucleus sampling parameter used for generation - - :param tools: (Optional) An array of tools the model may call while generating - a response. - - :param truncation: (Optional) Truncation strategy applied to the response - - :param usage: (Optional) Token usage information for the response - - :param instructions: (Optional) System message inserted into the model's context - properties: - created_at: - title: Created At - type: integer - error: + content: anyOf: - - $ref: '#/$defs/OpenAIResponseError' - - type: 'null' + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: Content + nullable: true + name: + title: Name + type: string + nullable: true + tool_calls: + title: Tool Calls + items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + nullable: true + title: OpenAIAssistantMessageParam + type: object + OpenAIChoice: + description: "A choice from an OpenAI-compatible chat completion response.\n\n:param message: The message from the model\n:param finish_reason: The reason the model stopped generating\n:param index: The index of the choice\n:param logprobs: (Optional) The log probabilities for the tokens in the message" + properties: + message: + discriminator: + mapping: + assistant: '#/$defs/OpenAIAssistantMessageParam' + developer: '#/$defs/OpenAIDeveloperMessageParam' + system: '#/$defs/OpenAISystemMessageParam' + tool: '#/$defs/OpenAIToolMessageParam' + user: '#/$defs/OpenAIUserMessageParam' + propertyName: role + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: Message + finish_reason: + title: Finish Reason + type: string + index: + title: Index + type: integer + logprobs: + $ref: '#/components/schemas/OpenAIChoiceLogprobs' + nullable: true + required: + - message + - finish_reason + - index + title: OpenAIChoice + type: object + OpenAIChoiceLogprobs: + description: "The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response.\n\n:param content: (Optional) The log probabilities for the tokens in the message\n:param refusal: (Optional) The log probabilities for the tokens in the message" + properties: + content: + title: Content + items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + nullable: true + refusal: + title: Refusal + items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + nullable: true + title: OpenAIChoiceLogprobs + type: object + OpenAICompletionWithInputMessages: + properties: id: title: Id type: string + choices: + items: + $ref: '#/components/schemas/OpenAIChoice' + title: Choices + type: array + object: + const: chat.completion + default: chat.completion + title: Object + type: string + created: + title: Created + type: integer model: title: Model type: string - object: - const: response - default: response - title: Object - type: string - output: + usage: + $ref: '#/components/schemas/OpenAIChatCompletionUsage' + nullable: true + input_messages: items: discriminator: mapping: - file_search_call: >- - #/$defs/OpenAIResponseOutputMessageFileSearchToolCall - function_call: >- - #/$defs/OpenAIResponseOutputMessageFunctionToolCall - mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest' - mcp_call: >- - #/$defs/OpenAIResponseOutputMessageMCPCall - mcp_list_tools: >- - #/$defs/OpenAIResponseOutputMessageMCPListTools - message: '#/$defs/OpenAIResponseMessage' - web_search_call: >- - #/$defs/OpenAIResponseOutputMessageWebSearchToolCall - propertyName: type + assistant: '#/$defs/OpenAIAssistantMessageParam' + developer: '#/$defs/OpenAIDeveloperMessageParam' + system: '#/$defs/OpenAISystemMessageParam' + tool: '#/$defs/OpenAIToolMessageParam' + user: '#/$defs/OpenAIUserMessageParam' + propertyName: role oneOf: - - $ref: '#/$defs/OpenAIResponseMessage' - - $ref: >- - #/$defs/OpenAIResponseOutputMessageWebSearchToolCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageFileSearchToolCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageFunctionToolCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageMCPCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageMCPListTools - - $ref: '#/$defs/OpenAIResponseMCPApprovalRequest' - title: Output + - $ref: '#/components/schemas/OpenAIUserMessageParam' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: Input Messages type: array - parallel_tool_calls: - default: false - title: Parallel Tool Calls - type: boolean - previous_response_id: - type: string - description: >- - (Optional) ID of the previous response in a conversation - prompt: - $ref: '#/components/schemas/OpenAIResponsePrompt' - description: >- - (Optional) Reference to a prompt template and its variables. - status: - title: Status - type: string - temperature: - anyOf: - - type: number - - type: 'null' - title: Temperature - text: - $ref: '#/$defs/OpenAIResponseText' - default: - format: - type: text - top_p: - anyOf: - - type: number - - type: 'null' - title: Top P - tools: - anyOf: - - items: - discriminator: - mapping: - file_search: >- - #/$defs/OpenAIResponseInputToolFileSearch - function: '#/$defs/OpenAIResponseInputToolFunction' - mcp: '#/$defs/OpenAIResponseToolMCP' - web_search: '#/$defs/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/$defs/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/$defs/OpenAIResponseInputToolWebSearch' - propertyName: type - oneOf: - - $ref: '#/$defs/OpenAIResponseInputToolWebSearch' - - $ref: >- - #/$defs/OpenAIResponseInputToolFileSearch - - $ref: '#/$defs/OpenAIResponseInputToolFunction' - - $ref: '#/$defs/OpenAIResponseToolMCP' - type: array - - type: 'null' - title: Tools - truncation: - anyOf: - - type: string - - type: 'null' - title: Truncation - usage: - anyOf: - - $ref: '#/$defs/OpenAIResponseUsage' - - type: 'null' - instructions: - anyOf: - - type: string - - type: 'null' - title: Instructions required: - - created_at - - id - - model - - output - - status - title: OpenAIResponseObject + - id + - choices + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages type: object - AsyncIterator: - type: object - OpenAIDeleteResponseObject: - description: >- - Response object confirming deletion of an OpenAI response. - - - :param id: Unique identifier of the deleted response - - :param object: Object type identifier, always "response" - - :param deleted: Deletion confirmation flag, always True + OpenAIUserMessageParam: + description: "A message from the user in an OpenAI-compatible chat completion request.\n\n:param role: Must be \"user\" to identify this as a user message\n:param content: The content of the message, which can include text and other media\n:param name: (Optional) The name of the user message participant." properties: - id: - title: Id + role: + const: user + default: user + title: Role type: string - object: - const: response - default: response - title: Object - type: string - deleted: - default: true - title: Deleted - type: boolean - required: - - id - title: OpenAIDeleteResponseObject - type: object - ListOpenAIResponseInputItem: - $defs: - MCPListToolsTool: - description: >- - Tool definition returned by MCP list tools operation. - - - :param input_schema: JSON schema defining the tool's input parameters - - :param name: Name of the tool - - :param description: (Optional) Description of what the tool does - properties: - input_schema: - additionalProperties: true - title: Input Schema - type: object - name: - title: Name - type: string - description: - anyOf: - - type: string - - type: 'null' - title: Description - required: - - input_schema - - name - title: MCPListToolsTool - type: object - OpenAIResponseAnnotationCitation: - description: >- - URL citation annotation for referencing external web resources. - - - :param type: Annotation type identifier, always "url_citation" - - :param end_index: End position of the citation span in the content - - :param start_index: Start position of the citation span in the content - - :param title: Title of the referenced web resource - - :param url: URL of the referenced web resource - properties: - type: - const: url_citation - default: url_citation - title: Type - type: string - end_index: - title: End Index - type: integer - start_index: - title: Start Index - type: integer - title: - title: Title - type: string - url: - title: Url - type: string - required: - - end_index - - start_index - - title - - url - title: OpenAIResponseAnnotationCitation - type: object - "OpenAIResponseAnnotationContainerFileCitation": - properties: - type: - const: container_file_citation - default: container_file_citation - title: Type - type: string - container_id: - title: Container Id - type: string - end_index: - title: End Index - type: integer - file_id: - title: File Id - type: string - filename: - title: Filename - type: string - start_index: - title: Start Index - type: integer - required: - - container_id - - end_index - - file_id - - filename - - start_index - title: >- - OpenAIResponseAnnotationContainerFileCitation - type: object - OpenAIResponseAnnotationFileCitation: - description: >- - File citation annotation for referencing specific files in response content. - - - :param type: Annotation type identifier, always "file_citation" - - :param file_id: Unique identifier of the referenced file - - :param filename: Name of the referenced file - - :param index: Position index of the citation within the content - properties: - type: - const: file_citation - default: file_citation - title: Type - type: string - file_id: - title: File Id - type: string - filename: - title: Filename - type: string - index: - title: Index - type: integer - required: - - file_id - - filename - - index - title: OpenAIResponseAnnotationFileCitation - type: object - OpenAIResponseAnnotationFilePath: - properties: - type: - const: file_path - default: file_path - title: Type - type: string - file_id: - title: File Id - type: string - index: - title: Index - type: integer - required: - - file_id - - index - title: OpenAIResponseAnnotationFilePath - type: object - OpenAIResponseContentPartRefusal: - description: >- - Refusal content within a streamed response part. - - - :param type: Content part type identifier, always "refusal" - - :param refusal: Refusal text supplied by the model - properties: - type: - const: refusal - default: refusal - title: Type - type: string - refusal: - title: Refusal - type: string - required: - - refusal - title: OpenAIResponseContentPartRefusal - type: object - "OpenAIResponseInputFunctionToolCallOutput": - description: >- - This represents the output of a function call that gets passed back to - the model. - properties: - call_id: - title: Call Id - type: string - output: - title: Output - type: string - type: - const: function_call_output - default: function_call_output - title: Type - type: string - id: - anyOf: - - type: string - - type: 'null' - title: Id - status: - anyOf: - - type: string - - type: 'null' - title: Status - required: - - call_id - - output - title: >- - OpenAIResponseInputFunctionToolCallOutput - type: object - OpenAIResponseInputMessageContentImage: - description: >- - Image content for input messages in OpenAI response format. - - - :param detail: Level of detail for image processing, can be "low", "high", - or "auto" - - :param type: Content type identifier, always "input_image" - - :param image_url: (Optional) URL of the image content - properties: - detail: - anyOf: - - const: low - type: string - - const: high - type: string - - const: auto - type: string - default: auto - title: Detail - type: - const: input_image - default: input_image - title: Type - type: string - image_url: - anyOf: - - type: string - - type: 'null' - title: Image Url - title: OpenAIResponseInputMessageContentImage - type: object - OpenAIResponseInputMessageContentText: - description: >- - Text content for input messages in OpenAI response format. - - - :param text: The text content of the input message - - :param type: Content type identifier, always "input_text" - properties: - text: - title: Text - type: string - type: - const: input_text - default: input_text - title: Type - type: string - required: - - text - title: OpenAIResponseInputMessageContentText - type: object - OpenAIResponseMCPApprovalRequest: - description: >- - A request for human approval of a tool invocation. - properties: - arguments: - title: Arguments - type: string - id: - title: Id - type: string - name: - title: Name - type: string - server_label: - title: Server Label - type: string - type: - const: mcp_approval_request - default: mcp_approval_request - title: Type - type: string - required: - - arguments - - id - - name - - server_label - title: OpenAIResponseMCPApprovalRequest - type: object - OpenAIResponseMCPApprovalResponse: - description: A response to an MCP approval request. - properties: - approval_request_id: - title: Approval Request Id - type: string - approve: - title: Approve - type: boolean - type: - const: mcp_approval_response - default: mcp_approval_response - title: Type - type: string - id: - anyOf: - - type: string - - type: 'null' - title: Id - reason: - anyOf: - - type: string - - type: 'null' - title: Reason - required: - - approval_request_id - - approve - title: OpenAIResponseMCPApprovalResponse - type: object - OpenAIResponseMessage: - description: >- - Corresponds to the various Message types in the Responses API. - - They are all under one type because the Responses API gives them all - - the same "type" value, and there is no way to tell them apart in certain - - scenarios. - properties: - content: - anyOf: - - type: string - - items: - discriminator: - mapping: - input_image: >- - #/$defs/OpenAIResponseInputMessageContentImage - input_text: >- - #/$defs/OpenAIResponseInputMessageContentText - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIResponseInputMessageContentText - - $ref: >- - #/$defs/OpenAIResponseInputMessageContentImage - type: array - - items: - discriminator: - mapping: - output_text: >- - #/$defs/OpenAIResponseOutputMessageContentOutputText - refusal: '#/$defs/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIResponseOutputMessageContentOutputText - - $ref: '#/$defs/OpenAIResponseContentPartRefusal' - type: array - title: Content - role: - anyOf: - - const: system - type: string - - const: developer - type: string - - const: user - type: string - - const: assistant - type: string - title: Role - type: - const: message - default: message - title: Type - type: string - id: - anyOf: - - type: string - - type: 'null' - title: Id - status: - anyOf: - - type: string - - type: 'null' - title: Status - required: - - content - - role - title: OpenAIResponseMessage - type: object - "OpenAIResponseOutputMessageContentOutputText": - properties: - text: - title: Text - type: string - type: - const: output_text - default: output_text - title: Type - type: string - annotations: - items: - discriminator: - mapping: - container_file_citation: >- - #/$defs/OpenAIResponseAnnotationContainerFileCitation - file_citation: >- - #/$defs/OpenAIResponseAnnotationFileCitation - file_path: '#/$defs/OpenAIResponseAnnotationFilePath' - url_citation: '#/$defs/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIResponseAnnotationFileCitation - - $ref: '#/$defs/OpenAIResponseAnnotationCitation' - - $ref: >- - #/$defs/OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/$defs/OpenAIResponseAnnotationFilePath' - title: Annotations - type: array - required: - - text - title: >- - OpenAIResponseOutputMessageContentOutputText - type: object - "OpenAIResponseOutputMessageFileSearchToolCall": - description: >- - File search tool call output message for OpenAI responses. - - - :param id: Unique identifier for this tool call - - :param queries: List of search queries executed - - :param status: Current status of the file search operation - - :param type: Tool call type identifier, always "file_search_call" - - :param results: (Optional) Search results returned by the file search - operation - properties: - id: - title: Id - type: string - queries: - items: - type: string - title: Queries - type: array - status: - title: Status - type: string - type: - const: file_search_call - default: file_search_call - title: Type - type: string - results: - anyOf: - - items: - $ref: >- - #/$defs/OpenAIResponseOutputMessageFileSearchToolCallResults - type: array - - type: 'null' - title: Results - required: - - id - - queries - - status - title: >- - OpenAIResponseOutputMessageFileSearchToolCall - type: object - "OpenAIResponseOutputMessageFileSearchToolCallResults": - description: >- - Search results returned by the file search operation. - - - :param attributes: (Optional) Key-value attributes associated with the - file - - :param file_id: Unique identifier of the file containing the result - - :param filename: Name of the file containing the result - - :param score: Relevance score for this search result (between 0 and 1) - - :param text: Text content of the search result - properties: - attributes: - additionalProperties: true - title: Attributes - type: object - file_id: - title: File Id - type: string - filename: - title: Filename - type: string - score: - title: Score - type: number - text: - title: Text - type: string - required: - - attributes - - file_id - - filename - - score - - text - title: >- - OpenAIResponseOutputMessageFileSearchToolCallResults - type: object - "OpenAIResponseOutputMessageFunctionToolCall": - description: >- - Function tool call output message for OpenAI responses. - - - :param call_id: Unique identifier for the function call - - :param name: Name of the function being called - - :param arguments: JSON string containing the function arguments - - :param type: Tool call type identifier, always "function_call" - - :param id: (Optional) Additional identifier for the tool call - - :param status: (Optional) Current status of the function call execution - properties: - call_id: - title: Call Id - type: string - name: - title: Name - type: string - arguments: - title: Arguments - type: string - type: - const: function_call - default: function_call - title: Type - type: string - id: - anyOf: - - type: string - - type: 'null' - title: Id - status: - anyOf: - - type: string - - type: 'null' - title: Status - required: - - call_id - - name - - arguments - title: >- - OpenAIResponseOutputMessageFunctionToolCall - type: object - OpenAIResponseOutputMessageMCPCall: - description: >- - Model Context Protocol (MCP) call output message for OpenAI responses. - - - :param id: Unique identifier for this MCP call - - :param type: Tool call type identifier, always "mcp_call" - - :param arguments: JSON string containing the MCP call arguments - - :param name: Name of the MCP method being called - - :param server_label: Label identifying the MCP server handling the call - - :param error: (Optional) Error message if the MCP call failed - - :param output: (Optional) Output result from the successful MCP call - properties: - id: - title: Id - type: string - type: - const: mcp_call - default: mcp_call - title: Type - type: string - arguments: - title: Arguments - type: string - name: - title: Name - type: string - server_label: - title: Server Label - type: string - error: - anyOf: - - type: string - - type: 'null' - title: Error - output: - anyOf: - - type: string - - type: 'null' - title: Output - required: - - id - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall - type: object - OpenAIResponseOutputMessageMCPListTools: - description: >- - MCP list tools output message containing available tools from an MCP server. - - - :param id: Unique identifier for this MCP list tools operation - - :param type: Tool call type identifier, always "mcp_list_tools" - - :param server_label: Label identifying the MCP server providing the tools - - :param tools: List of available tools provided by the MCP server - properties: - id: - title: Id - type: string - type: - const: mcp_list_tools - default: mcp_list_tools - title: Type - type: string - server_label: - title: Server Label - type: string - tools: - items: - $ref: '#/$defs/MCPListToolsTool' - title: Tools - type: array - required: - - id - - server_label - - tools - title: OpenAIResponseOutputMessageMCPListTools - type: object - "OpenAIResponseOutputMessageWebSearchToolCall": - description: >- - Web search tool call output message for OpenAI responses. - - - :param id: Unique identifier for this tool call - - :param status: Current status of the web search operation - - :param type: Tool call type identifier, always "web_search_call" - properties: - id: - title: Id - type: string - status: - title: Status - type: string - type: - const: web_search_call - default: web_search_call - title: Type - type: string - required: - - id - - status - title: >- - OpenAIResponseOutputMessageWebSearchToolCall - type: object - description: >- - List container for OpenAI response input items. - - - :param data: List of input items - - :param object: Object type identifier, always "list" - properties: - data: - items: - anyOf: - - discriminator: - mapping: - file_search_call: >- - #/$defs/OpenAIResponseOutputMessageFileSearchToolCall - function_call: >- - #/$defs/OpenAIResponseOutputMessageFunctionToolCall - mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest' - mcp_call: >- - #/$defs/OpenAIResponseOutputMessageMCPCall - mcp_list_tools: >- - #/$defs/OpenAIResponseOutputMessageMCPListTools - message: '#/$defs/OpenAIResponseMessage' - web_search_call: >- - #/$defs/OpenAIResponseOutputMessageWebSearchToolCall - propertyName: type - oneOf: - - $ref: '#/$defs/OpenAIResponseMessage' - - $ref: >- - #/$defs/OpenAIResponseOutputMessageWebSearchToolCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageFileSearchToolCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageFunctionToolCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageMCPCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageMCPListTools - - $ref: '#/$defs/OpenAIResponseMCPApprovalRequest' - - $ref: >- - #/$defs/OpenAIResponseInputFunctionToolCallOutput - - $ref: >- - #/$defs/OpenAIResponseMCPApprovalResponse - - $ref: '#/$defs/OpenAIResponseMessage' - title: Data - type: array - object: - const: list - default: list - title: Object - type: string - required: - - data - title: ListOpenAIResponseInputItem - type: object - RunShieldRequest: - type: object - RunShieldResponse: - $defs: - SafetyViolation: - description: >- - Details of a safety violation detected by content moderation. - - - :param violation_level: Severity level of the violation - - :param user_message: (Optional) Message to convey to the user about the - violation - - :param metadata: Additional metadata including specific violation codes - for debugging and telemetry - properties: - violation_level: - $ref: '#/$defs/ViolationLevel' - user_message: - anyOf: - - type: string - - type: 'null' - title: User Message - metadata: - additionalProperties: true - title: Metadata - type: object - required: - - violation_level - title: SafetyViolation - type: object - ViolationLevel: - description: >- - Severity level of a safety violation. - - - :cvar INFO: Informational level violation that does not require action - - :cvar WARN: Warning level violation that suggests caution but allows continuation - - :cvar ERROR: Error level violation that requires blocking or intervention - enum: - - info - - warn - - error - title: ViolationLevel - type: string - description: >- - Response from running a safety shield. - - - :param violation: (Optional) Safety violation detected by the shield, if any - properties: - violation: + content: anyOf: - - $ref: '#/$defs/SafetyViolation' - - type: 'null' - title: RunShieldResponse - type: object - ListScoringFunctionsResponse: - $defs: - AgentTurnInputType: - description: >- - Parameter type for agent turn input. - - - :param type: Discriminator type. Always "agent_turn_input" - properties: - type: - const: agent_turn_input - default: agent_turn_input - title: Type - type: string - title: AgentTurnInputType - type: object - AggregationFunctionType: - description: >- - Types of aggregation functions for scoring results. - - :cvar average: Calculate the arithmetic mean of scores - - :cvar weighted_average: Calculate a weighted average of scores - - :cvar median: Calculate the median value of scores - - :cvar categorical_count: Count occurrences of categorical values - - :cvar accuracy: Calculate accuracy as the proportion of correct answers - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - type: string - ArrayType: - description: >- - Parameter type for array values. - - - :param type: Discriminator type. Always "array" - properties: - type: - const: array - default: array - title: Type - type: string - title: ArrayType - type: object - BasicScoringFnParams: - description: >- - Parameters for basic scoring function configuration. - - :param type: The type of scoring function parameters, always basic - - :param aggregation_functions: Aggregation functions to apply to the scores - of each row - properties: - type: - const: basic - default: basic - title: Type - type: string - aggregation_functions: - description: >- - Aggregation functions to apply to the scores of each row - items: - $ref: '#/$defs/AggregationFunctionType' - title: Aggregation Functions - type: array - title: BasicScoringFnParams - type: object - BooleanType: - description: >- - Parameter type for boolean values. - - - :param type: Discriminator type. Always "boolean" - properties: - type: - const: boolean - default: boolean - title: Type - type: string - title: BooleanType - type: object - ChatCompletionInputType: - description: >- - Parameter type for chat completion input. - - - :param type: Discriminator type. Always "chat_completion_input" - properties: - type: - const: chat_completion_input - default: chat_completion_input - title: Type - type: string - title: ChatCompletionInputType - type: object - CompletionInputType: - description: >- - Parameter type for completion input. - - - :param type: Discriminator type. Always "completion_input" - properties: - type: - const: completion_input - default: completion_input - title: Type - type: string - title: CompletionInputType - type: object - JsonType: - description: >- - Parameter type for JSON values. - - - :param type: Discriminator type. Always "json" - properties: - type: - const: json - default: json - title: Type - type: string - title: JsonType - type: object - LLMAsJudgeScoringFnParams: - description: >- - Parameters for LLM-as-judge scoring function configuration. - - :param type: The type of scoring function parameters, always llm_as_judge - - :param judge_model: Identifier of the LLM model to use as a judge for - scoring - - :param prompt_template: (Optional) Custom prompt template for the judge - model - - :param judge_score_regexes: Regexes to extract the answer from generated - response - - :param aggregation_functions: Aggregation functions to apply to the scores - of each row - properties: - type: - const: llm_as_judge - default: llm_as_judge - title: Type - type: string - judge_model: - title: Judge Model - type: string - prompt_template: - anyOf: - - type: string - - type: 'null' - title: Prompt Template - judge_score_regexes: - description: >- - Regexes to extract the answer from generated response - items: - type: string - title: Judge Score Regexes - type: array - aggregation_functions: - description: >- - Aggregation functions to apply to the scores of each row - items: - $ref: '#/$defs/AggregationFunctionType' - title: Aggregation Functions - type: array - required: - - judge_model - title: LLMAsJudgeScoringFnParams - type: object - NumberType: - description: >- - Parameter type for numeric values. - - - :param type: Discriminator type. Always "number" - properties: - type: - const: number - default: number - title: Type - type: string - title: NumberType - type: object - ObjectType: - description: >- - Parameter type for object values. - - - :param type: Discriminator type. Always "object" - properties: - type: - const: object - default: object - title: Type - type: string - title: ObjectType - type: object - RegexParserScoringFnParams: - description: >- - Parameters for regex parser scoring function configuration. - - :param type: The type of scoring function parameters, always regex_parser - - :param parsing_regexes: Regex to extract the answer from generated response - - :param aggregation_functions: Aggregation functions to apply to the scores - of each row - properties: - type: - const: regex_parser - default: regex_parser - title: Type - type: string - parsing_regexes: - description: >- - Regex to extract the answer from generated response - items: - type: string - title: Parsing Regexes - type: array - aggregation_functions: - description: >- - Aggregation functions to apply to the scores of each row - items: - $ref: '#/$defs/AggregationFunctionType' - title: Aggregation Functions - type: array - title: RegexParserScoringFnParams - type: object - ScoringFn: - description: >- - A scoring function resource for evaluating model outputs. - - :param type: The resource type, always scoring_function - properties: - identifier: - description: >- - Unique identifier for this resource in llama stack - title: Identifier - type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: >- - Unique identifier for this resource in the provider - title: Provider Resource Id - provider_id: - description: >- - ID of the provider that owns this resource - title: Provider Id - type: string - type: - const: scoring_function - default: scoring_function - title: Type - type: string - description: - anyOf: - - type: string - - type: 'null' - title: Description - metadata: - additionalProperties: true - description: >- - Any additional metadata for this definition - title: Metadata - type: object - return_type: - description: >- - The return type of the deterministic function + - type: string + - items: discriminator: mapping: - agent_turn_input: '#/$defs/AgentTurnInputType' - array: '#/$defs/ArrayType' - boolean: '#/$defs/BooleanType' - chat_completion_input: '#/$defs/ChatCompletionInputType' - completion_input: '#/$defs/CompletionInputType' - json: '#/$defs/JsonType' - number: '#/$defs/NumberType' - object: '#/$defs/ObjectType' - string: '#/$defs/StringType' - union: '#/$defs/UnionType' + file: '#/$defs/OpenAIFile' + image_url: '#/$defs/OpenAIChatCompletionContentPartImageParam' + text: '#/$defs/OpenAIChatCompletionContentPartTextParam' propertyName: type oneOf: - - $ref: '#/$defs/StringType' - - $ref: '#/$defs/NumberType' - - $ref: '#/$defs/BooleanType' - - $ref: '#/$defs/ArrayType' - - $ref: '#/$defs/ObjectType' - - $ref: '#/$defs/JsonType' - - $ref: '#/$defs/UnionType' - - $ref: '#/$defs/ChatCompletionInputType' - - $ref: '#/$defs/CompletionInputType' - - $ref: '#/$defs/AgentTurnInputType' - title: Return Type - params: - anyOf: - - discriminator: - mapping: - basic: '#/$defs/BasicScoringFnParams' - llm_as_judge: '#/$defs/LLMAsJudgeScoringFnParams' - regex_parser: '#/$defs/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/$defs/LLMAsJudgeScoringFnParams' - - $ref: '#/$defs/RegexParserScoringFnParams' - - $ref: '#/$defs/BasicScoringFnParams' - - type: 'null' - description: >- - The parameters for the scoring function for benchmark eval, these - can be overridden for app eval - title: Params - required: - - identifier - - provider_id - - return_type - title: ScoringFn - type: object - StringType: - description: >- - Parameter type for string values. - - - :param type: Discriminator type. Always "string" - properties: - type: - const: string - default: string - title: Type - type: string - title: StringType - type: object - UnionType: - description: >- - Parameter type for union values. - - - :param type: Discriminator type. Always "union" - properties: - type: - const: union - default: union - title: Type - type: string - title: UnionType - type: object - properties: - data: - items: - $ref: '#/$defs/ScoringFn' - title: Data - type: array - required: - - data - title: ListScoringFunctionsResponse - type: object - RegisterScoringFunctionRequest: - type: object - ScoringFn: - $defs: - AgentTurnInputType: - description: >- - Parameter type for agent turn input. - - - :param type: Discriminator type. Always "agent_turn_input" - properties: - type: - const: agent_turn_input - default: agent_turn_input - title: Type - type: string - title: AgentTurnInputType - type: object - AggregationFunctionType: - description: >- - Types of aggregation functions for scoring results. - - :cvar average: Calculate the arithmetic mean of scores - - :cvar weighted_average: Calculate a weighted average of scores - - :cvar median: Calculate the median value of scores - - :cvar categorical_count: Count occurrences of categorical values - - :cvar accuracy: Calculate accuracy as the proportion of correct answers - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + - $ref: '#/components/schemas/OpenAIFile' + type: array + title: Content + name: + title: Name type: string - ArrayType: - description: >- - Parameter type for array values. - - - :param type: Discriminator type. Always "array" - properties: - type: - const: array - default: array - title: Type - type: string - title: ArrayType - type: object - BasicScoringFnParams: - description: >- - Parameters for basic scoring function configuration. - - :param type: The type of scoring function parameters, always basic - - :param aggregation_functions: Aggregation functions to apply to the scores - of each row - properties: - type: - const: basic - default: basic - title: Type - type: string - aggregation_functions: - description: >- - Aggregation functions to apply to the scores of each row - items: - $ref: '#/$defs/AggregationFunctionType' - title: Aggregation Functions - type: array - title: BasicScoringFnParams - type: object - BooleanType: - description: >- - Parameter type for boolean values. - - - :param type: Discriminator type. Always "boolean" - properties: - type: - const: boolean - default: boolean - title: Type - type: string - title: BooleanType - type: object - ChatCompletionInputType: - description: >- - Parameter type for chat completion input. - - - :param type: Discriminator type. Always "chat_completion_input" - properties: - type: - const: chat_completion_input - default: chat_completion_input - title: Type - type: string - title: ChatCompletionInputType - type: object - CompletionInputType: - description: >- - Parameter type for completion input. - - - :param type: Discriminator type. Always "completion_input" - properties: - type: - const: completion_input - default: completion_input - title: Type - type: string - title: CompletionInputType - type: object - JsonType: - description: >- - Parameter type for JSON values. - - - :param type: Discriminator type. Always "json" - properties: - type: - const: json - default: json - title: Type - type: string - title: JsonType - type: object - LLMAsJudgeScoringFnParams: - description: >- - Parameters for LLM-as-judge scoring function configuration. - - :param type: The type of scoring function parameters, always llm_as_judge - - :param judge_model: Identifier of the LLM model to use as a judge for - scoring - - :param prompt_template: (Optional) Custom prompt template for the judge - model - - :param judge_score_regexes: Regexes to extract the answer from generated - response - - :param aggregation_functions: Aggregation functions to apply to the scores - of each row - properties: - type: - const: llm_as_judge - default: llm_as_judge - title: Type - type: string - judge_model: - title: Judge Model - type: string - prompt_template: - anyOf: - - type: string - - type: 'null' - title: Prompt Template - judge_score_regexes: - description: >- - Regexes to extract the answer from generated response - items: - type: string - title: Judge Score Regexes - type: array - aggregation_functions: - description: >- - Aggregation functions to apply to the scores of each row - items: - $ref: '#/$defs/AggregationFunctionType' - title: Aggregation Functions - type: array - required: - - judge_model - title: LLMAsJudgeScoringFnParams - type: object - NumberType: - description: >- - Parameter type for numeric values. - - - :param type: Discriminator type. Always "number" - properties: - type: - const: number - default: number - title: Type - type: string - title: NumberType - type: object - ObjectType: - description: >- - Parameter type for object values. - - - :param type: Discriminator type. Always "object" - properties: - type: - const: object - default: object - title: Type - type: string - title: ObjectType - type: object - RegexParserScoringFnParams: - description: >- - Parameters for regex parser scoring function configuration. - - :param type: The type of scoring function parameters, always regex_parser - - :param parsing_regexes: Regex to extract the answer from generated response - - :param aggregation_functions: Aggregation functions to apply to the scores - of each row - properties: - type: - const: regex_parser - default: regex_parser - title: Type - type: string - parsing_regexes: - description: >- - Regex to extract the answer from generated response - items: - type: string - title: Parsing Regexes - type: array - aggregation_functions: - description: >- - Aggregation functions to apply to the scores of each row - items: - $ref: '#/$defs/AggregationFunctionType' - title: Aggregation Functions - type: array - title: RegexParserScoringFnParams - type: object - StringType: - description: >- - Parameter type for string values. - - - :param type: Discriminator type. Always "string" - properties: - type: - const: string - default: string - title: Type - type: string - title: StringType - type: object - UnionType: - description: >- - Parameter type for union values. - - - :param type: Discriminator type. Always "union" - properties: - type: - const: union - default: union - title: Type - type: string - title: UnionType - type: object - description: >- - A scoring function resource for evaluating model outputs. - - :param type: The resource type, always scoring_function + nullable: true + required: + - content + title: OpenAIUserMessageParam + type: object + Checkpoint: + description: "Checkpoint created during training runs.\n\n:param identifier: Unique identifier for the checkpoint\n:param created_at: Timestamp when the checkpoint was created\n:param epoch: Training epoch when the checkpoint was saved\n:param post_training_job_id: Identifier of the training job that created this checkpoint\n:param path: File system path where the checkpoint is stored\n:param training_metrics: (Optional) Training metrics associated with this checkpoint" properties: identifier: - description: >- - Unique identifier for this resource in llama stack + title: Identifier + type: string + created_at: + format: date-time + title: Created At + type: string + epoch: + title: Epoch + type: integer + post_training_job_id: + title: Post Training Job Id + type: string + path: + title: Path + type: string + training_metrics: + $ref: '#/components/schemas/PostTrainingMetric' + nullable: true + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint + type: object + PostTrainingJobArtifactsResponse: + description: "Artifacts of a finetuning job.\n\n:param job_uuid: Unique identifier for the training job\n:param checkpoints: List of model checkpoints created during training" + properties: + job_uuid: + title: Job Uuid + type: string + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array + required: + - job_uuid + title: PostTrainingJobArtifactsResponse + type: object + PostTrainingJobStatusResponse: + description: "Status of a finetuning job.\n\n:param job_uuid: Unique identifier for the training job\n:param status: Current status of the training job\n:param scheduled_at: (Optional) Timestamp when the job was scheduled\n:param started_at: (Optional) Timestamp when the job execution began\n:param completed_at: (Optional) Timestamp when the job finished, if completed\n:param resources_allocated: (Optional) Information about computational resources allocated to the job\n:param checkpoints: List of model checkpoints created during training" + properties: + job_uuid: + title: Job Uuid + type: string + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + title: Scheduled At + format: date-time + type: string + nullable: true + started_at: + title: Started At + format: date-time + type: string + nullable: true + completed_at: + title: Completed At + format: date-time + type: string + nullable: true + resources_allocated: + title: Resources Allocated + additionalProperties: true + type: object + nullable: true + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array + required: + - job_uuid + - status + title: PostTrainingJobStatusResponse + type: object + ScoringFn: + description: "A scoring function resource for evaluating model outputs.\n:param type: The resource type, always scoring_function" + properties: + identifier: + description: Unique identifier for this resource in llama stack title: Identifier type: string provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: >- - Unique identifier for this resource in the provider + description: Unique identifier for this resource in the provider title: Provider Resource Id + type: string + nullable: true provider_id: - description: >- - ID of the provider that owns this resource + description: ID of the provider that owns this resource title: Provider Id type: string type: @@ -13456,19 +15705,16 @@ components: title: Type type: string description: - anyOf: - - type: string - - type: 'null' title: Description + type: string + nullable: true metadata: additionalProperties: true - description: >- - Any additional metadata for this definition + description: Any additional metadata for this definition title: Metadata type: object return_type: - description: >- - The return type of the deterministic function + description: The return type of the deterministic function discriminator: mapping: agent_turn_input: '#/$defs/AgentTurnInputType' @@ -13483,38 +15729,35 @@ components: union: '#/$defs/UnionType' propertyName: type oneOf: - - $ref: '#/$defs/StringType' - - $ref: '#/$defs/NumberType' - - $ref: '#/$defs/BooleanType' - - $ref: '#/$defs/ArrayType' - - $ref: '#/$defs/ObjectType' - - $ref: '#/$defs/JsonType' - - $ref: '#/$defs/UnionType' - - $ref: '#/$defs/ChatCompletionInputType' - - $ref: '#/$defs/CompletionInputType' - - $ref: '#/$defs/AgentTurnInputType' + - $ref: '#/components/schemas/StringType' + - $ref: '#/components/schemas/NumberType' + - $ref: '#/components/schemas/BooleanType' + - $ref: '#/components/schemas/ArrayType' + - $ref: '#/components/schemas/ObjectType' + - $ref: '#/components/schemas/JsonType' + - $ref: '#/components/schemas/UnionType' + - $ref: '#/components/schemas/ChatCompletionInputType' + - $ref: '#/components/schemas/CompletionInputType' + - $ref: '#/components/schemas/AgentTurnInputType' title: Return Type params: - anyOf: - - discriminator: - mapping: - basic: '#/$defs/BasicScoringFnParams' - llm_as_judge: '#/$defs/LLMAsJudgeScoringFnParams' - regex_parser: '#/$defs/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/$defs/LLMAsJudgeScoringFnParams' - - $ref: '#/$defs/RegexParserScoringFnParams' - - $ref: '#/$defs/BasicScoringFnParams' - - type: 'null' - description: >- - The parameters for the scoring function for benchmark eval, these can - be overridden for app eval + description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval title: Params + discriminator: + mapping: + basic: '#/$defs/BasicScoringFnParams' + llm_as_judge: '#/$defs/LLMAsJudgeScoringFnParams' + regex_parser: '#/$defs/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + - $ref: '#/components/schemas/RegexParserScoringFnParams' + - $ref: '#/components/schemas/BasicScoringFnParams' + nullable: true required: - - identifier - - provider_id - - return_type + - identifier + - provider_id + - return_type title: ScoringFn type: object ScoreRequest: @@ -14241,1005 +16484,19 @@ components: title: URL type: object ListToolDefsResponse: - $defs: - ToolDef: - description: >- - Tool definition used in runtime contexts. - - - :param name: Name of the tool - - :param description: (Optional) Human-readable description of what the - tool does - - :param input_schema: (Optional) JSON Schema for tool inputs (MCP inputSchema) - - :param output_schema: (Optional) JSON Schema for tool outputs (MCP outputSchema) - - :param metadata: (Optional) Additional metadata about the tool - - :param toolgroup_id: (Optional) ID of the tool group this tool belongs - to - properties: - toolgroup_id: - anyOf: - - type: string - - type: 'null' - title: Toolgroup Id - name: - title: Name - type: string - description: - anyOf: - - type: string - - type: 'null' - title: Description - input_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Input Schema - output_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Output Schema - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Metadata - required: - - name - title: ToolDef - type: object - description: >- - Response containing a list of tool definitions. - - - :param data: List of tool definitions + description: "Response containing a list of tool definitions.\n\n:param data: List of tool definitions" properties: data: items: - $ref: '#/$defs/ToolDef' + $ref: '#/components/schemas/ToolDef' title: Data type: array required: - - data + - data title: ListToolDefsResponse type: object - InsertRequest: - type: object - QueryRequest: - type: object - RAGQueryResult: - $defs: - ImageContentItem: - description: >- - A image content item - - - :param type: Discriminator type of the content item. Always "image" - - :param image: Image as a base64 encoded string or an URL - properties: - type: - const: image - default: image - title: Type - type: string - image: - $ref: '#/$defs/_URLOrData' - required: - - image - title: ImageContentItem - type: object - TextContentItem: - description: >- - A text content item - - - :param type: Discriminator type of the content item. Always "text" - - :param text: Text content - properties: - type: - const: text - default: text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: TextContentItem - type: object - URL: - description: >- - A URL reference to external content. - - - :param uri: The URL string pointing to the resource - properties: - uri: - title: Uri - type: string - required: - - uri - title: URL - type: object - _URLOrData: - description: >- - A URL or a base64 encoded string - - - :param url: A URL of the image or data URL in the format of data:image/{type};base64,{data}. - Note that URL could have length limits. - - :param data: base64 encoded image data as string - properties: - url: - anyOf: - - $ref: '#/$defs/URL' - - type: 'null' - data: - anyOf: - - type: string - - type: 'null' - contentEncoding: base64 - title: Data - title: _URLOrData - type: object - description: >- - Result of a RAG query containing retrieved content and metadata. - - - :param content: (Optional) The retrieved content from the query - - :param metadata: Additional metadata about the query result - properties: - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/$defs/ImageContentItem' - text: '#/$defs/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/$defs/ImageContentItem' - - $ref: '#/$defs/TextContentItem' - - items: - discriminator: - mapping: - image: '#/$defs/ImageContentItem' - text: '#/$defs/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/$defs/ImageContentItem' - - $ref: '#/$defs/TextContentItem' - type: array - - type: 'null' - title: Content - metadata: - additionalProperties: true - title: Metadata - type: object - title: RAGQueryResult - type: object - ListToolGroupsResponse: - $defs: - ToolGroup: - description: >- - A group of related tools managed together. - - - :param type: Type of resource, always 'tool_group' - - :param mcp_endpoint: (Optional) Model Context Protocol endpoint for remote - tools - - :param args: (Optional) Additional arguments for the tool group - properties: - identifier: - description: >- - Unique identifier for this resource in llama stack - title: Identifier - type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: >- - Unique identifier for this resource in the provider - title: Provider Resource Id - provider_id: - description: >- - ID of the provider that owns this resource - title: Provider Id - type: string - type: - const: tool_group - default: tool_group - title: Type - type: string - mcp_endpoint: - anyOf: - - $ref: '#/$defs/URL' - - type: 'null' - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Args - required: - - identifier - - provider_id - title: ToolGroup - type: object - URL: - description: >- - A URL reference to external content. - - - :param uri: The URL string pointing to the resource - properties: - uri: - title: Uri - type: string - required: - - uri - title: URL - type: object - description: >- - Response containing a list of tool groups. - - - :param data: List of tool groups - properties: - data: - items: - $ref: '#/$defs/ToolGroup' - title: Data - type: array - required: - - data - title: ListToolGroupsResponse - type: object - RegisterToolGroupRequest: - type: object - ToolGroup: - $defs: - URL: - description: >- - A URL reference to external content. - - - :param uri: The URL string pointing to the resource - properties: - uri: - title: Uri - type: string - required: - - uri - title: URL - type: object - description: >- - A group of related tools managed together. - - - :param type: Type of resource, always 'tool_group' - - :param mcp_endpoint: (Optional) Model Context Protocol endpoint for remote - tools - - :param args: (Optional) Additional arguments for the tool group - properties: - identifier: - description: >- - Unique identifier for this resource in llama stack - title: Identifier - type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: >- - Unique identifier for this resource in the provider - title: Provider Resource Id - provider_id: - description: >- - ID of the provider that owns this resource - title: Provider Id - type: string - type: - const: tool_group - default: tool_group - title: Type - type: string - mcp_endpoint: - anyOf: - - $ref: '#/$defs/URL' - - type: 'null' - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Args - required: - - identifier - - provider_id - title: ToolGroup - type: object - ToolDef: - description: >- - Tool definition used in runtime contexts. - - - :param name: Name of the tool - - :param description: (Optional) Human-readable description of what the tool - does - - :param input_schema: (Optional) JSON Schema for tool inputs (MCP inputSchema) - - :param output_schema: (Optional) JSON Schema for tool outputs (MCP outputSchema) - - :param metadata: (Optional) Additional metadata about the tool - - :param toolgroup_id: (Optional) ID of the tool group this tool belongs to - properties: - toolgroup_id: - anyOf: - - type: string - - type: 'null' - title: Toolgroup Id - name: - title: Name - type: string - description: The ID of the tool group to register. - provider_id: - type: string - description: >- - The ID of the provider to use for the tool group. - mcp_endpoint: - $ref: '#/components/schemas/URL' - description: >- - The MCP endpoint to use for the tool group. - args: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - A dictionary of arguments to pass to the tool group. - additionalProperties: false - required: - - toolgroup_id - - provider_id - title: RegisterToolGroupRequest - Chunk: - type: object - properties: - content: - $ref: '#/components/schemas/InterleavedContent' - description: >- - The content of the chunk, which can be interleaved text, images, or other - types. - chunk_id: - type: string - description: >- - Unique identifier for the chunk. Must be provided explicitly. - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Metadata associated with the chunk that will be used in the model context - during inference. - embedding: - type: array - items: - type: number - description: >- - Optional embedding for the chunk. If not provided, it will be computed - later. - chunk_metadata: - $ref: '#/components/schemas/ChunkMetadata' - description: >- - Metadata for the chunk that will NOT be used in the context during inference. - The `chunk_metadata` is required backend functionality. - additionalProperties: false - required: - - content - - chunk_id - - metadata - title: Chunk - description: >- - A chunk of content that can be inserted into a vector database. - ChunkMetadata: - type: object - InsertChunksRequest: - type: object - QueryChunksRequest: - type: object - QueryChunksResponse: - $defs: - Chunk: - description: >- - A chunk of content that can be inserted into a vector database. - - :param content: The content of the chunk, which can be interleaved text, - images, or other types. - - :param embedding: Optional embedding for the chunk. If not provided, it - will be computed later. - - :param metadata: Metadata associated with the chunk that will be used - in the model context during inference. - - :param stored_chunk_id: The chunk ID that is stored in the vector database. - Used for backend functionality. - - :param chunk_metadata: Metadata for the chunk that will NOT be used in - the context during inference. - The `chunk_metadata` is required backend functionality. - properties: - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/$defs/ImageContentItem' - text: '#/$defs/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/$defs/ImageContentItem' - - $ref: '#/$defs/TextContentItem' - - items: - discriminator: - mapping: - image: '#/$defs/ImageContentItem' - text: '#/$defs/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/$defs/ImageContentItem' - - $ref: '#/$defs/TextContentItem' - type: array - title: Content - metadata: - additionalProperties: true - title: Metadata - type: object - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - title: Embedding - chunk_id: - anyOf: - - type: string - - type: 'null' - title: Chunk Id - chunk_metadata: - anyOf: - - $ref: '#/$defs/ChunkMetadata' - - type: 'null' - required: - - content - title: Chunk - type: object - ChunkMetadata: - description: >- - `ChunkMetadata` is backend metadata for a `Chunk` that is used to store - additional information about the chunk that - will not be used in the context during inference, but is required - for backend functionality. The `ChunkMetadata` - is set during chunk creation in `MemoryToolRuntimeImpl().insert()`and - is not expected to change after. - Use `Chunk.metadata` for metadata that will be used in the context - during inference. - :param chunk_id: The ID of the chunk. If not set, it will be generated - based on the document ID and content. - - :param document_id: The ID of the document this chunk belongs to. - - :param source: The source of the content, such as a URL, file path, or - other identifier. - - :param created_timestamp: An optional timestamp indicating when the chunk - was created. - - :param updated_timestamp: An optional timestamp indicating when the chunk - was last updated. - - :param chunk_window: The window of the chunk, which can be used to group - related chunks together. - - :param chunk_tokenizer: The tokenizer used to create the chunk. Default - is Tiktoken. - - :param chunk_embedding_model: The embedding model used to create the chunk's - embedding. - - :param chunk_embedding_dimension: The dimension of the embedding vector - for the chunk. - - :param content_token_count: The number of tokens in the content of the - chunk. - - :param metadata_token_count: The number of tokens in the metadata of the - chunk. - properties: - chunk_id: - anyOf: - - type: string - - type: 'null' - title: Chunk Id - document_id: - anyOf: - - type: string - - type: 'null' - title: Document Id - source: - anyOf: - - type: string - - type: 'null' - title: Source - created_timestamp: - anyOf: - - type: integer - - type: 'null' - title: Created Timestamp - updated_timestamp: - anyOf: - - type: integer - - type: 'null' - title: Updated Timestamp - chunk_window: - anyOf: - - type: string - - type: 'null' - title: Chunk Window - chunk_tokenizer: - anyOf: - - type: string - - type: 'null' - title: Chunk Tokenizer - chunk_embedding_model: - anyOf: - - type: string - - type: 'null' - title: Chunk Embedding Model - chunk_embedding_dimension: - anyOf: - - type: integer - - type: 'null' - title: Chunk Embedding Dimension - content_token_count: - anyOf: - - type: integer - - type: 'null' - title: Content Token Count - metadata_token_count: - anyOf: - - type: integer - - type: 'null' - title: Metadata Token Count - title: ChunkMetadata - type: object - ImageContentItem: - description: >- - A image content item - - - :param type: Discriminator type of the content item. Always "image" - - :param image: Image as a base64 encoded string or an URL - properties: - type: - const: image - default: image - title: Type - type: string - image: - $ref: '#/$defs/_URLOrData' - required: - - image - title: ImageContentItem - type: object - TextContentItem: - description: >- - A text content item - - - :param type: Discriminator type of the content item. Always "text" - - :param text: Text content - properties: - type: - const: text - default: text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: TextContentItem - type: object - URL: - description: >- - A URL reference to external content. - - - :param uri: The URL string pointing to the resource - properties: - uri: - title: Uri - type: string - required: - - uri - title: URL - type: object - _URLOrData: - description: >- - A URL or a base64 encoded string - - - :param url: A URL of the image or data URL in the format of data:image/{type};base64,{data}. - Note that URL could have length limits. - - :param data: base64 encoded image data as string - properties: - url: - anyOf: - - $ref: '#/$defs/URL' - - type: 'null' - data: - anyOf: - - type: string - - type: 'null' - contentEncoding: base64 - title: Data - title: _URLOrData - type: object - description: >- - Response from querying chunks in a vector database. - - - :param chunks: List of content chunks returned from the query - - :param scores: Relevance scores corresponding to each returned chunk - properties: - chunks: - items: - $ref: '#/$defs/Chunk' - title: Chunks - type: array - scores: - items: - type: number - title: Scores - type: array - required: - - chunks - - scores - title: QueryChunksResponse - type: object - VectorStoreListResponse: - $defs: - VectorStoreFileCounts: - description: >- - File processing status counts for a vector store. - - - :param completed: Number of files that have been successfully processed - - :param cancelled: Number of files that had their processing cancelled - - :param failed: Number of files that failed to process - - :param in_progress: Number of files currently being processed - - :param total: Total number of files in the vector store - properties: - completed: - title: Completed - type: integer - cancelled: - title: Cancelled - type: integer - failed: - title: Failed - type: integer - in_progress: - title: In Progress - type: integer - total: - title: Total - type: integer - required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts - type: object - VectorStoreObject: - description: >- - OpenAI Vector Store object. - - - :param id: Unique identifier for the vector store - - :param object: Object type identifier, always "vector_store" - - :param created_at: Timestamp when the vector store was created - - :param name: (Optional) Name of the vector store - - :param usage_bytes: Storage space used by the vector store in bytes - - :param file_counts: File processing status counts for the vector store - - :param status: Current status of the vector store - - :param expires_after: (Optional) Expiration policy for the vector store - - :param expires_at: (Optional) Timestamp when the vector store will expire - - :param last_active_at: (Optional) Timestamp of last activity on the vector - store - - :param metadata: Set of key-value pairs that can be attached to the vector - store - properties: - id: - title: Id - type: string - object: - default: vector_store - title: Object - type: string - created_at: - title: Created At - type: integer - name: - anyOf: - - type: string - - type: 'null' - title: Name - usage_bytes: - default: 0 - title: Usage Bytes - type: integer - file_counts: - $ref: '#/$defs/VectorStoreFileCounts' - status: - default: completed - title: Status - type: string - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Expires After - expires_at: - anyOf: - - type: integer - - type: 'null' - title: Expires At - last_active_at: - anyOf: - - type: integer - - type: 'null' - title: Last Active At - metadata: - additionalProperties: true - title: Metadata - type: object - required: - - id - - created_at - - file_counts - title: VectorStoreObject - type: object - description: >- - Response from listing vector stores. - - - :param object: Object type identifier, always "list" - - :param data: List of vector store objects - - :param first_id: (Optional) ID of the first vector store in the list for pagination - - :param last_id: (Optional) ID of the last vector store in the list for pagination - - :param has_more: Whether there are more vector stores available beyond this - page - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/$defs/VectorStoreObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - has_more: - default: false - title: Has More - type: boolean - required: - - data - title: VectorStoreListResponse - type: object - VectorStoreObject: - $defs: - VectorStoreFileCounts: - description: >- - File processing status counts for a vector store. - - - :param completed: Number of files that have been successfully processed - - :param cancelled: Number of files that had their processing cancelled - - :param failed: Number of files that failed to process - - :param in_progress: Number of files currently being processed - - :param total: Total number of files in the vector store - properties: - completed: - title: Completed - type: integer - cancelled: - title: Cancelled - type: integer - failed: - title: Failed - type: integer - in_progress: - title: In Progress - type: integer - total: - title: Total - type: integer - required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts - type: object - description: >- - OpenAI Vector Store object. - - - :param id: Unique identifier for the vector store - - :param object: Object type identifier, always "vector_store" - - :param created_at: Timestamp when the vector store was created - - :param name: (Optional) Name of the vector store - - :param usage_bytes: Storage space used by the vector store in bytes - - :param file_counts: File processing status counts for the vector store - - :param status: Current status of the vector store - - :param expires_after: (Optional) Expiration policy for the vector store - - :param expires_at: (Optional) Timestamp when the vector store will expire - - :param last_active_at: (Optional) Timestamp of last activity on the vector - store - - :param metadata: Set of key-value pairs that can be attached to the vector - store - properties: - id: - title: Id - type: string - object: - default: vector_store - title: Object - type: string - created_at: - title: Created At - type: integer - name: - anyOf: - - type: string - - type: 'null' - title: Name - usage_bytes: - default: 0 - title: Usage Bytes - type: integer - file_counts: - $ref: '#/$defs/VectorStoreFileCounts' - status: - default: completed - title: Status - type: string - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Expires After - expires_at: - anyOf: - - type: integer - - type: 'null' - title: Expires At - last_active_at: - anyOf: - - type: integer - - type: 'null' - title: Last Active At - metadata: - additionalProperties: true - title: Metadata - type: object - required: - - id - - created_at - - file_counts - title: VectorStoreObject - type: object - OpenaiUpdateVectorStoreRequest: - type: object VectorStoreDeleteResponse: - description: >- - Response from deleting a vector store. - - - :param id: Unique identifier of the deleted vector store - - :param object: Object type identifier for the deletion response - - :param deleted: Whether the deletion operation was successful + description: "Response from deleting a vector store.\n\n:param id: Unique identifier of the deleted vector store\n:param object: Object type identifier for the deletion response\n:param deleted: Whether the deletion operation was successful" properties: id: title: Id @@ -15253,736 +16510,11 @@ components: title: Deleted type: boolean required: - - id + - id title: VectorStoreDeleteResponse type: object - VectorStoreFileBatchObject: - $defs: - VectorStoreFileCounts: - description: >- - File processing status counts for a vector store. - - - :param completed: Number of files that have been successfully processed - - :param cancelled: Number of files that had their processing cancelled - - :param failed: Number of files that failed to process - - :param in_progress: Number of files currently being processed - - :param total: Total number of files in the vector store - properties: - completed: - title: Completed - type: integer - cancelled: - title: Cancelled - type: integer - failed: - title: Failed - type: integer - in_progress: - title: In Progress - type: integer - total: - title: Total - type: integer - required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts - type: object - description: >- - OpenAI Vector Store File Batch object. - - - :param id: Unique identifier for the file batch - - :param object: Object type identifier, always "vector_store.file_batch" - - :param created_at: Timestamp when the file batch was created - - :param vector_store_id: ID of the vector store containing the file batch - - :param status: Current processing status of the file batch - - :param file_counts: File processing status counts for the batch - properties: - id: - title: Id - type: string - object: - default: vector_store.file_batch - title: Object - type: string - created_at: - title: Created At - type: integer - vector_store_id: - title: Vector Store Id - type: string - status: - anyOf: - - const: completed - type: string - - const: in_progress - type: string - - const: cancelled - type: string - - const: failed - type: string - title: Status - file_counts: - $ref: '#/$defs/VectorStoreFileCounts' - required: - - id - - created_at - - vector_store_id - - status - - file_counts - title: VectorStoreFileBatchObject - type: object - VectorStoreFilesListInBatchResponse: - $defs: - VectorStoreChunkingStrategyAuto: - description: >- - Automatic chunking strategy for vector store files. - - - :param type: Strategy type, always "auto" for automatic chunking - properties: - type: - const: auto - default: auto - title: Type - type: string - title: VectorStoreChunkingStrategyAuto - type: object - VectorStoreChunkingStrategyStatic: - description: >- - Static chunking strategy with configurable parameters. - - - :param type: Strategy type, always "static" for static chunking - - :param static: Configuration parameters for the static chunking strategy - properties: - type: - const: static - default: static - title: Type - type: string - static: - $ref: >- - #/$defs/VectorStoreChunkingStrategyStaticConfig - required: - - static - title: VectorStoreChunkingStrategyStatic - type: object - VectorStoreChunkingStrategyStaticConfig: - description: >- - Configuration for static chunking strategy. - - - :param chunk_overlap_tokens: Number of tokens to overlap between adjacent - chunks - - :param max_chunk_size_tokens: Maximum number of tokens per chunk, must - be between 100 and 4096 - properties: - chunk_overlap_tokens: - default: 400 - title: Chunk Overlap Tokens - type: integer - max_chunk_size_tokens: - default: 800 - maximum: 4096 - minimum: 100 - title: Max Chunk Size Tokens - type: integer - title: VectorStoreChunkingStrategyStaticConfig - type: object - VectorStoreFileLastError: - description: >- - Error information for failed vector store file processing. - - - :param code: Error code indicating the type of failure - - :param message: Human-readable error message describing the failure - properties: - code: - anyOf: - - const: server_error - type: string - - const: rate_limit_exceeded - type: string - title: Code - message: - title: Message - type: string - required: - - code - - message - title: VectorStoreFileLastError - type: object - VectorStoreFileObject: - description: >- - OpenAI Vector Store File object. - - - :param id: Unique identifier for the file - - :param object: Object type identifier, always "vector_store.file" - - :param attributes: Key-value attributes associated with the file - - :param chunking_strategy: Strategy used for splitting the file into chunks - - :param created_at: Timestamp when the file was added to the vector store - - :param last_error: (Optional) Error information if file processing failed - - :param status: Current processing status of the file - - :param usage_bytes: Storage space used by this file in bytes - - :param vector_store_id: ID of the vector store containing this file - properties: - id: - title: Id - type: string - object: - default: vector_store.file - title: Object - type: string - attributes: - additionalProperties: true - title: Attributes - type: object - chunking_strategy: - discriminator: - mapping: - auto: '#/$defs/VectorStoreChunkingStrategyAuto' - static: >- - #/$defs/VectorStoreChunkingStrategyStatic - propertyName: type - oneOf: - - $ref: '#/$defs/VectorStoreChunkingStrategyAuto' - - $ref: >- - #/$defs/VectorStoreChunkingStrategyStatic - title: Chunking Strategy - created_at: - title: Created At - type: integer - last_error: - anyOf: - - $ref: '#/$defs/VectorStoreFileLastError' - - type: 'null' - status: - anyOf: - - const: completed - type: string - - const: in_progress - type: string - - const: cancelled - type: string - - const: failed - type: string - title: Status - usage_bytes: - default: 0 - title: Usage Bytes - type: integer - vector_store_id: - title: Vector Store Id - type: string - required: - - id - - chunking_strategy - - created_at - - status - - vector_store_id - title: VectorStoreFileObject - type: object - description: >- - Response from listing files in a vector store file batch. - - - :param object: Object type identifier, always "list" - - :param data: List of vector store file objects in the batch - - :param first_id: (Optional) ID of the first file in the list for pagination - - :param last_id: (Optional) ID of the last file in the list for pagination - - :param has_more: Whether there are more files available beyond this page - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/$defs/VectorStoreFileObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - has_more: - default: false - title: Has More - type: boolean - required: - - data - title: VectorStoreFilesListInBatchResponse - type: object - Union: - type: object - nullable: true - VectorStoreListFilesResponse: - $defs: - VectorStoreChunkingStrategyAuto: - description: >- - Automatic chunking strategy for vector store files. - - - :param type: Strategy type, always "auto" for automatic chunking - properties: - type: - const: auto - default: auto - title: Type - type: string - title: VectorStoreChunkingStrategyAuto - type: object - VectorStoreChunkingStrategyStatic: - description: >- - Static chunking strategy with configurable parameters. - - - :param type: Strategy type, always "static" for static chunking - - :param static: Configuration parameters for the static chunking strategy - properties: - type: - const: static - default: static - title: Type - type: string - static: - $ref: >- - #/$defs/VectorStoreChunkingStrategyStaticConfig - required: - - static - title: VectorStoreChunkingStrategyStatic - type: object - VectorStoreChunkingStrategyStaticConfig: - description: >- - Configuration for static chunking strategy. - - - :param chunk_overlap_tokens: Number of tokens to overlap between adjacent - chunks - - :param max_chunk_size_tokens: Maximum number of tokens per chunk, must - be between 100 and 4096 - properties: - chunk_overlap_tokens: - default: 400 - title: Chunk Overlap Tokens - type: integer - max_chunk_size_tokens: - default: 800 - maximum: 4096 - minimum: 100 - title: Max Chunk Size Tokens - type: integer - title: VectorStoreChunkingStrategyStaticConfig - type: object - VectorStoreFileLastError: - description: >- - Error information for failed vector store file processing. - - - :param code: Error code indicating the type of failure - - :param message: Human-readable error message describing the failure - properties: - code: - anyOf: - - const: server_error - type: string - - const: rate_limit_exceeded - type: string - title: Code - message: - title: Message - type: string - required: - - code - - message - title: VectorStoreFileLastError - type: object - VectorStoreFileObject: - description: >- - OpenAI Vector Store File object. - - - :param id: Unique identifier for the file - - :param object: Object type identifier, always "vector_store.file" - - :param attributes: Key-value attributes associated with the file - - :param chunking_strategy: Strategy used for splitting the file into chunks - - :param created_at: Timestamp when the file was added to the vector store - - :param last_error: (Optional) Error information if file processing failed - - :param status: Current processing status of the file - - :param usage_bytes: Storage space used by this file in bytes - - :param vector_store_id: ID of the vector store containing this file - properties: - id: - title: Id - type: string - object: - default: vector_store.file - title: Object - type: string - attributes: - additionalProperties: true - title: Attributes - type: object - chunking_strategy: - discriminator: - mapping: - auto: '#/$defs/VectorStoreChunkingStrategyAuto' - static: >- - #/$defs/VectorStoreChunkingStrategyStatic - propertyName: type - oneOf: - - $ref: '#/$defs/VectorStoreChunkingStrategyAuto' - - $ref: >- - #/$defs/VectorStoreChunkingStrategyStatic - title: Chunking Strategy - created_at: - title: Created At - type: integer - last_error: - anyOf: - - $ref: '#/$defs/VectorStoreFileLastError' - - type: 'null' - status: - anyOf: - - const: completed - type: string - - const: in_progress - type: string - - const: cancelled - type: string - - const: failed - type: string - title: Status - usage_bytes: - default: 0 - title: Usage Bytes - type: integer - vector_store_id: - title: Vector Store Id - type: string - required: - - id - - chunking_strategy - - created_at - - status - - vector_store_id - title: VectorStoreFileObject - type: object - description: >- - Response from listing files in a vector store. - - - :param object: Object type identifier, always "list" - - :param data: List of vector store file objects - - :param first_id: (Optional) ID of the first file in the list for pagination - - :param last_id: (Optional) ID of the last file in the list for pagination - - :param has_more: Whether there are more files available beyond this page - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/$defs/VectorStoreFileObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - has_more: - default: false - title: Has More - type: boolean - required: - - data - title: VectorStoreListFilesResponse - type: object - OpenaiAttachFileToVectorStoreRequest: - type: object - VectorStoreFileObject: - $defs: - VectorStoreChunkingStrategyAuto: - description: >- - Automatic chunking strategy for vector store files. - - - :param type: Strategy type, always "auto" for automatic chunking - properties: - type: - const: auto - default: auto - title: Type - type: string - title: VectorStoreChunkingStrategyAuto - type: object - VectorStoreChunkingStrategyStatic: - description: >- - Static chunking strategy with configurable parameters. - - - :param type: Strategy type, always "static" for static chunking - - :param static: Configuration parameters for the static chunking strategy - properties: - type: - const: static - default: static - title: Type - type: string - static: - $ref: >- - #/$defs/VectorStoreChunkingStrategyStaticConfig - required: - - static - title: VectorStoreChunkingStrategyStatic - type: object - VectorStoreChunkingStrategyStaticConfig: - description: >- - Configuration for static chunking strategy. - - - :param chunk_overlap_tokens: Number of tokens to overlap between adjacent - chunks - - :param max_chunk_size_tokens: Maximum number of tokens per chunk, must - be between 100 and 4096 - properties: - chunk_overlap_tokens: - default: 400 - title: Chunk Overlap Tokens - type: integer - max_chunk_size_tokens: - default: 800 - maximum: 4096 - minimum: 100 - title: Max Chunk Size Tokens - type: integer - title: VectorStoreChunkingStrategyStaticConfig - type: object - VectorStoreFileLastError: - description: >- - Error information for failed vector store file processing. - - - :param code: Error code indicating the type of failure - - :param message: Human-readable error message describing the failure - properties: - code: - anyOf: - - const: server_error - type: string - - const: rate_limit_exceeded - type: string - title: Code - message: - title: Message - type: string - required: - - code - - message - title: VectorStoreFileLastError - type: object - description: >- - OpenAI Vector Store File object. - - - :param id: Unique identifier for the file - - :param object: Object type identifier, always "vector_store.file" - - :param attributes: Key-value attributes associated with the file - - :param chunking_strategy: Strategy used for splitting the file into chunks - - :param created_at: Timestamp when the file was added to the vector store - - :param last_error: (Optional) Error information if file processing failed - - :param status: Current processing status of the file - - :param usage_bytes: Storage space used by this file in bytes - - :param vector_store_id: ID of the vector store containing this file - properties: - id: - title: Id - type: string - object: - default: vector_store.file - title: Object - type: string - attributes: - additionalProperties: true - title: Attributes - type: object - chunking_strategy: - discriminator: - mapping: - auto: '#/$defs/VectorStoreChunkingStrategyAuto' - static: >- - #/$defs/VectorStoreChunkingStrategyStatic - propertyName: type - oneOf: - - $ref: '#/$defs/VectorStoreChunkingStrategyAuto' - - $ref: >- - #/$defs/VectorStoreChunkingStrategyStatic - title: Chunking Strategy - created_at: - title: Created At - type: integer - last_error: - anyOf: - - $ref: '#/$defs/VectorStoreFileLastError' - - type: 'null' - status: - anyOf: - - const: completed - type: string - - const: in_progress - type: string - - const: cancelled - type: string - - const: failed - type: string - title: Status - usage_bytes: - default: 0 - title: Usage Bytes - type: integer - vector_store_id: - title: Vector Store Id - type: string - required: - - id - - chunking_strategy - - created_at - - status - - vector_store_id - title: VectorStoreFileObject - type: object - OpenaiUpdateVectorStoreFileRequest: - type: object - VectorStoreFileDeleteResponse: - description: >- - Response from deleting a vector store file. - - - :param id: Unique identifier of the deleted file - - :param object: Object type identifier for the deletion response - - :param deleted: Whether the deletion operation was successful - properties: - id: - title: Id - type: string - object: - default: vector_store.file.deleted - title: Object - type: string - deleted: - default: true - title: Deleted - type: boolean - required: - - id - title: VectorStoreFileDeleteResponse - type: object VectorStoreFileContentsResponse: - $defs: - VectorStoreContent: - description: >- - Content item from a vector store file or search result. - - - :param type: Content type, currently only "text" is supported - - :param text: The actual text content - properties: - type: - const: text - title: Type - type: string - text: - title: Text - type: string - required: - - type - - text - title: VectorStoreContent - type: object - description: >- - Response from retrieving the contents of a vector store file. - - - :param file_id: Unique identifier for the file - - :param filename: Name of the file - - :param attributes: Key-value attributes associated with the file - - :param content: List of content items from the file + description: "Response from retrieving the contents of a vector store file.\n\n:param file_id: Unique identifier for the file\n:param filename: Name of the file\n:param attributes: Key-value attributes associated with the file\n:param content: List of content items from the file" properties: file_id: title: File Id @@ -15996,965 +16528,190 @@ components: type: object content: items: - $ref: '#/$defs/VectorStoreContent' + $ref: '#/components/schemas/VectorStoreContent' title: Content type: array required: - - file_id - - filename - - attributes - - content + - file_id + - filename + - attributes + - content title: VectorStoreFileContentsResponse type: object - OpenaiSearchVectorStoreRequest: - type: object - VectorStoreSearchResponsePage: - $defs: - VectorStoreContent: - description: >- - Content item from a vector store file or search result. - - - :param type: Content type, currently only "text" is supported - - :param text: The actual text content - properties: - type: - const: text - title: Type - type: string - text: - title: Text - type: string - required: - - type - - text - title: VectorStoreContent - type: object - VectorStoreSearchResponse: - description: >- - Response from searching a vector store. - - - :param file_id: Unique identifier of the file containing the result - - :param filename: Name of the file containing the result - - :param score: Relevance score for this search result - - :param attributes: (Optional) Key-value attributes associated with the - file - - :param content: List of content items matching the search query - properties: - file_id: - title: File Id - type: string - filename: - title: Filename - type: string - score: - title: Score - type: number - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - type: object - - type: 'null' - title: Attributes - content: - items: - $ref: '#/$defs/VectorStoreContent' - title: Content - type: array - required: - - file_id - - filename - - score - - content - title: VectorStoreSearchResponse - type: object - description: >- - Paginated response from searching a vector store. - - - :param object: Object type identifier for the search results page - - :param search_query: The original search query that was executed - - :param data: List of search result objects - - :param has_more: Whether there are more results available beyond this page - - :param next_page: (Optional) Token for retrieving the next page of results + VectorStoreFileDeleteResponse: + description: "Response from deleting a vector store file.\n\n:param id: Unique identifier of the deleted file\n:param object: Object type identifier for the deletion response\n:param deleted: Whether the deletion operation was successful" properties: + id: + title: Id + type: string object: - default: vector_store.search_results.page + default: vector_store.file.deleted title: Object type: string - search_query: - title: Search Query + deleted: + default: true + title: Deleted + type: boolean + required: + - id + title: VectorStoreFileDeleteResponse + type: object + VectorStoreFilesListInBatchResponse: + description: "Response from listing files in a vector store file batch.\n\n:param object: Object type identifier, always \"list\"\n:param data: List of vector store file objects in the batch\n:param first_id: (Optional) ID of the first file in the list for pagination\n:param last_id: (Optional) ID of the last file in the list for pagination\n:param has_more: Whether there are more files available beyond this page" + properties: + object: + default: list + title: Object type: string data: items: - $ref: '#/$defs/VectorStoreSearchResponse' + $ref: '#/components/schemas/VectorStoreFileObject' title: Data type: array + first_id: + title: First Id + type: string + nullable: true + last_id: + title: Last Id + type: string + nullable: true has_more: default: false title: Has More type: boolean - next_page: - anyOf: - - type: string - - type: 'null' - title: Next Page required: - - search_query - - data - title: VectorStoreSearchResponsePage + - data + title: VectorStoreFilesListInBatchResponse type: object - VersionInfo: - description: >- - Version information for the service. - - - :param version: Version number of the service + VectorStoreListFilesResponse: + description: "Response from listing files in a vector store.\n\n:param object: Object type identifier, always \"list\"\n:param data: List of vector store file objects\n:param first_id: (Optional) ID of the first file in the list for pagination\n:param last_id: (Optional) ID of the last file in the list for pagination\n:param has_more: Whether there are more files available beyond this page" properties: - version: - title: Version + object: + default: list + title: Object type: string - required: - - version - title: VersionInfo - type: object - AppendRowsRequest: - type: object - PaginatedResponse: - description: >- - A generic paginated response that follows a simple format. - - - :param data: The list of items for the current page - - :param has_more: Whether there are more items available after this set - - :param url: The URL for accessing this list - properties: data: items: - additionalProperties: true - type: object + $ref: '#/components/schemas/VectorStoreFileObject' title: Data type: array + first_id: + title: First Id + type: string + nullable: true + last_id: + title: Last Id + type: string + nullable: true has_more: + default: false title: Has More type: boolean - url: - anyOf: - - type: string - - type: 'null' - title: Url required: - - data - - has_more - title: PaginatedResponse + - data + title: VectorStoreListFilesResponse type: object - ListDatasetsResponse: - $defs: - Dataset: - description: >- - Dataset resource for storing and accessing training or evaluation data. - - - :param type: Type of resource, always 'dataset' for datasets - properties: - identifier: - description: >- - Unique identifier for this resource in llama stack - title: Identifier - type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: >- - Unique identifier for this resource in the provider - title: Provider Resource Id - provider_id: - description: >- - ID of the provider that owns this resource - title: Provider Id - type: string - type: - const: dataset - default: dataset - title: Type - type: string - purpose: - $ref: '#/$defs/DatasetPurpose' - source: - discriminator: - mapping: - rows: '#/$defs/RowsDataSource' - uri: '#/$defs/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/$defs/URIDataSource' - - $ref: '#/$defs/RowsDataSource' - title: Source - metadata: - additionalProperties: true - description: Any additional metadata for this dataset - title: Metadata - type: object - required: - - identifier - - provider_id - - purpose - - source - title: Dataset - type: object - DatasetPurpose: - description: >- - Purpose of the dataset. Each purpose has a required input data schema. - - - :cvar post-training/messages: The dataset contains messages used for post-training. - { - "messages": [ - {"role": "user", "content": "Hello, world!"}, - {"role": "assistant", "content": "Hello, world!"}, - ] - } - :cvar eval/question-answer: The dataset contains a question column and - an answer column. - { - "question": "What is the capital of France?", - "answer": "Paris" - } - :cvar eval/messages-answer: The dataset contains a messages column with - list of messages and an answer column. - { - "messages": [ - {"role": "user", "content": "Hello, my name is John Doe."}, - {"role": "assistant", "content": "Hello, John Doe. How can - I help you today?"}, - {"role": "user", "content": "What's my name?"}, - ], - "answer": "John Doe" - } - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - title: DatasetPurpose - type: string - RowsDataSource: - description: >- - A dataset stored in rows. - - :param rows: The dataset is stored in rows. E.g. - - [ - {"messages": [{"role": "user", "content": "Hello, world!"}, {"role": - "assistant", "content": "Hello, world!"}]} - ] - properties: - type: - const: rows - default: rows - title: Type - type: string - rows: - items: - additionalProperties: true - type: object - title: Rows - type: array - required: - - rows - title: RowsDataSource - type: object - URIDataSource: - description: >- - A dataset that can be obtained from a URI. - - :param uri: The dataset can be obtained from a URI. E.g. - - "https://mywebsite.com/mydata.jsonl" - - "lsfs://mydata.jsonl" - - "data:csv;base64,{base64_content}" - properties: - type: - const: uri - default: uri - title: Type - type: string - uri: - title: Uri - type: string - required: - - uri - title: URIDataSource - type: object - description: >- - Response from listing datasets. - - - :param data: List of datasets + VectorStoreListResponse: + description: "Response from listing vector stores.\n\n:param object: Object type identifier, always \"list\"\n:param data: List of vector store objects\n:param first_id: (Optional) ID of the first vector store in the list for pagination\n:param last_id: (Optional) ID of the last vector store in the list for pagination\n:param has_more: Whether there are more vector stores available beyond this page" properties: + object: + default: list + title: Object + type: string data: items: - $ref: '#/$defs/Dataset' + $ref: '#/components/schemas/VectorStoreObject' title: Data type: array + first_id: + title: First Id + type: string + nullable: true + last_id: + title: Last Id + type: string + nullable: true + has_more: + default: false + title: Has More + type: boolean required: - - data - title: ListDatasetsResponse + - data + title: VectorStoreListResponse type: object - RegisterDatasetRequest: - type: object - Dataset: - $defs: - DatasetPurpose: - description: >- - Purpose of the dataset. Each purpose has a required input data schema. - - - :cvar post-training/messages: The dataset contains messages used for post-training. - { - "messages": [ - {"role": "user", "content": "Hello, world!"}, - {"role": "assistant", "content": "Hello, world!"}, - ] - } - :cvar eval/question-answer: The dataset contains a question column and - an answer column. - { - "question": "What is the capital of France?", - "answer": "Paris" - } - :cvar eval/messages-answer: The dataset contains a messages column with - list of messages and an answer column. - { - "messages": [ - {"role": "user", "content": "Hello, my name is John Doe."}, - {"role": "assistant", "content": "Hello, John Doe. How can - I help you today?"}, - {"role": "user", "content": "What's my name?"}, - ], - "answer": "John Doe" - } - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - title: DatasetPurpose - type: string - RowsDataSource: - description: >- - A dataset stored in rows. - - :param rows: The dataset is stored in rows. E.g. - - [ - {"messages": [{"role": "user", "content": "Hello, world!"}, {"role": - "assistant", "content": "Hello, world!"}]} - ] - properties: - type: - const: rows - default: rows - title: Type - type: string - rows: - items: - additionalProperties: true - type: object - title: Rows - type: array - required: - - rows - title: RowsDataSource - type: object - URIDataSource: - description: >- - A dataset that can be obtained from a URI. - - :param uri: The dataset can be obtained from a URI. E.g. - - "https://mywebsite.com/mydata.jsonl" - - "lsfs://mydata.jsonl" - - "data:csv;base64,{base64_content}" - properties: - type: - const: uri - default: uri - title: Type - type: string - uri: - title: Uri - type: string - required: - - uri - title: URIDataSource - type: object - description: >- - Dataset resource for storing and accessing training or evaluation data. - - - :param type: Type of resource, always 'dataset' for datasets + OpenAIResponseMessage: + description: "Corresponds to the various Message types in the Responses API.\nThey are all under one type because the Responses API gives them all\nthe same \"type\" value, and there is no way to tell them apart in certain\nscenarios." properties: - identifier: - description: >- - Unique identifier for this resource in llama stack - title: Identifier - type: string - provider_resource_id: + content: anyOf: - - type: string - - type: 'null' - description: >- - Unique identifier for this resource in the provider - title: Provider Resource Id - provider_id: - description: >- - ID of the provider that owns this resource - title: Provider Id - type: string - type: - const: dataset - default: dataset - title: Type - type: string - purpose: - $ref: '#/$defs/DatasetPurpose' - source: - discriminator: - mapping: - rows: '#/$defs/RowsDataSource' - uri: '#/$defs/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/$defs/URIDataSource' - - $ref: '#/$defs/RowsDataSource' - title: Source - metadata: - additionalProperties: true - description: Any additional metadata for this dataset - title: Metadata - type: object - required: - - identifier - - provider_id - - purpose - - source - title: Dataset - type: object - CreateAgentRequest: - type: object - AgentCreateResponse: - description: >- - Response returned when creating a new agent. - - - :param agent_id: Unique identifier for the created agent - properties: - agent_id: - title: Agent Id - type: string - required: - - agent_id - title: AgentCreateResponse - type: object - Agent: - $defs: - AgentConfig: - description: >- - Configuration for an agent. - - - :param model: The model identifier to use for the agent - - :param instructions: The system instructions for the agent - - :param name: Optional name for the agent, used in telemetry and identification - - :param enable_session_persistence: Optional flag indicating whether session - data has to be persisted - - :param response_format: Optional response format configuration - properties: - sampling_params: - anyOf: - - $ref: '#/$defs/SamplingParams' - - type: 'null' - input_shields: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Input Shields - output_shields: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Output Shields - toolgroups: - anyOf: - - items: - anyOf: - - type: string - - $ref: '#/$defs/AgentToolGroupWithArgs' - type: array - - type: 'null' - title: Toolgroups - client_tools: - anyOf: - - items: - $ref: '#/$defs/ToolDef' - type: array - - type: 'null' - title: Client Tools - tool_choice: - anyOf: - - $ref: '#/$defs/ToolChoice' - - type: 'null' - deprecated: true - tool_prompt_format: - anyOf: - - $ref: '#/$defs/ToolPromptFormat' - - type: 'null' - deprecated: true - tool_config: - anyOf: - - $ref: '#/$defs/ToolConfig' - - type: 'null' - max_infer_iters: - anyOf: - - type: integer - - type: 'null' - default: 10 - title: Max Infer Iters - model: - title: Model - type: string - instructions: - title: Instructions - type: string - name: - anyOf: - - type: string - - type: 'null' - title: Name - enable_session_persistence: - anyOf: - - type: boolean - - type: 'null' - default: false - title: Enable Session Persistence - response_format: - anyOf: - - discriminator: - mapping: - grammar: '#/$defs/GrammarResponseFormat' - json_schema: '#/$defs/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/$defs/JsonSchemaResponseFormat' - - $ref: '#/$defs/GrammarResponseFormat' - - type: 'null' - title: Response Format - required: - - model - - instructions - title: AgentConfig - type: object - AgentToolGroupWithArgs: - properties: - name: - title: Name - type: string - args: - additionalProperties: true - title: Args - type: object - required: - - name - - args - title: AgentToolGroupWithArgs - type: object - GrammarResponseFormat: - description: >- - Configuration for grammar-guided response generation. - - - :param type: Must be "grammar" to identify this format type - - :param bnf: The BNF grammar specification the response should conform - to - properties: - type: - const: grammar - default: grammar - title: Type - type: string - bnf: - additionalProperties: true - title: Bnf - type: object - required: - - bnf - title: GrammarResponseFormat - type: object - GreedySamplingStrategy: - description: >- - Greedy sampling strategy that selects the highest probability token at - each step. - - - :param type: Must be "greedy" to identify this sampling strategy - properties: - type: - const: greedy - default: greedy - title: Type - type: string - title: GreedySamplingStrategy - type: object - JsonSchemaResponseFormat: - description: >- - Configuration for JSON schema-guided response generation. - - - :param type: Must be "json_schema" to identify this format type - - :param json_schema: The JSON schema the response should conform to. In - a Python SDK, this is often a `pydantic` model. - properties: - type: - const: json_schema - default: json_schema - title: Type - type: string - json_schema: - additionalProperties: true - title: Json Schema - type: object - required: - - json_schema - title: JsonSchemaResponseFormat - type: object - SamplingParams: - description: >- - Sampling parameters. - - - :param strategy: The sampling strategy. - - :param max_tokens: The maximum number of tokens that can be generated - in the completion. The token count of - your prompt plus max_tokens cannot exceed the model's context length. - :param repetition_penalty: Number between -2.0 and 2.0. Positive values - penalize new tokens - based on whether they appear in the text so far, increasing the model's - likelihood to talk about new topics. - :param stop: Up to 4 sequences where the API will stop generating further - tokens. - The returned text will not contain the stop sequence. - properties: - strategy: + - type: string + - items: discriminator: mapping: - greedy: '#/$defs/GreedySamplingStrategy' - top_k: '#/$defs/TopKSamplingStrategy' - top_p: '#/$defs/TopPSamplingStrategy' + input_file: '#/$defs/OpenAIResponseInputMessageContentFile' + input_image: '#/$defs/OpenAIResponseInputMessageContentImage' + input_text: '#/$defs/OpenAIResponseInputMessageContentText' propertyName: type oneOf: - - $ref: '#/$defs/GreedySamplingStrategy' - - $ref: '#/$defs/TopPSamplingStrategy' - - $ref: '#/$defs/TopKSamplingStrategy' - title: Strategy - max_tokens: - anyOf: - - type: integer - - type: 'null' - title: Max Tokens - repetition_penalty: - anyOf: - - type: number - - type: 'null' - default: 1.0 - title: Repetition Penalty - stop: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Stop - title: SamplingParams - type: object - SystemMessageBehavior: - description: >- - Config for how to override the default system prompt. - - - :cvar append: Appends the provided system message to the default system - prompt: - https://www.llama.com/docs/model-cards-and-prompt-formats/llama3_2/#-function-definitions-in-the-system-prompt- - :cvar replace: Replaces the default system prompt with the provided system - message. The system message can include the string - '{{function_definitions}}' to indicate where the function definitions - should be inserted. - enum: - - append - - replace - title: SystemMessageBehavior + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + type: array + - items: + discriminator: + mapping: + output_text: '#/$defs/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/$defs/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + type: array + title: Content + role: + anyOf: + - const: system + type: string + - const: developer + type: string + - const: user + type: string + - const: assistant + type: string + title: Role + type: + const: message + default: message + title: Type type: string - ToolChoice: - description: >- - Whether tool use is required or automatic. This is a hint to the model - which may not be followed. It depends on the Instruction Following capabilities - of the model. - - - :cvar auto: The model may use tools if it determines that is appropriate. - - :cvar required: The model must use tools. - - :cvar none: The model must not use tools. - enum: - - auto - - required - - none - title: ToolChoice + id: + title: Id type: string - ToolConfig: - description: >- - Configuration for tool use. - - - :param tool_choice: (Optional) Whether tool use is automatic, required, - or none. Can also specify a tool name to use a specific tool. Defaults - to ToolChoice.auto. - - :param tool_prompt_format: (Optional) Instructs the model how to format - tool calls. By default, Llama Stack will attempt to use a format that - is best adapted to the model. - - `ToolPromptFormat.json`: The tool calls are formatted as a JSON - object. - - `ToolPromptFormat.function_tag`: The tool calls are enclosed in - a tag. - - `ToolPromptFormat.python_list`: The tool calls are output as Python - syntax -- a list of function calls. - :param system_message_behavior: (Optional) Config for how to override - the default system prompt. - - `SystemMessageBehavior.append`: Appends the provided system message - to the default system prompt. - - `SystemMessageBehavior.replace`: Replaces the default system prompt - with the provided system message. The system message can include the string - '{{function_definitions}}' to indicate where the function definitions - should be inserted. - properties: - tool_choice: - anyOf: - - $ref: '#/$defs/ToolChoice' - - type: string - - type: 'null' - default: auto - title: Tool Choice - tool_prompt_format: - anyOf: - - $ref: '#/$defs/ToolPromptFormat' - - type: 'null' - system_message_behavior: - anyOf: - - $ref: '#/$defs/SystemMessageBehavior' - - type: 'null' - default: append - title: ToolConfig - type: object - ToolDef: - description: >- - Tool definition used in runtime contexts. - - - :param name: Name of the tool - - :param description: (Optional) Human-readable description of what the - tool does - - :param input_schema: (Optional) JSON Schema for tool inputs (MCP inputSchema) - - :param output_schema: (Optional) JSON Schema for tool outputs (MCP outputSchema) - - :param metadata: (Optional) Additional metadata about the tool - - :param toolgroup_id: (Optional) ID of the tool group this tool belongs - to - properties: - toolgroup_id: - anyOf: - - type: string - - type: 'null' - title: Toolgroup Id - name: - title: Name - type: string - description: - anyOf: - - type: string - - type: 'null' - title: Description - input_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Input Schema - output_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Output Schema - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Metadata - required: - - name - title: ToolDef - type: object - ToolPromptFormat: - description: >- - Prompt format for calling custom / zero shot tools. - - - :cvar json: JSON format for calling tools. It takes the form: - { - "type": "function", - "function" : { - "name": "function_name", - "description": "function_description", - "parameters": {...} - } - } - :cvar function_tag: Function tag format, pseudo-XML. This looks like: - (parameters) - - :cvar python_list: Python list. The output is a valid Python expression - that can be - evaluated to a list. Each element in the list is a function call. - Example: - ["function_name(param1, param2)", "function_name(param1, param2)"] - enum: - - json - - function_tag - - python_list - title: ToolPromptFormat - type: string - TopKSamplingStrategy: - description: >- - Top-k sampling strategy that restricts sampling to the k most likely tokens. - - - :param type: Must be "top_k" to identify this sampling strategy - - :param top_k: Number of top tokens to consider for sampling. Must be at - least 1 - properties: - type: - const: top_k - default: top_k - title: Type - type: string - top_k: - minimum: 1 - title: Top K - type: integer - required: - - top_k - title: TopKSamplingStrategy - type: object - TopPSamplingStrategy: - description: >- - Top-p (nucleus) sampling strategy that samples from the smallest set of - tokens with cumulative probability >= p. - - - :param type: Must be "top_p" to identify this sampling strategy - - :param temperature: Controls randomness in sampling. Higher values increase - randomness - - :param top_p: Cumulative probability threshold for nucleus sampling. Defaults - to 0.95 - properties: - type: - const: top_p - default: top_p - title: Type - type: string - temperature: - anyOf: - - exclusiveMinimum: 0.0 - type: number - - type: 'null' - title: Temperature - top_p: - anyOf: - - type: number - - type: 'null' - default: 0.95 - title: Top P - required: - - temperature - title: TopPSamplingStrategy - type: object - description: >- - An agent instance with configuration and metadata. - - - :param agent_id: Unique identifier for the agent - - :param agent_config: Configuration settings for the agent - - :param created_at: Timestamp when the agent was created - properties: - agent_id: - title: Agent Id - type: string - agent_config: - $ref: '#/$defs/AgentConfig' - created_at: - format: date-time - title: Created At + nullable: true + status: + title: Status type: string + nullable: true required: - - agent_id - - agent_config - - created_at - title: Agent + - content + - role + title: OpenAIResponseMessage type: object - CreateAgentSessionRequest: - type: object - AgentSessionCreateResponse: - description: >- - Response returned when creating a new agent session. - - - :param session_id: Unique identifier for the created session + OpenAIResponseObjectWithInput: + description: "OpenAI response object extended with input context information.\n\n:param input: List of input items that led to this response" properties: - session_id: - title: Session Id + created_at: + title: Created At + type: integer + error: + $ref: '#/components/schemas/OpenAIResponseError' + nullable: true + id: + title: Id + type: string + model: + title: Model type: string required: - session_id @@ -18557,30 +18314,30 @@ components: items: discriminator: mapping: - inference: '#/$defs/InferenceStep' - memory_retrieval: '#/$defs/MemoryRetrievalStep' - shield_call: '#/$defs/ShieldCallStep' - tool_execution: '#/$defs/ToolExecutionStep' - propertyName: step_type + file_search_call: '#/$defs/OpenAIResponseOutputMessageFileSearchToolCall' + function_call: '#/$defs/OpenAIResponseOutputMessageFunctionToolCall' + mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest' + mcp_call: '#/$defs/OpenAIResponseOutputMessageMCPCall' + mcp_list_tools: '#/$defs/OpenAIResponseOutputMessageMCPListTools' + message: '#/$defs/OpenAIResponseMessage' + web_search_call: '#/$defs/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type oneOf: - - $ref: '#/$defs/InferenceStep' - - $ref: '#/$defs/ToolExecutionStep' - - $ref: '#/$defs/ShieldCallStep' - - $ref: '#/$defs/MemoryRetrievalStep' - title: Steps + - $ref: '#/components/schemas/OpenAIResponseMessage' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: Output type: array - output_message: - $ref: '#/$defs/CompletionMessage' - output_attachments: - anyOf: - - items: - $ref: '#/$defs/Attachment' - type: array - - type: 'null' - title: Output Attachments - started_at: - format: date-time - title: Started At + parallel_tool_calls: + default: false + title: Parallel Tool Calls + type: boolean + previous_response_id: + title: Previous Response Id type: string completed_at: anyOf: @@ -18637,609 +18394,97 @@ components: - code_interpreter title: BuiltinTool type: string - CompletionMessage: - description: >- - A message containing the model's (assistant) response in a chat conversation. - - - :param role: Must be "assistant" to identify this as the model's response - - :param content: The content of the model's response - - :param stop_reason: Reason why the model stopped generating. Options are: - - `StopReason.end_of_turn`: The model finished generating the entire - response. - - `StopReason.end_of_message`: The model finished generating but generated - a partial response -- usually, a tool call. The user may call the tool - and continue the conversation with the tool's response. - - `StopReason.out_of_tokens`: The model ran out of token budget. - :param tool_calls: List of tool calls. Each tool call is a ToolCall object. - properties: - role: - const: assistant - default: assistant - title: Role - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/$defs/ImageContentItem' - text: '#/$defs/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/$defs/ImageContentItem' - - $ref: '#/$defs/TextContentItem' - - items: - discriminator: - mapping: - image: '#/$defs/ImageContentItem' - text: '#/$defs/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/$defs/ImageContentItem' - - $ref: '#/$defs/TextContentItem' - type: array - title: Content - stop_reason: - $ref: '#/$defs/StopReason' - tool_calls: - anyOf: - - items: - $ref: '#/$defs/ToolCall' - type: array - - type: 'null' - title: Tool Calls - required: - - content - - stop_reason - title: CompletionMessage - type: object - ImageContentItem: - description: >- - A image content item - - - :param type: Discriminator type of the content item. Always "image" - - :param image: Image as a base64 encoded string or an URL - properties: - type: - const: image - default: image - title: Type - type: string - image: - $ref: '#/$defs/_URLOrData' - required: - - image - title: ImageContentItem - type: object - InferenceStep: - description: >- - An inference step in an agent turn. - - - :param model_response: The response from the LLM. - properties: - turn_id: - title: Turn Id - type: string - step_id: - title: Step Id - type: string - started_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Started At - completed_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Completed At - step_type: - const: inference - default: inference - title: Step Type - type: string - model_response: - $ref: '#/$defs/CompletionMessage' - required: - - turn_id - - step_id - - model_response - title: InferenceStep - type: object - MemoryRetrievalStep: - description: >- - A memory retrieval step in an agent turn. - - - :param vector_store_ids: The IDs of the vector databases to retrieve context - from. - - :param inserted_context: The context retrieved from the vector databases. - properties: - turn_id: - title: Turn Id - type: string - step_id: - title: Step Id - type: string - started_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Started At - completed_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Completed At - step_type: - const: memory_retrieval - default: memory_retrieval - title: Step Type - type: string - vector_store_ids: - title: Vector Store Ids - type: string - inserted_context: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/$defs/ImageContentItem' - text: '#/$defs/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/$defs/ImageContentItem' - - $ref: '#/$defs/TextContentItem' - - items: - discriminator: - mapping: - image: '#/$defs/ImageContentItem' - text: '#/$defs/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/$defs/ImageContentItem' - - $ref: '#/$defs/TextContentItem' - type: array - title: Inserted Context - required: - - turn_id - - step_id - - vector_store_ids - - inserted_context - title: MemoryRetrievalStep - type: object - SafetyViolation: - description: >- - Details of a safety violation detected by content moderation. - - - :param violation_level: Severity level of the violation - - :param user_message: (Optional) Message to convey to the user about the - violation - - :param metadata: Additional metadata including specific violation codes - for debugging and telemetry - properties: - violation_level: - $ref: '#/$defs/ViolationLevel' - user_message: - anyOf: - - type: string - - type: 'null' - title: User Message - metadata: - additionalProperties: true - title: Metadata - type: object - required: - - violation_level - title: SafetyViolation - type: object - ShieldCallStep: - description: >- - A shield call step in an agent turn. - - - :param violation: The violation from the shield call. - properties: - turn_id: - title: Turn Id - type: string - step_id: - title: Step Id - type: string - started_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Started At - completed_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Completed At - step_type: - const: shield_call - default: shield_call - title: Step Type - type: string - violation: - anyOf: - - $ref: '#/$defs/SafetyViolation' - - type: 'null' - required: - - turn_id - - step_id - - violation - title: ShieldCallStep - type: object - StopReason: - enum: - - end_of_turn - - end_of_message - - out_of_tokens - title: StopReason - type: string - TextContentItem: - description: >- - A text content item - - - :param type: Discriminator type of the content item. Always "text" - - :param text: Text content - properties: - type: - const: text - default: text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: TextContentItem - type: object - ToolCall: - properties: - call_id: - title: Call Id - type: string - tool_name: - anyOf: - - $ref: '#/$defs/BuiltinTool' - - type: string - title: Tool Name - arguments: - title: Arguments - type: string - required: - - call_id - - tool_name - - arguments - title: ToolCall - type: object - ToolExecutionStep: - description: >- - A tool execution step in an agent turn. - - - :param tool_calls: The tool calls to execute. - - :param tool_responses: The tool responses from the tool calls. - properties: - turn_id: - title: Turn Id - type: string - step_id: - title: Step Id - type: string - started_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Started At - completed_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Completed At - step_type: - const: tool_execution - default: tool_execution - title: Step Type - type: string - tool_calls: - items: - $ref: '#/$defs/ToolCall' - title: Tool Calls - type: array - tool_responses: - items: - $ref: '#/$defs/ToolResponse' - title: Tool Responses - type: array - required: - - turn_id - - step_id - - tool_calls - - tool_responses - title: ToolExecutionStep - type: object - ToolResponse: - description: >- - Response from a tool invocation. - - - :param call_id: Unique identifier for the tool call this response is for - - :param tool_name: Name of the tool that was invoked - - :param content: The response content from the tool - - :param metadata: (Optional) Additional metadata about the tool response - properties: - call_id: - title: Call Id - type: string - tool_name: - anyOf: - - $ref: '#/$defs/BuiltinTool' - - type: string - title: Tool Name - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/$defs/ImageContentItem' - text: '#/$defs/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/$defs/ImageContentItem' - - $ref: '#/$defs/TextContentItem' - - items: - discriminator: - mapping: - image: '#/$defs/ImageContentItem' - text: '#/$defs/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/$defs/ImageContentItem' - - $ref: '#/$defs/TextContentItem' - type: array - title: Content - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Metadata - required: - - call_id - - tool_name - - content - title: ToolResponse - type: object - URL: - description: >- - A URL reference to external content. - - - :param uri: The URL string pointing to the resource - properties: - uri: - title: Uri - type: string - required: - - uri - title: URL - type: object - ViolationLevel: - description: >- - Severity level of a safety violation. - - - :cvar INFO: Informational level violation that does not require action - - :cvar WARN: Warning level violation that suggests caution but allows continuation - - :cvar ERROR: Error level violation that requires blocking or intervention - enum: - - info - - warn - - error - title: ViolationLevel - type: string - _URLOrData: - description: >- - A URL or a base64 encoded string - - - :param url: A URL of the image or data URL in the format of data:image/{type};base64,{data}. - Note that URL could have length limits. - - :param data: base64 encoded image data as string - properties: - url: - anyOf: - - $ref: '#/$defs/URL' - - type: 'null' - data: - anyOf: - - type: string - - type: 'null' - contentEncoding: base64 - title: Data - title: _URLOrData - type: object - description: >- - Response containing details of a specific agent step. - - - :param step: The complete step data and execution details - properties: - step: - discriminator: - mapping: - inference: '#/$defs/InferenceStep' - memory_retrieval: '#/$defs/MemoryRetrievalStep' - shield_call: '#/$defs/ShieldCallStep' - tool_execution: '#/$defs/ToolExecutionStep' - propertyName: step_type - oneOf: - - $ref: '#/$defs/InferenceStep' - - $ref: '#/$defs/ToolExecutionStep' - - $ref: '#/$defs/ShieldCallStep' - - $ref: '#/$defs/MemoryRetrievalStep' - title: Step - required: - - step - title: AgentStepResponse - type: object - ListBenchmarksResponse: - $defs: - Benchmark: - description: >- - A benchmark resource for evaluating model performance. - - - :param dataset_id: Identifier of the dataset to use for the benchmark - evaluation - - :param scoring_functions: List of scoring function identifiers to apply - during evaluation - - :param metadata: Metadata for this evaluation task - - :param type: The resource type, always benchmark - properties: - identifier: - description: >- - Unique identifier for this resource in llama stack - title: Identifier - type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: >- - Unique identifier for this resource in the provider - title: Provider Resource Id - provider_id: - description: >- - ID of the provider that owns this resource - title: Provider Id - type: string - type: - const: benchmark - default: benchmark - title: Type - type: string - dataset_id: - title: Dataset Id - type: string - scoring_functions: - items: - type: string - title: Scoring Functions - type: array - metadata: - additionalProperties: true - description: Metadata for this evaluation task - title: Metadata - type: object - required: - - identifier - - provider_id - - dataset_id - - scoring_functions - title: Benchmark - type: object - properties: - data: + temperature: + title: Temperature + type: number + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + title: Top P + type: number + nullable: true + tools: + title: Tools items: - $ref: '#/$defs/Benchmark' - title: Data + discriminator: + mapping: + file_search: '#/$defs/OpenAIResponseInputToolFileSearch' + function: '#/$defs/OpenAIResponseInputToolFunction' + mcp: '#/$defs/OpenAIResponseToolMCP' + web_search: '#/$defs/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/$defs/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/$defs/OpenAIResponseInputToolWebSearch' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + type: array + nullable: true + truncation: + title: Truncation + type: string + nullable: true + usage: + $ref: '#/components/schemas/OpenAIResponseUsage' + nullable: true + instructions: + title: Instructions + type: string + nullable: true + input: + items: + anyOf: + - discriminator: + mapping: + file_search_call: '#/$defs/OpenAIResponseOutputMessageFileSearchToolCall' + function_call: '#/$defs/OpenAIResponseOutputMessageFunctionToolCall' + mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest' + mcp_call: '#/$defs/OpenAIResponseOutputMessageMCPCall' + mcp_list_tools: '#/$defs/OpenAIResponseOutputMessageMCPListTools' + message: '#/$defs/OpenAIResponseMessage' + web_search_call: '#/$defs/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: Input type: array required: - - data - title: ListBenchmarksResponse + - created_at + - id + - model + - output + - status + - input + title: OpenAIResponseObjectWithInput type: object - RegisterBenchmarkRequest: - type: object - Benchmark: - description: >- - A benchmark resource for evaluating model performance. - - - :param dataset_id: Identifier of the dataset to use for the benchmark evaluation - - :param scoring_functions: List of scoring function identifiers to apply during - evaluation - - :param metadata: Metadata for this evaluation task - - :param type: The resource type, always benchmark + ImageContentItem: + description: "A image content item\n\n:param type: Discriminator type of the content item. Always \"image\"\n:param image: Image as a base64 encoded string or an URL" properties: - identifier: - description: >- - Unique identifier for this resource in llama stack - title: Identifier - type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: >- - Unique identifier for this resource in the provider - title: Provider Resource Id - provider_id: - description: >- - ID of the provider that owns this resource - title: Provider Id - type: string type: - const: benchmark - default: benchmark + const: image + default: image title: Type type: string - dataset_id: - title: Dataset Id - type: string - scoring_functions: - items: - type: string - title: Scoring Functions - type: array - metadata: - additionalProperties: true - description: Metadata for this evaluation task - title: Metadata - type: object + image: + $ref: '#/components/schemas/_URLOrData' required: - - identifier - - provider_id - - dataset_id - - scoring_functions - title: Benchmark + - image + title: ImageContentItem type: object properties: type: @@ -19372,401 +18617,46 @@ components: :param scores: The scores from the evaluation. properties: - generations: - items: - additionalProperties: true - type: object - title: Generations - type: array - scores: - additionalProperties: - $ref: '#/$defs/ScoringResult' - title: Scores - type: object + epoch: + title: Epoch + type: integer + train_loss: + title: Train Loss + type: number + validation_loss: + title: Validation Loss + type: number + perplexity: + title: Perplexity + type: number required: - - generations - - scores - title: EvaluateResponse + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric type: object - RunEvalRequest: - type: object - Job: - $defs: - JobStatus: - description: >- - Status of a job execution. - - :cvar completed: Job has finished successfully - - :cvar in_progress: Job is currently running - - :cvar failed: Job has failed during execution - - :cvar scheduled: Job is scheduled but not yet started - - :cvar cancelled: Job was cancelled before completion - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - type: string - description: >- - A job execution instance with status tracking. - - - :param job_id: Unique identifier for the job - - :param status: Current execution status of the job + _safety_run_shield_Request: properties: - job_id: - title: Job Id + shield_id: + title: Shield Id type: string - status: - $ref: '#/$defs/JobStatus' - required: - - job_id - - status - title: Job - type: object - RerankRequest: - type: object - RerankResponse: - $defs: - RerankData: - description: >- - A single rerank result from a reranking response. - - - :param index: The original index of the document in the input list - - :param relevance_score: The relevance score from the model output. Values - are inverted when applicable so that higher scores indicate greater relevance. - properties: - index: - title: Index - type: integer - relevance_score: - title: Relevance Score - type: number - required: - - index - - relevance_score - title: RerankData - type: object - description: >- - Response from a reranking request. - - - :param data: List of rerank result objects, sorted by relevance score (descending) - properties: - data: - items: - $ref: '#/$defs/RerankData' - title: Data - type: array - required: - - data - title: RerankResponse - type: object - PostTrainingJobArtifactsResponse: - $defs: - Checkpoint: - description: >- - Checkpoint created during training runs. - - - :param identifier: Unique identifier for the checkpoint - - :param created_at: Timestamp when the checkpoint was created - - :param epoch: Training epoch when the checkpoint was saved - - :param post_training_job_id: Identifier of the training job that created - this checkpoint - - :param path: File system path where the checkpoint is stored - - :param training_metrics: (Optional) Training metrics associated with this - checkpoint - properties: - identifier: - title: Identifier - type: string - created_at: - format: date-time - title: Created At - type: string - epoch: - title: Epoch - type: integer - post_training_job_id: - title: Post Training Job Id - type: string - path: - title: Path - type: string - training_metrics: - anyOf: - - $ref: '#/$defs/PostTrainingMetric' - - type: 'null' - required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - type: object - PostTrainingMetric: - description: >- - Training metrics captured during post-training jobs. - - - :param epoch: Training epoch number - - :param train_loss: Loss value on the training dataset - - :param validation_loss: Loss value on the validation dataset - - :param perplexity: Perplexity metric indicating model confidence - properties: - epoch: - title: Epoch - type: integer - train_loss: - title: Train Loss - type: number - validation_loss: - title: Validation Loss - type: number - perplexity: - title: Perplexity - type: number - required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric - type: object - description: >- - Artifacts of a finetuning job. - - - :param job_uuid: Unique identifier for the training job - - :param checkpoints: List of model checkpoints created during training - properties: - job_uuid: - title: Job Uuid - type: string - checkpoints: - items: - $ref: '#/$defs/Checkpoint' - title: Checkpoints - type: array - required: - - job_uuid - title: PostTrainingJobArtifactsResponse - type: object - CancelTrainingJobRequest: - type: object - PostTrainingJobStatusResponse: - $defs: - Checkpoint: - description: >- - Checkpoint created during training runs. - - - :param identifier: Unique identifier for the checkpoint - - :param created_at: Timestamp when the checkpoint was created - - :param epoch: Training epoch when the checkpoint was saved - - :param post_training_job_id: Identifier of the training job that created - this checkpoint - - :param path: File system path where the checkpoint is stored - - :param training_metrics: (Optional) Training metrics associated with this - checkpoint - properties: - identifier: - title: Identifier - type: string - created_at: - format: date-time - title: Created At - type: string - epoch: - title: Epoch - type: integer - post_training_job_id: - title: Post Training Job Id - type: string - path: - title: Path - type: string - training_metrics: - anyOf: - - $ref: '#/$defs/PostTrainingMetric' - - type: 'null' - required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - type: object - JobStatus: - description: >- - Status of a job execution. - - :cvar completed: Job has finished successfully - - :cvar in_progress: Job is currently running - - :cvar failed: Job has failed during execution - - :cvar scheduled: Job is scheduled but not yet started - - :cvar cancelled: Job was cancelled before completion - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - type: string - PostTrainingMetric: - description: >- - Training metrics captured during post-training jobs. - - - :param epoch: Training epoch number - - :param train_loss: Loss value on the training dataset - - :param validation_loss: Loss value on the validation dataset - - :param perplexity: Perplexity metric indicating model confidence - properties: - epoch: - title: Epoch - type: integer - train_loss: - title: Train Loss - type: number - validation_loss: - title: Validation Loss - type: number - perplexity: - title: Perplexity - type: number - required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric - type: object - description: >- - Status of a finetuning job. - - - :param job_uuid: Unique identifier for the training job - - :param status: Current status of the training job - - :param scheduled_at: (Optional) Timestamp when the job was scheduled - - :param started_at: (Optional) Timestamp when the job execution began - - :param completed_at: (Optional) Timestamp when the job finished, if completed - - :param resources_allocated: (Optional) Information about computational resources - allocated to the job - - :param checkpoints: List of model checkpoints created during training - properties: - job_uuid: - title: Job Uuid - type: string - status: - $ref: '#/$defs/JobStatus' - scheduled_at: + messages: anyOf: - - format: date-time - type: string - - type: 'null' - title: Scheduled At - started_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Started At - completed_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Completed At - resources_allocated: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Resources Allocated - checkpoints: - items: - $ref: '#/$defs/Checkpoint' - title: Checkpoints - type: array - required: - - job_uuid - - status - title: PostTrainingJobStatusResponse - type: object - ListPostTrainingJobsResponse: - $defs: - PostTrainingJob: - properties: - job_uuid: - title: Job Uuid - type: string - required: - - job_uuid - title: PostTrainingJob - type: object - properties: - data: - items: - $ref: '#/$defs/PostTrainingJob' - title: Data - type: array - required: - - data - title: ListPostTrainingJobsResponse - type: object - PreferenceOptimizeRequest: - type: object - PostTrainingJob: - properties: - job_uuid: - title: Job Uuid + - $ref: '#/components/schemas/OpenAIUserMessageParam' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: Messages + params: + title: Params type: string required: - - job_uuid - title: PostTrainingJob - type: object - SupervisedFineTuneRequest: + - shield_id + - messages + - params + title: _safety_run_shield_Request type: object responses: BadRequest400: @@ -19780,8 +18670,7 @@ components: title: Bad Request detail: The request was invalid or malformed TooManyRequests429: - description: >- - The client has sent too many requests in a given amount of time + description: The client has sent too many requests in a given amount of time content: application/json: schema: @@ -19789,11 +18678,9 @@ components: example: status: 429 title: Too Many Requests - detail: >- - You have exceeded the rate limit. Please try again later. + detail: You have exceeded the rate limit. Please try again later. InternalServerError500: - description: >- - The server encountered an unexpected error + description: The server encountered an unexpected error content: application/json: schema: @@ -19801,10 +18688,9 @@ components: example: status: 500 title: Internal Server Error - detail: >- - An unexpected error occurred. Our team has been notified. + detail: An unexpected error occurred DefaultError: - description: An unexpected error occurred + description: An error occurred content: application/json: schema: diff --git a/docs/static/experimental-llama-stack-spec.yaml b/docs/static/experimental-llama-stack-spec.yaml index c81b375b0..204cc9e02 100644 --- a/docs/static/experimental-llama-stack-spec.yaml +++ b/docs/static/experimental-llama-stack-spec.yaml @@ -27,6 +27,12 @@ paths: required: true schema: title: Kwargs + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' responses: '200': description: Successful Response @@ -59,18 +65,18 @@ paths: schema: type: string title: Dataset Id - - name: start_index - in: query - required: false - schema: - type: integer - title: Start Index - name: limit in: query - required: false + required: true schema: type: integer title: Limit + - name: start_index + in: query + required: true + schema: + type: integer + title: Start Index responses: '200': description: A PaginatedResponse. @@ -105,41 +111,29 @@ paths: schema: $ref: '#/components/schemas/ListDatasetsResponse' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' post: tags: - V1Beta summary: Register Dataset - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: register_dataset_v1beta_datasets_post - parameters: - - name: purpose - in: query - required: false - schema: - $ref: '#/components/schemas/DatasetPurpose' - - name: metadata - in: query - required: false - schema: - type: string - title: Metadata - - name: dataset_id - in: query - required: false - schema: - type: string - title: Dataset Id + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/__main_____datasets_Request' + required: true responses: '200': description: A Dataset. @@ -148,17 +142,17 @@ paths: schema: $ref: '#/components/schemas/Dataset' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' /v1beta/datasets/{dataset_id}: delete: tags: @@ -177,6 +171,12 @@ paths: required: true schema: title: Kwargs + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' responses: '200': description: Successful Response @@ -235,18 +235,18 @@ paths: description: Query endpoint for proper schema generation. operationId: list_agents_v1alpha_agents_get parameters: - - name: start_index - in: query - required: false - schema: - type: integer - title: Start Index - name: limit in: query - required: false + required: true schema: type: integer title: Limit + - name: start_index + in: query + required: true + schema: + type: integer + title: Start Index responses: '200': description: A PaginatedResponse. @@ -315,6 +315,12 @@ paths: required: true schema: title: Kwargs + - name: agent_id + in: path + required: true + schema: + type: string + description: 'Path parameter: agent_id' responses: '200': description: Successful Response @@ -370,21 +376,14 @@ paths: tags: - V1Alpha summary: Create Agent Session - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: create_agent_session_v1alpha_agents__agent_id__session_post - parameters: - - name: agent_id - in: path + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/__main_____agents_agent_id_session_Request' required: true - schema: - type: string - title: Agent Id - - name: session_name - in: query - required: false - schema: - type: string - title: Session Name responses: '200': description: An AgentSessionCreateResponse. @@ -393,17 +392,24 @@ paths: schema: $ref: '#/components/schemas/AgentSessionCreateResponse' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + description: 'Path parameter: agent_id' /v1alpha/agents/{agent_id}/session/{session_id}: delete: tags: @@ -422,6 +428,18 @@ paths: required: true schema: title: Kwargs + - name: agent_id + in: path + required: true + schema: + type: string + description: 'Path parameter: agent_id' + - name: session_id + in: path + required: true + schema: + type: string + description: 'Path parameter: session_id' responses: '200': description: Successful Response @@ -447,21 +465,21 @@ paths: description: Query endpoint for proper schema generation. operationId: get_agents_session_v1alpha_agents__agent_id__session__session_id__get parameters: - - name: session_id - in: path - required: true - schema: - type: string - title: Session Id - name: agent_id in: path required: true schema: type: string title: Agent Id + - name: session_id + in: path + required: true + schema: + type: string + title: Session Id - name: turn_ids in: query - required: false + required: true schema: type: string title: Turn Ids @@ -489,33 +507,14 @@ paths: tags: - V1Alpha summary: Create Agent Turn - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: create_agent_turn_v1alpha_agents__agent_id__session__session_id__turn_post - parameters: - - name: agent_id - in: path - required: true - schema: - type: string - title: Agent Id - - name: session_id - in: path - required: true - schema: - type: string - title: Session Id - - name: stream - in: query - required: false - schema: - type: boolean - default: false - title: Stream requestBody: content: application/json: schema: - $ref: '#/components/schemas/Body_create_agent_turn_v1alpha_agents__agent_id__session__session_id__turn_post' + $ref: '#/components/schemas/__main_____agents_agent_id_session_session_id_turn_Request' + required: true responses: '200': description: If stream=False, returns a Turn object. @@ -524,17 +523,30 @@ paths: schema: $ref: '#/components/schemas/Turn' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + description: 'Path parameter: agent_id' + - name: session_id + in: path + required: true + schema: + type: string + description: 'Path parameter: session_id' /v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}: get: tags: @@ -585,39 +597,14 @@ paths: tags: - V1Alpha summary: Resume Agent Turn - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: resume_agent_turn_v1alpha_agents__agent_id__session__session_id__turn__turn_id__resume_post - parameters: - - name: agent_id - in: path - required: true - schema: - type: string - title: Agent Id - - name: session_id - in: path - required: true - schema: - type: string - title: Session Id - - name: turn_id - in: path - required: true - schema: - type: string - title: Turn Id - - name: stream - in: query - required: false - schema: - type: boolean - default: false - title: Stream requestBody: content: application/json: schema: - $ref: '#/components/schemas/ToolResponse' + $ref: '#/components/schemas/__main_____agents_agent_id_session_session_id_turn_turn_id_resume_Request' + required: true responses: '200': description: A Turn object if stream is False, otherwise an AsyncIterator @@ -627,17 +614,36 @@ paths: schema: $ref: '#/components/schemas/Turn' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + description: 'Path parameter: agent_id' + - name: session_id + in: path + required: true + schema: + type: string + description: 'Path parameter: session_id' + - name: turn_id + in: path + required: true + schema: + type: string + description: 'Path parameter: turn_id' /v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}/step/{step_id}: get: tags: @@ -658,18 +664,18 @@ paths: schema: type: string title: Session Id - - name: turn_id - in: path - required: true - schema: - type: string - title: Turn Id - name: step_id in: path required: true schema: type: string title: Step Id + - name: turn_id + in: path + required: true + schema: + type: string + title: Turn Id responses: '200': description: An AgentStepResponse. @@ -703,18 +709,18 @@ paths: schema: type: string title: Agent Id - - name: start_index - in: query - required: false - schema: - type: integer - title: Start Index - name: limit in: query - required: false + required: true schema: type: integer title: Limit + - name: start_index + in: query + required: true + schema: + type: integer + title: Start Index responses: '200': description: A PaginatedResponse. @@ -813,6 +819,12 @@ paths: required: true schema: title: Kwargs + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' responses: '200': description: Successful Response @@ -895,6 +907,13 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + parameters: + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' /v1alpha/eval/benchmarks/{benchmark_id}/jobs: post: tags: @@ -927,6 +946,13 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + parameters: + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: delete: tags: @@ -945,6 +971,18 @@ paths: required: true schema: title: Kwargs + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' + - name: job_id + in: path + required: true + schema: + type: string + description: 'Path parameter: job_id' responses: '200': description: Successful Response @@ -1045,33 +1083,14 @@ paths: tags: - V1Alpha summary: Rerank - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: rerank_v1alpha_inference_rerank_post - parameters: - - name: model - in: query - required: false - schema: - type: string - title: Model - - name: query - in: query - required: false - schema: - type: string - title: Query - - name: items - in: query - required: false - schema: - type: string - title: Items - - name: max_num_results - in: query - required: false - schema: - type: integer - title: Max Num Results + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_inference_rerank_Request' + required: true responses: '200': description: RerankResponse with indices sorted by relevance score (descending). @@ -1080,17 +1099,17 @@ paths: schema: $ref: '#/components/schemas/RerankResponse' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' /v1alpha/post-training/job/artifacts: get: tags: @@ -1101,7 +1120,7 @@ paths: parameters: - name: job_uuid in: query - required: false + required: true schema: type: string title: Job Uuid @@ -1170,7 +1189,7 @@ paths: parameters: - name: job_uuid in: query - required: false + required: true schema: type: string title: Job Uuid @@ -1305,59 +1324,41 @@ components: AgentConfig: properties: sampling_params: - anyOf: - - $ref: '#/components/schemas/SamplingParams' - - type: 'null' + $ref: '#/components/schemas/SamplingParams' input_shields: - anyOf: - - items: - type: string - type: array - - type: 'null' title: Input Shields + items: + type: string + type: array output_shields: - anyOf: - - items: - type: string - type: array - - type: 'null' title: Output Shields + items: + type: string + type: array toolgroups: - anyOf: - - items: - anyOf: - - type: string - - $ref: '#/components/schemas/AgentToolGroupWithArgs' - type: array - - type: 'null' title: Toolgroups + items: + anyOf: + - type: string + - $ref: '#/components/schemas/AgentToolGroupWithArgs' + type: array client_tools: - anyOf: - - items: - $ref: '#/components/schemas/ToolDef' - type: array - - type: 'null' title: Client Tools + items: + $ref: '#/components/schemas/ToolDef' + type: array tool_choice: - anyOf: - - $ref: '#/components/schemas/ToolChoice' - - type: 'null' deprecated: true + $ref: '#/components/schemas/ToolChoice' tool_prompt_format: - anyOf: - - $ref: '#/components/schemas/ToolPromptFormat' - - type: 'null' deprecated: true + $ref: '#/components/schemas/ToolPromptFormat' tool_config: - anyOf: - - $ref: '#/components/schemas/ToolConfig' - - type: 'null' + $ref: '#/components/schemas/ToolConfig' max_infer_iters: - anyOf: - - type: integer - - type: 'null' title: Max Infer Iters default: 10 + type: integer model: type: string title: Model @@ -1365,28 +1366,22 @@ components: type: string title: Instructions name: - anyOf: - - type: string - - type: 'null' title: Name + type: string enable_session_persistence: - anyOf: - - type: boolean - - type: 'null' title: Enable Session Persistence default: false + type: boolean response_format: - anyOf: - - oneOf: - - $ref: '#/components/schemas/JsonSchemaResponseFormat' - - $ref: '#/components/schemas/GrammarResponseFormat' - discriminator: - propertyName: type - mapping: - grammar: '#/components/schemas/GrammarResponseFormat' - json_schema: '#/components/schemas/JsonSchemaResponseFormat' - - type: 'null' title: Response Format + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + - $ref: '#/components/schemas/GrammarResponseFormat' + discriminator: + propertyName: type + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' type: object required: - model @@ -1418,6 +1413,19 @@ components: :param agent_id: Unique identifier for the created agent' + AgentSessionCreateResponse: + properties: + session_id: + type: string + title: Session Id + type: object + required: + - session_id + title: AgentSessionCreateResponse + description: 'Response returned when creating a new agent session. + + + :param session_id: Unique identifier for the created session' AgentToolGroupWithArgs: properties: name: @@ -1452,6 +1460,45 @@ components: :cvar categorical_count: Count occurrences of categorical values :cvar accuracy: Calculate accuracy as the proportion of correct answers' + Attachment-Output: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + - $ref: '#/components/schemas/URL' + title: Content + mime_type: + type: string + title: Mime Type + type: object + required: + - content + - mime_type + title: Attachment + description: 'An attachment to an agent turn. + + + :param content: The content of the attachment. + + :param mime_type: The MIME type of the attachment.' BasicScoringFnParams: properties: type: @@ -1480,11 +1527,9 @@ components: title: Identifier description: Unique identifier for this resource in llama stack provider_resource_id: - anyOf: - - type: string - - type: 'null' title: Provider Resource Id description: Unique identifier for this resource in the provider + type: string provider_id: type: string title: Provider Id @@ -1554,12 +1599,10 @@ components: description: Map between scoring function id and parameters for each scoring function you want to run num_examples: - anyOf: - - type: integer - - type: 'null' title: Num Examples description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated + type: integer type: object required: - eval_candidate @@ -1574,21 +1617,6 @@ components: :param num_examples: (Optional) The number of examples to evaluate. If not provided, all examples in the dataset will be evaluated' - Body_create_agent_turn_v1alpha_agents__agent_id__session__session_id__turn_post: - properties: - messages: - $ref: '#/components/schemas/UserMessage' - documents: - $ref: '#/components/schemas/Document' - toolgroups: - anyOf: - - type: string - - $ref: '#/components/schemas/AgentToolGroupWithArgs' - title: Toolgroups - tool_config: - $ref: '#/components/schemas/ToolConfig' - type: object - title: Body_create_agent_turn_v1alpha_agents__agent_id__session__session_id__turn_post BuiltinTool: type: string enum: @@ -1597,6 +1625,57 @@ components: - photogen - code_interpreter title: BuiltinTool + CompletionMessage-Output: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + stop_reason: + $ref: '#/components/schemas/StopReason' + tool_calls: + title: Tool Calls + items: + $ref: '#/components/schemas/ToolCall' + type: array + type: object + required: + - content + - stop_reason + title: CompletionMessage + description: "A message containing the model's (assistant) response in a chat\ + \ conversation.\n\n:param role: Must be \"assistant\" to identify this as\ + \ the model's response\n:param content: The content of the model's response\n\ + :param stop_reason: Reason why the model stopped generating. Options are:\n\ + \ - `StopReason.end_of_turn`: The model finished generating the entire\ + \ response.\n - `StopReason.end_of_message`: The model finished generating\ + \ but generated a partial response -- usually, a tool call. The user may call\ + \ the tool and continue the conversation with the tool's response.\n -\ + \ `StopReason.out_of_tokens`: The model ran out of token budget.\n:param tool_calls:\ + \ List of tool calls. Each tool call is a ToolCall object." DPOAlignmentConfig: properties: beta: @@ -1637,22 +1716,16 @@ components: data_format: $ref: '#/components/schemas/DatasetFormat' validation_dataset_id: - anyOf: - - type: string - - type: 'null' title: Validation Dataset Id + type: string packed: - anyOf: - - type: boolean - - type: 'null' title: Packed default: false + type: boolean train_on_input: - anyOf: - - type: boolean - - type: 'null' title: Train On Input default: false + type: boolean type: object required: - dataset_id @@ -1686,11 +1759,9 @@ components: title: Identifier description: Unique identifier for this resource in llama stack provider_resource_id: - anyOf: - - type: string - - type: 'null' title: Provider Resource Id description: Unique identifier for this resource in the provider + type: string provider_id: type: string title: Provider Id @@ -1767,21 +1838,21 @@ components: anyOf: - type: string - oneOf: - - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/ImageContentItem-Input' - $ref: '#/components/schemas/TextContentItem' discriminator: propertyName: type mapping: - image: '#/components/schemas/ImageContentItem' + image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' - items: oneOf: - - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/ImageContentItem-Input' - $ref: '#/components/schemas/TextContentItem' discriminator: propertyName: type mapping: - image: '#/components/schemas/ImageContentItem' + image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' type: array - $ref: '#/components/schemas/URL' @@ -1803,29 +1874,21 @@ components: EfficiencyConfig: properties: enable_activation_checkpointing: - anyOf: - - type: boolean - - type: 'null' title: Enable Activation Checkpointing default: false + type: boolean enable_activation_offloading: - anyOf: - - type: boolean - - type: 'null' title: Enable Activation Offloading default: false + type: boolean memory_efficient_fsdp_wrap: - anyOf: - - type: boolean - - type: 'null' title: Memory Efficient Fsdp Wrap default: false + type: boolean fsdp_cpu_offload: - anyOf: - - type: boolean - - type: 'null' title: Fsdp Cpu Offload default: false + type: boolean type: object title: EfficiencyConfig description: 'Configuration for memory and compute efficiency optimizations. @@ -1901,7 +1964,7 @@ components: :param type: Must be "greedy" to identify this sampling strategy' - ImageContentItem: + ImageContentItem-Input: properties: type: type: string @@ -1920,6 +1983,58 @@ components: :param type: Discriminator type of the content item. Always "image" :param image: Image as a base64 encoded string or an URL' + ImageContentItem-Output: + properties: + type: + type: string + const: image + title: Type + default: image + image: + $ref: '#/components/schemas/_URLOrData' + type: object + required: + - image + title: ImageContentItem + description: 'A image content item + + + :param type: Discriminator type of the content item. Always "image" + + :param image: Image as a base64 encoded string or an URL' + InferenceStep-Output: + properties: + turn_id: + type: string + title: Turn Id + step_id: + type: string + title: Step Id + started_at: + title: Started At + type: string + format: date-time + completed_at: + title: Completed At + type: string + format: date-time + step_type: + type: string + const: inference + title: Step Type + default: inference + model_response: + $ref: '#/components/schemas/CompletionMessage-Output' + type: object + required: + - turn_id + - step_id + - model_response + title: InferenceStep + description: 'An inference step in an agent turn. + + + :param model_response: The response from the LLM.' Job: properties: job_id: @@ -1991,10 +2106,8 @@ components: type: string title: Judge Model prompt_template: - anyOf: - - type: string - - type: 'null' title: Prompt Template + type: string judge_score_regexes: items: type: string @@ -2060,6 +2173,66 @@ components: required: - data title: ListPostTrainingJobsResponse + MemoryRetrievalStep-Output: + properties: + turn_id: + type: string + title: Turn Id + step_id: + type: string + title: Step Id + started_at: + title: Started At + type: string + format: date-time + completed_at: + title: Completed At + type: string + format: date-time + step_type: + type: string + const: memory_retrieval + title: Step Type + default: memory_retrieval + vector_store_ids: + type: string + title: Vector Store Ids + inserted_context: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Inserted Context + type: object + required: + - turn_id + - step_id + - vector_store_ids + - inserted_context + title: MemoryRetrievalStep + description: 'A memory retrieval step in an agent turn. + + + :param vector_store_ids: The IDs of the vector databases to retrieve context + from. + + :param inserted_context: The context retrieved from the vector databases.' ModelCandidate: properties: type: @@ -2073,9 +2246,7 @@ components: sampling_params: $ref: '#/components/schemas/SamplingParams' system_message: - anyOf: - - $ref: '#/components/schemas/SystemMessage' - - type: 'null' + $ref: '#/components/schemas/SystemMessage' type: object required: - model @@ -2172,6 +2343,41 @@ components: :param aggregation_functions: Aggregation functions to apply to the scores of each row' + RerankData: + properties: + index: + type: integer + title: Index + relevance_score: + type: number + title: Relevance Score + type: object + required: + - index + - relevance_score + title: RerankData + description: 'A single rerank result from a reranking response. + + + :param index: The original index of the document in the input list + + :param relevance_score: The relevance score from the model output. Values + are inverted when applicable so that higher scores indicate greater relevance.' + RerankResponse: + properties: + data: + items: + $ref: '#/components/schemas/RerankData' + type: array + title: Data + type: object + required: + - data + title: RerankResponse + description: 'Response from a reranking request. + + + :param data: List of rerank result objects, sorted by relevance score (descending)' RowsDataSource: properties: type: @@ -2193,6 +2399,30 @@ components: \ in rows. E.g.\n - [\n {\"messages\": [{\"role\": \"user\", \"\ content\": \"Hello, world!\"}, {\"role\": \"assistant\", \"content\": \"Hello,\ \ world!\"}]}\n ]" + SafetyViolation: + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + user_message: + title: User Message + type: string + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - violation_level + title: SafetyViolation + description: 'Details of a safety violation detected by content moderation. + + + :param violation_level: Severity level of the violation + + :param user_message: (Optional) Message to convey to the user about the violation + + :param metadata: Additional metadata including specific violation codes for + debugging and telemetry' SamplingParams: properties: strategy: @@ -2208,23 +2438,17 @@ components: top_k: '#/components/schemas/TopKSamplingStrategy' top_p: '#/components/schemas/TopPSamplingStrategy' max_tokens: - anyOf: - - type: integer - - type: 'null' title: Max Tokens + type: integer repetition_penalty: - anyOf: - - type: number - - type: 'null' title: Repetition Penalty default: 1.0 + type: number stop: - anyOf: - - items: - type: string - type: array - - type: 'null' title: Stop + items: + type: string + type: array type: object title: SamplingParams description: "Sampling parameters.\n\n:param strategy: The sampling strategy.\n\ @@ -2259,6 +2483,46 @@ components: name to value. :param aggregated_results: Map of metric name to aggregated value' + ShieldCallStep-Output: + properties: + turn_id: + type: string + title: Turn Id + step_id: + type: string + title: Step Id + started_at: + title: Started At + type: string + format: date-time + completed_at: + title: Completed At + type: string + format: date-time + step_type: + type: string + const: shield_call + title: Step Type + default: shield_call + violation: + $ref: '#/components/schemas/SafetyViolation' + type: object + required: + - turn_id + - step_id + - violation + title: ShieldCallStep + description: 'A shield call step in an agent turn. + + + :param violation: The violation from the shield call.' + StopReason: + type: string + enum: + - end_of_turn + - end_of_message + - out_of_tokens + title: StopReason SystemMessage: properties: role: @@ -2270,21 +2534,21 @@ components: anyOf: - type: string - oneOf: - - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/ImageContentItem-Input' - $ref: '#/components/schemas/TextContentItem' discriminator: propertyName: type mapping: - image: '#/components/schemas/ImageContentItem' + image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' - items: oneOf: - - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/ImageContentItem-Input' - $ref: '#/components/schemas/TextContentItem' discriminator: propertyName: type mapping: - image: '#/components/schemas/ImageContentItem' + image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' type: array title: Content @@ -2332,6 +2596,25 @@ components: :param type: Discriminator type of the content item. Always "text" :param text: Text content' + ToolCall: + properties: + call_id: + type: string + title: Call Id + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + arguments: + type: string + title: Arguments + type: object + required: + - call_id + - tool_name + - arguments + title: ToolCall ToolChoice: type: string enum: @@ -2355,18 +2638,13 @@ components: anyOf: - $ref: '#/components/schemas/ToolChoice' - type: string - - type: 'null' title: Tool Choice default: auto tool_prompt_format: - anyOf: - - $ref: '#/components/schemas/ToolPromptFormat' - - type: 'null' + $ref: '#/components/schemas/ToolPromptFormat' system_message_behavior: - anyOf: - - $ref: '#/components/schemas/SystemMessageBehavior' - - type: 'null' default: append + $ref: '#/components/schemas/SystemMessageBehavior' type: object title: ToolConfig description: "Configuration for tool use.\n\n:param tool_choice: (Optional)\ @@ -2387,36 +2665,26 @@ components: ToolDef: properties: toolgroup_id: - anyOf: - - type: string - - type: 'null' title: Toolgroup Id + type: string name: type: string title: Name description: - anyOf: - - type: string - - type: 'null' title: Description + type: string input_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' title: Input Schema + additionalProperties: true + type: object output_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' title: Output Schema + additionalProperties: true + type: object metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' title: Metadata + additionalProperties: true + type: object type: object required: - name @@ -2436,6 +2704,50 @@ components: :param metadata: (Optional) Additional metadata about the tool :param toolgroup_id: (Optional) ID of the tool group this tool belongs to' + ToolExecutionStep-Output: + properties: + turn_id: + type: string + title: Turn Id + step_id: + type: string + title: Step Id + started_at: + title: Started At + type: string + format: date-time + completed_at: + title: Completed At + type: string + format: date-time + step_type: + type: string + const: tool_execution + title: Step Type + default: tool_execution + tool_calls: + items: + $ref: '#/components/schemas/ToolCall' + type: array + title: Tool Calls + tool_responses: + items: + $ref: '#/components/schemas/ToolResponse-Output' + type: array + title: Tool Responses + type: object + required: + - turn_id + - step_id + - tool_calls + - tool_responses + title: ToolExecutionStep + description: 'A tool execution step in an agent turn. + + + :param tool_calls: The tool calls to execute. + + :param tool_responses: The tool responses from the tool calls.' ToolPromptFormat: type: string enum: @@ -2453,7 +2765,7 @@ components: \ that can be\n evaluated to a list. Each element in the list is a function\ \ call. Example:\n [\"function_name(param1, param2)\", \"function_name(param1,\ \ param2)\"]" - ToolResponse: + ToolResponse-Input: properties: call_id: type: string @@ -2467,30 +2779,28 @@ components: anyOf: - type: string - oneOf: - - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/ImageContentItem-Input' - $ref: '#/components/schemas/TextContentItem' discriminator: propertyName: type mapping: - image: '#/components/schemas/ImageContentItem' + image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' - items: oneOf: - - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/ImageContentItem-Input' - $ref: '#/components/schemas/TextContentItem' discriminator: propertyName: type mapping: - image: '#/components/schemas/ImageContentItem' + image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' type: array title: Content metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' title: Metadata + additionalProperties: true + type: object type: object required: - call_id @@ -2507,6 +2817,103 @@ components: :param content: The response content from the tool :param metadata: (Optional) Additional metadata about the tool response' + ToolResponse-Output: + properties: + call_id: + type: string + title: Call Id + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + metadata: + title: Metadata + additionalProperties: true + type: object + type: object + required: + - call_id + - tool_name + - content + title: ToolResponse + description: 'Response from a tool invocation. + + + :param call_id: Unique identifier for the tool call this response is for + + :param tool_name: Name of the tool that was invoked + + :param content: The response content from the tool + + :param metadata: (Optional) Additional metadata about the tool response' + ToolResponseMessage-Output: + properties: + role: + type: string + const: tool + title: Role + default: tool + call_id: + type: string + title: Call Id + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + type: object + required: + - call_id + - content + title: ToolResponseMessage + description: 'A message representing the result of a tool invocation. + + + :param role: Must be "tool" to identify this as a tool response + + :param call_id: Unique identifier for the tool call this response is for + + :param content: The response content from the tool' TopKSamplingStrategy: properties: type: @@ -2538,17 +2945,13 @@ components: title: Type default: top_p temperature: - anyOf: - - type: number - minimum: 0.0 - - type: 'null' title: Temperature + type: number + minimum: 0.0 top_p: - anyOf: - - type: number - - type: 'null' title: Top P default: 0.95 + type: number type: object required: - temperature @@ -2578,29 +2981,19 @@ components: title: Gradient Accumulation Steps default: 1 max_validation_steps: - anyOf: - - type: integer - - type: 'null' title: Max Validation Steps default: 1 + type: integer data_config: - anyOf: - - $ref: '#/components/schemas/DataConfig' - - type: 'null' + $ref: '#/components/schemas/DataConfig' optimizer_config: - anyOf: - - $ref: '#/components/schemas/OptimizerConfig' - - type: 'null' + $ref: '#/components/schemas/OptimizerConfig' efficiency_config: - anyOf: - - $ref: '#/components/schemas/EfficiencyConfig' - - type: 'null' + $ref: '#/components/schemas/EfficiencyConfig' dtype: - anyOf: - - type: string - - type: 'null' title: Dtype default: bf16 + type: string type: object required: - n_epochs @@ -2626,6 +3019,81 @@ components: optimizations :param dtype: (Optional) Data type for model parameters (bf16, fp16, fp32)' + Turn: + properties: + turn_id: + type: string + title: Turn Id + session_id: + type: string + title: Session Id + input_messages: + items: + anyOf: + - $ref: '#/components/schemas/UserMessage-Output' + - $ref: '#/components/schemas/ToolResponseMessage-Output' + type: array + title: Input Messages + steps: + items: + oneOf: + - $ref: '#/components/schemas/InferenceStep-Output' + - $ref: '#/components/schemas/ToolExecutionStep-Output' + - $ref: '#/components/schemas/ShieldCallStep-Output' + - $ref: '#/components/schemas/MemoryRetrievalStep-Output' + discriminator: + propertyName: step_type + mapping: + inference: '#/components/schemas/InferenceStep-Output' + memory_retrieval: '#/components/schemas/MemoryRetrievalStep-Output' + shield_call: '#/components/schemas/ShieldCallStep-Output' + tool_execution: '#/components/schemas/ToolExecutionStep-Output' + type: array + title: Steps + output_message: + $ref: '#/components/schemas/CompletionMessage-Output' + output_attachments: + title: Output Attachments + items: + $ref: '#/components/schemas/Attachment-Output' + type: array + started_at: + type: string + format: date-time + title: Started At + completed_at: + title: Completed At + type: string + format: date-time + type: object + required: + - turn_id + - session_id + - input_messages + - steps + - output_message + - started_at + title: Turn + description: 'A single turn in an interaction with an Agentic System. + + + :param turn_id: Unique identifier for the turn within a session + + :param session_id: Unique identifier for the conversation session + + :param input_messages: List of messages that initiated this turn + + :param steps: Ordered list of processing steps executed during this turn + + :param output_message: The model''s generated response containing content + and metadata + + :param output_attachments: (Optional) Files or media attached to the agent''s + response + + :param started_at: Timestamp when the turn began + + :param completed_at: (Optional) Timestamp when the turn finished, if completed' URIDataSource: properties: type: @@ -2656,7 +3124,7 @@ components: :param uri: The URL string pointing to the resource' - UserMessage: + UserMessage-Input: properties: role: type: string @@ -2667,21 +3135,21 @@ components: anyOf: - type: string - oneOf: - - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/ImageContentItem-Input' - $ref: '#/components/schemas/TextContentItem' discriminator: propertyName: type mapping: - image: '#/components/schemas/ImageContentItem' + image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' - items: oneOf: - - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/ImageContentItem-Input' - $ref: '#/components/schemas/TextContentItem' discriminator: propertyName: type mapping: - image: '#/components/schemas/ImageContentItem' + image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' type: array title: Content @@ -2689,24 +3157,23 @@ components: anyOf: - type: string - oneOf: - - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/ImageContentItem-Input' - $ref: '#/components/schemas/TextContentItem' discriminator: propertyName: type mapping: - image: '#/components/schemas/ImageContentItem' + image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' - items: oneOf: - - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/ImageContentItem-Input' - $ref: '#/components/schemas/TextContentItem' discriminator: propertyName: type mapping: - image: '#/components/schemas/ImageContentItem' + image: '#/components/schemas/ImageContentItem-Input' text: '#/components/schemas/TextContentItem' type: array - - type: 'null' title: Context type: object required: @@ -2722,18 +3189,94 @@ components: :param context: (Optional) This field is used internally by Llama Stack to pass RAG context. This field may be removed in the API in the future.' + UserMessage-Output: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + context: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Context + type: object + required: + - content + title: UserMessage + description: 'A message from the user in a chat conversation. + + + :param role: Must be "user" to identify this as a user message + + :param content: The content of the message, which can include text and other + media + + :param context: (Optional) This field is used internally by Llama Stack to + pass RAG context. This field may be removed in the API in the future.' + ViolationLevel: + type: string + enum: + - info + - warn + - error + title: ViolationLevel + description: 'Severity level of a safety violation. + + + :cvar INFO: Informational level violation that does not require action + + :cvar WARN: Warning level violation that suggests caution but allows continuation + + :cvar ERROR: Error level violation that requires blocking or intervention' _URLOrData: properties: url: - anyOf: - - $ref: '#/components/schemas/URL' - - type: 'null' + $ref: '#/components/schemas/URL' data: - anyOf: - - type: string - - type: 'null' contentEncoding: base64 title: Data + type: string type: object title: _URLOrData description: 'A URL or a base64 encoded string @@ -2743,6 +3286,112 @@ components: Note that URL could have length limits. :param data: base64 encoded image data as string' + __main_____agents_agent_id_session_Request: + properties: + agent_id: + type: string + title: Agent Id + session_name: + type: string + title: Session Name + type: object + required: + - agent_id + - session_name + title: _agents_agent_id_session_Request + __main_____agents_agent_id_session_session_id_turn_Request: + properties: + agent_id: + type: string + title: Agent Id + session_id: + type: string + title: Session Id + messages: + $ref: '#/components/schemas/UserMessage-Input' + stream: + type: boolean + title: Stream + default: false + documents: + $ref: '#/components/schemas/Document' + toolgroups: + anyOf: + - type: string + - $ref: '#/components/schemas/AgentToolGroupWithArgs' + title: Toolgroups + tool_config: + $ref: '#/components/schemas/ToolConfig' + type: object + required: + - agent_id + - session_id + - messages + - documents + - toolgroups + - tool_config + title: _agents_agent_id_session_session_id_turn_Request + __main_____agents_agent_id_session_session_id_turn_turn_id_resume_Request: + properties: + agent_id: + type: string + title: Agent Id + session_id: + type: string + title: Session Id + turn_id: + type: string + title: Turn Id + tool_responses: + $ref: '#/components/schemas/ToolResponse-Input' + stream: + type: boolean + title: Stream + default: false + type: object + required: + - agent_id + - session_id + - turn_id + - tool_responses + title: _agents_agent_id_session_session_id_turn_turn_id_resume_Request + __main_____datasets_Request: + properties: + purpose: + $ref: '#/components/schemas/DatasetPurpose' + metadata: + type: string + title: Metadata + dataset_id: + type: string + title: Dataset Id + type: object + required: + - purpose + - metadata + - dataset_id + title: _datasets_Request + _inference_rerank_Request: + properties: + model: + type: string + title: Model + query: + type: string + title: Query + items: + type: string + title: Items + max_num_results: + type: integer + title: Max Num Results + type: object + required: + - model + - query + - items + - max_num_results + title: _inference_rerank_Request Error: description: 'Error response from the API. Roughly follows RFC 7807. @@ -2767,17 +3416,577 @@ components: title: Detail type: string instance: - anyOf: - - type: string - - type: 'null' - default: null title: Instance + type: string + nullable: true required: - status - title - detail title: Error type: object + Agent: + description: 'An agent instance with configuration and metadata. + + + :param agent_id: Unique identifier for the agent + + :param agent_config: Configuration settings for the agent + + :param created_at: Timestamp when the agent was created' + properties: + agent_id: + title: Agent Id + type: string + agent_config: + $ref: '#/components/schemas/AgentConfig' + created_at: + format: date-time + title: Created At + type: string + required: + - agent_id + - agent_config + - created_at + title: Agent + type: object + AgentStepResponse: + description: 'Response containing details of a specific agent step. + + + :param step: The complete step data and execution details' + properties: + step: + discriminator: + mapping: + inference: '#/$defs/InferenceStep' + memory_retrieval: '#/$defs/MemoryRetrievalStep' + shield_call: '#/$defs/ShieldCallStep' + tool_execution: '#/$defs/ToolExecutionStep' + propertyName: step_type + oneOf: + - $ref: '#/components/schemas/InferenceStep' + - $ref: '#/components/schemas/ToolExecutionStep' + - $ref: '#/components/schemas/ShieldCallStep' + - $ref: '#/components/schemas/MemoryRetrievalStep' + title: Step + required: + - step + title: AgentStepResponse + type: object + CompletionMessage: + description: "A message containing the model's (assistant) response in a chat\ + \ conversation.\n\n:param role: Must be \"assistant\" to identify this as\ + \ the model's response\n:param content: The content of the model's response\n\ + :param stop_reason: Reason why the model stopped generating. Options are:\n\ + \ - `StopReason.end_of_turn`: The model finished generating the entire\ + \ response.\n - `StopReason.end_of_message`: The model finished generating\ + \ but generated a partial response -- usually, a tool call. The user may call\ + \ the tool and continue the conversation with the tool's response.\n -\ + \ `StopReason.out_of_tokens`: The model ran out of token budget.\n:param tool_calls:\ + \ List of tool calls. Each tool call is a ToolCall object." + properties: + role: + const: assistant + default: assistant + title: Role + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/$defs/ImageContentItem' + text: '#/$defs/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/$defs/ImageContentItem' + text: '#/$defs/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + stop_reason: + $ref: '#/components/schemas/StopReason' + tool_calls: + title: Tool Calls + items: + $ref: '#/components/schemas/ToolCall' + type: array + required: + - content + - stop_reason + title: CompletionMessage + type: object + InferenceStep: + description: 'An inference step in an agent turn. + + + :param model_response: The response from the LLM.' + properties: + turn_id: + title: Turn Id + type: string + step_id: + title: Step Id + type: string + started_at: + title: Started At + format: date-time + type: string + nullable: true + completed_at: + title: Completed At + format: date-time + type: string + nullable: true + step_type: + const: inference + default: inference + title: Step Type + type: string + model_response: + $ref: '#/components/schemas/CompletionMessage' + required: + - turn_id + - step_id + - model_response + title: InferenceStep + type: object + MemoryRetrievalStep: + description: 'A memory retrieval step in an agent turn. + + + :param vector_store_ids: The IDs of the vector databases to retrieve context + from. + + :param inserted_context: The context retrieved from the vector databases.' + properties: + turn_id: + title: Turn Id + type: string + step_id: + title: Step Id + type: string + started_at: + title: Started At + format: date-time + type: string + nullable: true + completed_at: + title: Completed At + format: date-time + type: string + nullable: true + step_type: + const: memory_retrieval + default: memory_retrieval + title: Step Type + type: string + vector_store_ids: + title: Vector Store Ids + type: string + inserted_context: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/$defs/ImageContentItem' + text: '#/$defs/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/$defs/ImageContentItem' + text: '#/$defs/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Inserted Context + required: + - turn_id + - step_id + - vector_store_ids + - inserted_context + title: MemoryRetrievalStep + type: object + PaginatedResponse: + description: 'A generic paginated response that follows a simple format. + + + :param data: The list of items for the current page + + :param has_more: Whether there are more items available after this set + + :param url: The URL for accessing this list' + properties: + data: + items: + additionalProperties: true + type: object + title: Data + type: array + has_more: + title: Has More + type: boolean + url: + title: Url + type: string + nullable: true + required: + - data + - has_more + title: PaginatedResponse + type: object + Session: + description: 'A single session of an interaction with an Agentic System. + + + :param session_id: Unique identifier for the conversation session + + :param session_name: Human-readable name for the session + + :param turns: List of all turns that have occurred in this session + + :param started_at: Timestamp when the session was created' + properties: + session_id: + title: Session Id + type: string + session_name: + title: Session Name + type: string + turns: + items: + $ref: '#/components/schemas/Turn' + title: Turns + type: array + started_at: + format: date-time + title: Started At + type: string + required: + - session_id + - session_name + - turns + - started_at + title: Session + type: object + ShieldCallStep: + description: 'A shield call step in an agent turn. + + + :param violation: The violation from the shield call.' + properties: + turn_id: + title: Turn Id + type: string + step_id: + title: Step Id + type: string + started_at: + title: Started At + format: date-time + type: string + nullable: true + completed_at: + title: Completed At + format: date-time + type: string + nullable: true + step_type: + const: shield_call + default: shield_call + title: Step Type + type: string + violation: + $ref: '#/components/schemas/SafetyViolation' + required: + - turn_id + - step_id + - violation + title: ShieldCallStep + type: object + ToolExecutionStep: + description: 'A tool execution step in an agent turn. + + + :param tool_calls: The tool calls to execute. + + :param tool_responses: The tool responses from the tool calls.' + properties: + turn_id: + title: Turn Id + type: string + step_id: + title: Step Id + type: string + started_at: + title: Started At + format: date-time + type: string + nullable: true + completed_at: + title: Completed At + format: date-time + type: string + nullable: true + step_type: + const: tool_execution + default: tool_execution + title: Step Type + type: string + tool_calls: + items: + $ref: '#/components/schemas/ToolCall' + title: Tool Calls + type: array + tool_responses: + items: + $ref: '#/components/schemas/ToolResponse' + title: Tool Responses + type: array + required: + - turn_id + - step_id + - tool_calls + - tool_responses + title: ToolExecutionStep + type: object + ToolResponse: + description: 'Response from a tool invocation. + + + :param call_id: Unique identifier for the tool call this response is for + + :param tool_name: Name of the tool that was invoked + + :param content: The response content from the tool + + :param metadata: (Optional) Additional metadata about the tool response' + properties: + call_id: + title: Call Id + type: string + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/$defs/ImageContentItem' + text: '#/$defs/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/$defs/ImageContentItem' + text: '#/$defs/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + metadata: + title: Metadata + additionalProperties: true + type: object + nullable: true + required: + - call_id + - tool_name + - content + title: ToolResponse + type: object + Checkpoint: + description: 'Checkpoint created during training runs. + + + :param identifier: Unique identifier for the checkpoint + + :param created_at: Timestamp when the checkpoint was created + + :param epoch: Training epoch when the checkpoint was saved + + :param post_training_job_id: Identifier of the training job that created this + checkpoint + + :param path: File system path where the checkpoint is stored + + :param training_metrics: (Optional) Training metrics associated with this + checkpoint' + properties: + identifier: + title: Identifier + type: string + created_at: + format: date-time + title: Created At + type: string + epoch: + title: Epoch + type: integer + post_training_job_id: + title: Post Training Job Id + type: string + path: + title: Path + type: string + training_metrics: + $ref: '#/components/schemas/PostTrainingMetric' + nullable: true + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint + type: object + PostTrainingJobArtifactsResponse: + description: 'Artifacts of a finetuning job. + + + :param job_uuid: Unique identifier for the training job + + :param checkpoints: List of model checkpoints created during training' + properties: + job_uuid: + title: Job Uuid + type: string + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array + required: + - job_uuid + title: PostTrainingJobArtifactsResponse + type: object + PostTrainingJobStatusResponse: + description: 'Status of a finetuning job. + + + :param job_uuid: Unique identifier for the training job + + :param status: Current status of the training job + + :param scheduled_at: (Optional) Timestamp when the job was scheduled + + :param started_at: (Optional) Timestamp when the job execution began + + :param completed_at: (Optional) Timestamp when the job finished, if completed + + :param resources_allocated: (Optional) Information about computational resources + allocated to the job + + :param checkpoints: List of model checkpoints created during training' + properties: + job_uuid: + title: Job Uuid + type: string + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + title: Scheduled At + format: date-time + type: string + nullable: true + started_at: + title: Started At + format: date-time + type: string + nullable: true + completed_at: + title: Completed At + format: date-time + type: string + nullable: true + resources_allocated: + title: Resources Allocated + additionalProperties: true + type: object + nullable: true + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array + required: + - job_uuid + - status + title: PostTrainingJobStatusResponse + type: object + ImageContentItem: + description: 'A image content item + + + :param type: Discriminator type of the content item. Always "image" + + :param image: Image as a base64 encoded string or an URL' + properties: + type: + const: image + default: image + title: Type + type: string + image: + $ref: '#/components/schemas/_URLOrData' + required: + - image + title: ImageContentItem + type: object + PostTrainingMetric: + description: 'Training metrics captured during post-training jobs. + + + :param epoch: Training epoch number + + :param train_loss: Loss value on the training dataset + + :param validation_loss: Loss value on the validation dataset + + :param perplexity: Perplexity metric indicating model confidence' + properties: + epoch: + title: Epoch + type: integer + train_loss: + title: Train Loss + type: number + validation_loss: + title: Validation Loss + type: number + perplexity: + title: Perplexity + type: number + required: + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric + type: object responses: BadRequest400: description: The request was invalid or malformed diff --git a/docs/static/llama-stack-spec.yaml b/docs/static/llama-stack-spec.yaml index 16e00b829..dd2fe12cf 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -19,7 +19,7 @@ paths: parameters: - name: after in: query - required: false + required: true schema: type: string title: After @@ -53,39 +53,14 @@ paths: tags: - V1 summary: Create Batch - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: create_batch_v1_batches_post - parameters: - - name: input_file_id - in: query - required: false - schema: - type: string - title: Input File Id - - name: endpoint - in: query - required: false - schema: - type: string - title: Endpoint - - name: completion_window - in: query - required: false - schema: - type: string - title: Completion Window - - name: metadata - in: query - required: false - schema: - type: string - title: Metadata - - name: idempotency_key - in: query - required: false - schema: - type: string - title: Idempotency Key + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_batches_Request' responses: '200': description: The created batch object. @@ -143,15 +118,14 @@ paths: tags: - V1 summary: Cancel Batch - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: cancel_batch_v1_batches__batch_id__cancel_post - parameters: - - name: batch_id - in: path + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_batches_batch_id_cancel_Request' required: true - schema: - type: string - title: Batch Id responses: '200': description: The updated batch object. @@ -160,17 +134,24 @@ paths: schema: $ref: '#/components/schemas/Batch' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: batch_id + in: path + required: true + schema: + type: string + description: 'Path parameter: batch_id' /v1/chat/completions: get: tags: @@ -181,10 +162,16 @@ paths: parameters: - name: after in: query - required: false + required: true schema: type: string title: After + - name: model + in: query + required: true + schema: + type: string + title: Model - name: limit in: query required: false @@ -192,12 +179,6 @@ paths: type: integer default: 20 title: Limit - - name: model - in: query - required: false - schema: - type: string - title: Model - name: order in: query required: false @@ -324,42 +305,14 @@ paths: tags: - V1 summary: Create Conversation - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: create_conversation_v1_conversations_post - parameters: - - name: metadata - in: query - required: false - schema: - type: string - title: Metadata requestBody: content: application/json: schema: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - discriminator: - propertyName: type - mapping: - message: '#/components/schemas/OpenAIResponseMessage' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - function_call_output: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - mcp_approval_response: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: Items + $ref: '#/components/schemas/_conversations_Request' + required: true responses: '200': description: The created conversation object. @@ -368,17 +321,17 @@ paths: schema: $ref: '#/components/schemas/Conversation' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' /v1/conversations/{conversation_id}: delete: tags: @@ -448,21 +401,14 @@ paths: tags: - V1 summary: Update Conversation - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: update_conversation_v1_conversations__conversation_id__post - parameters: - - name: conversation_id - in: path + requestBody: required: true - schema: - type: string - title: Conversation Id - - name: metadata - in: query - required: false - schema: - type: string - title: Metadata + content: + application/json: + schema: + $ref: '#/components/schemas/_conversations_conversation_id_Request' responses: '200': description: The updated conversation object. @@ -482,6 +428,13 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' /v1/conversations/{conversation_id}/items: get: tags: @@ -498,24 +451,24 @@ paths: title: Conversation Id - name: after in: query - required: false + required: true schema: type: string title: After - name: include in: query - required: false + required: true schema: $ref: '#/components/schemas/ConversationItemInclude' - name: limit in: query - required: false + required: true schema: type: integer title: Limit - name: order in: query - required: false + required: true schema: type: string title: Order @@ -542,30 +495,14 @@ paths: tags: - V1 summary: Add Items - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: add_items_v1_conversations__conversation_id__items_post - parameters: - - name: conversation_id - in: path - required: true - schema: - type: string - title: Conversation Id requestBody: + required: true content: application/json: schema: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - title: Items + $ref: '#/components/schemas/_conversations_conversation_id_items_Request' responses: '200': description: List of created items. @@ -585,6 +522,13 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' /v1/conversations/{conversation_id}/items/{item_id}: delete: tags: @@ -628,25 +572,28 @@ paths: tags: - V1 summary: Retrieve - description: Generic endpoint - this would be replaced with actual implementation. + description: Query endpoint for proper schema generation. operationId: retrieve_v1_conversations__conversation_id__items__item_id__get parameters: - - name: args - in: query + - name: conversation_id + in: path required: true schema: - title: Args - - name: kwargs - in: query + type: string + title: Conversation Id + - name: item_id + in: path required: true schema: - title: Kwargs + type: string + title: Item Id responses: '200': description: The conversation item. content: application/json: - schema: {} + schema: + $ref: '#/components/schemas/OpenAIResponseMessage' '400': $ref: '#/components/responses/BadRequest400' description: Bad Request @@ -701,10 +648,15 @@ paths: parameters: - name: after in: query - required: false + required: true schema: type: string title: After + - name: purpose + in: query + required: true + schema: + $ref: '#/components/schemas/OpenAIFilePurpose' - name: limit in: query required: false @@ -718,11 +670,6 @@ paths: schema: $ref: '#/components/schemas/Order' default: desc - - name: purpose - in: query - required: false - schema: - $ref: '#/components/schemas/OpenAIFilePurpose' responses: '200': description: An ListOpenAIFileResponse containing the list of files. @@ -850,6 +797,12 @@ paths: required: true schema: title: Kwargs + - name: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' responses: '200': description: The raw file content as a binary response. @@ -959,14 +912,14 @@ paths: schema: $ref: '#/components/schemas/OpenAIListModelsResponse' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: $ref: '#/components/responses/DefaultError' tags: @@ -979,38 +932,14 @@ paths: tags: - V1 summary: Register Model - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: register_model_v1_models_post - parameters: - - name: model_id - in: query - required: false - schema: - type: string - title: Model Id - - name: provider_model_id - in: query - required: false - schema: - type: string - title: Provider Model Id - - name: provider_id - in: query - required: false - schema: - type: string - title: Provider Id - - name: metadata - in: query - required: false - schema: - type: string - title: Metadata - - name: model_type - in: query - required: false - schema: - $ref: '#/components/schemas/ModelType' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_models_Request' + required: true responses: '200': description: A Model. @@ -1019,17 +948,17 @@ paths: schema: $ref: '#/components/schemas/Model' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' /v1/models/{model_id}: delete: tags: @@ -1048,6 +977,12 @@ paths: required: true schema: title: Kwargs + - name: model_id + in: path + required: true + schema: + type: string + description: 'Path parameter: model_id' responses: '200': description: Successful Response @@ -1103,21 +1038,14 @@ paths: tags: - V1 summary: Run Moderation - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: run_moderation_v1_moderations_post - parameters: - - name: input - in: query - required: false - schema: - type: string - title: Input - - name: model - in: query - required: false - schema: - type: string - title: Model + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_moderations_Request' + required: true responses: '200': description: A moderation object. @@ -1126,17 +1054,17 @@ paths: schema: $ref: '#/components/schemas/ModerationObject' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' /v1/prompts: get: tags: @@ -1152,36 +1080,29 @@ paths: schema: $ref: '#/components/schemas/ListPromptsResponse' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' post: tags: - V1 summary: Create Prompt - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: create_prompt_v1_prompts_post - parameters: - - name: prompt - in: query - required: false - schema: - type: string - title: Prompt - - name: variables - in: query - required: false - schema: - type: string - title: Variables + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_prompts_Request' + required: true responses: '200': description: The created Prompt resource. @@ -1190,17 +1111,17 @@ paths: schema: $ref: '#/components/schemas/Prompt' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' /v1/prompts/{prompt_id}: delete: tags: @@ -1219,6 +1140,13 @@ paths: required: true schema: title: Kwargs + - &id001 + name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' responses: '200': description: Successful Response @@ -1252,7 +1180,7 @@ paths: title: Prompt Id - name: version in: query - required: false + required: true schema: type: integer title: Version @@ -1279,40 +1207,14 @@ paths: tags: - V1 summary: Update Prompt - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: update_prompt_v1_prompts__prompt_id__post - parameters: - - name: prompt_id - in: path + requestBody: required: true - schema: - type: string - title: Prompt Id - - name: prompt - in: query - required: false - schema: - type: string - title: Prompt - - name: version - in: query - required: false - schema: - type: integer - title: Version - - name: variables - in: query - required: false - schema: - type: string - title: Variables - - name: set_as_default - in: query - required: false - schema: - type: boolean - default: true - title: Set As Default + content: + application/json: + schema: + $ref: '#/components/schemas/_prompts_prompt_id_Request' responses: '200': description: The updated Prompt resource with incremented version. @@ -1332,26 +1234,21 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + parameters: + - *id001 /v1/prompts/{prompt_id}/set-default-version: post: tags: - V1 summary: Set Default Version - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: set_default_version_v1_prompts__prompt_id__set_default_version_post - parameters: - - name: prompt_id - in: path + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_prompts_prompt_id_set_default_version_Request' required: true - schema: - type: string - title: Prompt Id - - name: version - in: query - required: false - schema: - type: integer - title: Version responses: '200': description: The prompt with the specified version now set as default. @@ -1360,17 +1257,24 @@ paths: schema: $ref: '#/components/schemas/Prompt' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' /v1/prompts/{prompt_id}/versions: get: tags: @@ -1473,10 +1377,16 @@ paths: parameters: - name: after in: query - required: false + required: true schema: type: string title: After + - name: model + in: query + required: true + schema: + type: string + title: Model - name: limit in: query required: false @@ -1484,12 +1394,6 @@ paths: type: integer default: 50 title: Limit - - name: model - in: query - required: false - schema: - type: string - title: Model - name: order in: query required: false @@ -1519,77 +1423,14 @@ paths: tags: - V1 summary: Create Openai Response - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: create_openai_response_v1_responses_post - parameters: - - name: input - in: query - required: false - schema: - type: string - title: Input - - name: model - in: query - required: false - schema: - type: string - title: Model - - name: instructions - in: query - required: false - schema: - type: string - title: Instructions - - name: previous_response_id - in: query - required: false - schema: - type: string - title: Previous Response Id - - name: conversation - in: query - required: false - schema: - type: string - title: Conversation - - name: store - in: query - required: false - schema: - type: boolean - default: true - title: Store - - name: stream - in: query - required: false - schema: - type: boolean - default: false - title: Stream - - name: temperature - in: query - required: false - schema: - type: number - title: Temperature - - name: include - in: query - required: false - schema: - type: string - title: Include - - name: max_infer_iters - in: query - required: false - schema: - type: integer - default: 10 - title: Max Infer Iters requestBody: + required: true content: application/json: schema: - $ref: '#/components/schemas/Body_create_openai_response_v1_responses_post' + $ref: '#/components/schemas/_responses_Request' responses: '200': description: An OpenAIResponseObject. @@ -1690,19 +1531,19 @@ paths: title: Response Id - name: after in: query - required: false + required: true schema: type: string title: After - name: before in: query - required: false + required: true schema: type: string title: Before - name: include in: query - required: false + required: true schema: type: string title: Include @@ -1743,32 +1584,14 @@ paths: tags: - V1 summary: Run Shield - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: run_shield_v1_safety_run_shield_post - parameters: - - name: shield_id - in: query - required: false - schema: - type: string - title: Shield Id - - name: params - in: query - required: false - schema: - type: string - title: Params requestBody: content: application/json: schema: - anyOf: - - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' - - $ref: '#/components/schemas/OpenAISystemMessageParam' - - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' - - $ref: '#/components/schemas/OpenAIToolMessageParam' - - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' - title: Messages + $ref: '#/components/schemas/_safety_run_shield_Request' + required: true responses: '200': description: A RunShieldResponse. @@ -1777,17 +1600,17 @@ paths: schema: $ref: '#/components/schemas/RunShieldResponse' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' /v1/scoring-functions: get: tags: @@ -1867,6 +1690,12 @@ paths: required: true schema: title: Kwargs + - name: scoring_fn_id + in: path + required: true + schema: + type: string + description: 'Path parameter: scoring_fn_id' responses: '200': description: Successful Response @@ -1922,21 +1751,14 @@ paths: tags: - V1 summary: Score - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: score_v1_scoring_score_post - parameters: - - name: input_rows - in: query - required: false - schema: - type: string - title: Input Rows - - name: scoring_functions - in: query - required: false - schema: - type: string - title: Scoring Functions + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_scoring_score_Request' + required: true responses: '200': description: A ScoreResponse object containing rows and aggregated results. @@ -1945,44 +1767,30 @@ paths: schema: $ref: '#/components/schemas/ScoreResponse' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' /v1/scoring/score-batch: post: tags: - V1 summary: Score Batch - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: score_batch_v1_scoring_score_batch_post - parameters: - - name: dataset_id - in: query - required: false - schema: - type: string - title: Dataset Id - - name: scoring_functions - in: query - required: false - schema: - type: string - title: Scoring Functions - - name: save_results_dataset - in: query - required: false - schema: - type: boolean - default: false - title: Save Results Dataset + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_scoring_score_batch_Request' + required: true responses: '200': description: A ScoreBatchResponse. @@ -1991,17 +1799,17 @@ paths: schema: $ref: '#/components/schemas/ScoreBatchResponse' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' /v1/shields: get: tags: @@ -2017,48 +1825,29 @@ paths: schema: $ref: '#/components/schemas/ListShieldsResponse' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' post: tags: - V1 summary: Register Shield - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: register_shield_v1_shields_post - parameters: - - name: shield_id - in: query - required: false - schema: - type: string - title: Shield Id - - name: provider_shield_id - in: query - required: false - schema: - type: string - title: Provider Shield Id - - name: provider_id - in: query - required: false - schema: - type: string - title: Provider Id - - name: params - in: query - required: false - schema: - type: string - title: Params + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_shields_Request' + required: true responses: '200': description: A Shield. @@ -2067,17 +1856,17 @@ paths: schema: $ref: '#/components/schemas/Shield' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' /v1/shields/{identifier}: delete: tags: @@ -2096,6 +1885,12 @@ paths: required: true schema: title: Kwargs + - name: identifier + in: path + required: true + schema: + type: string + description: 'Path parameter: identifier' responses: '200': description: Successful Response @@ -2189,21 +1984,14 @@ paths: tags: - V1 summary: Invoke Tool - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: invoke_tool_v1_tool_runtime_invoke_post - parameters: - - name: tool_name - in: query - required: false - schema: - type: string - title: Tool Name - - name: kwargs - in: query - required: false - schema: - type: string - title: Kwargs + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_tool_runtime_invoke_Request' + required: true responses: '200': description: A ToolInvocationResult. @@ -2212,17 +2000,17 @@ paths: schema: $ref: '#/components/schemas/ToolInvocationResult' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' /v1/tool-runtime/list-tools: get: tags: @@ -2233,11 +2021,12 @@ paths: parameters: - name: tool_group_id in: query - required: false + required: true schema: type: string title: Tool Group Id requestBody: + required: true content: application/json: schema: @@ -2302,26 +2091,14 @@ paths: tags: - V1 summary: Rag Tool.Query - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: rag_tool_query_v1_tool_runtime_rag_tool_query_post - parameters: - - name: content - in: query - required: false - schema: - type: string - title: Content - - name: vector_store_ids - in: query - required: false - schema: - type: string - title: Vector Store Ids requestBody: content: application/json: schema: - $ref: '#/components/schemas/RAGQueryConfig' + $ref: '#/components/schemas/_tool_runtime_rag_tool_query_Request' + required: true responses: '200': description: RAGQueryResult containing the retrieved content and metadata @@ -2330,17 +2107,17 @@ paths: schema: $ref: '#/components/schemas/RAGQueryResult' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' /v1/toolgroups: get: tags: @@ -2420,6 +2197,12 @@ paths: required: true schema: title: Kwargs + - name: toolgroup_id + in: path + required: true + schema: + type: string + description: 'Path parameter: toolgroup_id' responses: '200': description: Successful Response @@ -2480,7 +2263,7 @@ paths: parameters: - name: toolgroup_id in: query - required: false + required: true schema: type: string title: Toolgroup Id @@ -2577,27 +2360,14 @@ paths: tags: - V1 summary: Query Chunks - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: query_chunks_v1_vector_io_query_post - parameters: - - name: vector_store_id - in: query - required: false - schema: - type: string - title: Vector Store Id - - name: query - in: query - required: false - schema: - type: string - title: Query - - name: params - in: query - required: false - schema: - type: string - title: Params + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_vector_io_query_Request' + required: true responses: '200': description: A QueryChunksResponse. @@ -2606,17 +2376,17 @@ paths: schema: $ref: '#/components/schemas/QueryChunksResponse' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' /v1/vector_stores: get: tags: @@ -2625,6 +2395,18 @@ paths: description: Query endpoint for proper schema generation. operationId: openai_list_vector_stores_v1_vector_stores_get parameters: + - name: after + in: query + required: true + schema: + type: string + title: After + - name: before + in: query + required: true + schema: + type: string + title: Before - name: limit in: query required: false @@ -2639,18 +2421,6 @@ paths: type: string default: desc title: Order - - name: after - in: query - required: false - schema: - type: string - title: After - - name: before - in: query - required: false - schema: - type: string - title: Before responses: '200': description: A VectorStoreListResponse containing the list of vector stores. @@ -2770,33 +2540,14 @@ paths: tags: - V1 summary: Openai Update Vector Store - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post - parameters: - - name: vector_store_id - in: path + requestBody: required: true - schema: - type: string - title: Vector Store Id - - name: name - in: query - required: false - schema: - type: string - title: Name - - name: expires_after - in: query - required: false - schema: - type: string - title: Expires After - - name: metadata - in: query - required: false - schema: - type: string - title: Metadata + content: + application/json: + schema: + $ref: '#/components/schemas/_vector_stores_vector_store_id_Request' responses: '200': description: A VectorStoreObject representing the updated vector store. @@ -2816,6 +2567,13 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' /v1/vector_stores/{vector_store_id}/file_batches: post: tags: @@ -2849,6 +2607,13 @@ paths: default: description: Default Response $ref: '#/components/responses/DefaultError' + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: get: tags: @@ -2893,21 +2658,14 @@ paths: tags: - V1 summary: Openai Cancel Vector Store File Batch - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post - parameters: - - name: batch_id - in: path + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_vector_stores_vector_store_id_file_batches_batch_id_cancel_Request' required: true - schema: - type: string - title: Batch Id - - name: vector_store_id - in: path - required: true - schema: - type: string - title: Vector Store Id responses: '200': description: A VectorStoreFileBatchObject representing the cancelled file @@ -2917,17 +2675,30 @@ paths: schema: $ref: '#/components/schemas/VectorStoreFileBatchObject' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + - name: batch_id + in: path + required: true + schema: + type: string + description: 'Path parameter: batch_id' /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files: get: tags: @@ -2950,19 +2721,19 @@ paths: title: Vector Store Id - name: after in: query - required: false + required: true schema: type: string title: After - name: before in: query - required: false + required: true schema: type: string title: Before - name: filter in: query - required: false + required: true schema: type: string title: Filter @@ -3014,6 +2785,24 @@ paths: schema: type: string title: Vector Store Id + - name: after + in: query + required: true + schema: + type: string + title: After + - name: before + in: query + required: true + schema: + type: string + title: Before + - name: filter + in: query + required: true + schema: + type: string + title: Filter - name: limit in: query required: false @@ -3028,24 +2817,6 @@ paths: type: string default: desc title: Order - - name: after - in: query - required: false - schema: - type: string - title: After - - name: before - in: query - required: false - schema: - type: string - title: Before - - name: filter - in: query - required: false - schema: - type: string - title: Filter responses: '200': description: A VectorStoreListFilesResponse containing the list of files. @@ -3069,35 +2840,14 @@ paths: tags: - V1 summary: Openai Attach File To Vector Store - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: openai_attach_file_to_vector_store_v1_vector_stores__vector_store_id__files_post - parameters: - - name: vector_store_id - in: path - required: true - schema: - type: string - title: Vector Store Id - - name: file_id - in: query - required: false - schema: - type: string - title: File Id - - name: attributes - in: query - required: false - schema: - type: string - title: Attributes requestBody: + required: true content: application/json: schema: - anyOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - title: Chunking Strategy + $ref: '#/components/schemas/_vector_stores_vector_store_id_files_Request' responses: '200': description: A VectorStoreFileObject representing the attached file. @@ -3117,6 +2867,13 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' /v1/vector_stores/{vector_store_id}/files/{file_id}: delete: tags: @@ -3125,18 +2882,18 @@ paths: description: Query endpoint for proper schema generation. operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete parameters: - - name: vector_store_id - in: path - required: true - schema: - type: string - title: Vector Store Id - name: file_id in: path required: true schema: type: string title: File Id + - name: vector_store_id + in: path + required: true + schema: + type: string + title: Vector Store Id responses: '200': description: A VectorStoreFileDeleteResponse indicating the deletion status. @@ -3163,18 +2920,18 @@ paths: description: Query endpoint for proper schema generation. operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get parameters: - - name: vector_store_id - in: path - required: true - schema: - type: string - title: Vector Store Id - name: file_id in: path required: true schema: type: string title: File Id + - name: vector_store_id + in: path + required: true + schema: + type: string + title: Vector Store Id responses: '200': description: A VectorStoreFileObject representing the file. @@ -3198,27 +2955,14 @@ paths: tags: - V1 summary: Openai Update Vector Store File - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post - parameters: - - name: vector_store_id - in: path + requestBody: required: true - schema: - type: string - title: Vector Store Id - - name: file_id - in: path - required: true - schema: - type: string - title: File Id - - name: attributes - in: query - required: false - schema: - type: string - title: Attributes + content: + application/json: + schema: + $ref: '#/components/schemas/_vector_stores_vector_store_id_files_file_id_Request' responses: '200': description: A VectorStoreFileObject representing the updated file. @@ -3238,6 +2982,19 @@ paths: default: $ref: '#/components/responses/DefaultError' description: Default Response + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + - name: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' /v1/vector_stores/{vector_store_id}/files/{file_id}/content: get: tags: @@ -3246,18 +3003,18 @@ paths: description: Query endpoint for proper schema generation. operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get parameters: - - name: vector_store_id - in: path - required: true - schema: - type: string - title: Vector Store Id - name: file_id in: path required: true schema: type: string title: File Id + - name: vector_store_id + in: path + required: true + schema: + type: string + title: Vector Store Id responses: '200': description: A list of InterleavedContent representing the file contents. @@ -3282,53 +3039,14 @@ paths: tags: - V1 summary: Openai Search Vector Store - description: Query endpoint for proper schema generation. + description: Typed endpoint for proper schema generation. operationId: openai_search_vector_store_v1_vector_stores__vector_store_id__search_post - parameters: - - name: vector_store_id - in: path - required: true - schema: - type: string - title: Vector Store Id - - name: query - in: query - required: false - schema: - type: string - title: Query - - name: filters - in: query - required: false - schema: - type: string - title: Filters - - name: max_num_results - in: query - required: false - schema: - type: integer - default: 10 - title: Max Num Results - - name: rewrite_query - in: query - required: false - schema: - type: boolean - default: false - title: Rewrite Query - - name: search_mode - in: query - required: false - schema: - type: string - default: vector - title: Search Mode requestBody: content: application/json: schema: - $ref: '#/components/schemas/SearchRankingOptions' + $ref: '#/components/schemas/_vector_stores_vector_store_id_search_Request' + required: true responses: '200': description: A VectorStoreSearchResponse containing the search results. @@ -3337,17 +3055,24 @@ paths: schema: $ref: '#/components/schemas/VectorStoreSearchResponsePage' '400': - $ref: '#/components/responses/BadRequest400' description: Bad Request + $ref: '#/components/responses/BadRequest400' '429': - $ref: '#/components/responses/TooManyRequests429' description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: '#/components/responses/InternalServerError500' description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: - $ref: '#/components/responses/DefaultError' description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' /v1/version: get: tags: @@ -8462,12 +8187,10 @@ components: AllowedToolsFilter: properties: tool_names: - anyOf: - - items: - type: string - type: array - - type: 'null' title: Tool Names + items: + type: string + type: array type: object title: AllowedToolsFilter description: 'Filter configuration for restricting which MCP tools can be used. @@ -8477,19 +8200,15 @@ components: ApprovalFilter: properties: always: - anyOf: - - items: - type: string - type: array - - type: 'null' title: Always + items: + type: string + type: array never: - anyOf: - - items: - type: string - type: array - - type: 'null' title: Never + items: + type: string + type: array type: object title: ApprovalFilter description: 'Filter configuration for MCP tool approval requirements. @@ -8532,21 +8251,153 @@ components: :param aggregation_functions: Aggregation functions to apply to the scores of each row' - Body_create_openai_response_v1_responses_post: + Batch: properties: - prompt: - $ref: '#/components/schemas/OpenAIResponsePrompt' - text: - $ref: '#/components/schemas/OpenAIResponseText' - tools: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - title: Tools + id: + type: string + title: Id + completion_window: + type: string + title: Completion Window + created_at: + type: integer + title: Created At + endpoint: + type: string + title: Endpoint + input_file_id: + type: string + title: Input File Id + object: + type: string + const: batch + title: Object + status: + type: string + enum: + - validating + - failed + - in_progress + - finalizing + - completed + - expired + - cancelling + - cancelled + title: Status + cancelled_at: + title: Cancelled At + type: integer + cancelling_at: + title: Cancelling At + type: integer + completed_at: + title: Completed At + type: integer + error_file_id: + title: Error File Id + type: string + errors: + $ref: '#/components/schemas/Errors' + expired_at: + title: Expired At + type: integer + expires_at: + title: Expires At + type: integer + failed_at: + title: Failed At + type: integer + finalizing_at: + title: Finalizing At + type: integer + in_progress_at: + title: In Progress At + type: integer + metadata: + title: Metadata + additionalProperties: + type: string + type: object + model: + title: Model + type: string + output_file_id: + title: Output File Id + type: string + request_counts: + $ref: '#/components/schemas/BatchRequestCounts' + usage: + $ref: '#/components/schemas/BatchUsage' + additionalProperties: true type: object - title: Body_create_openai_response_v1_responses_post + required: + - id + - completion_window + - created_at + - endpoint + - input_file_id + - object + - status + title: Batch + BatchError: + properties: + code: + title: Code + type: string + line: + title: Line + type: integer + message: + title: Message + type: string + param: + title: Param + type: string + additionalProperties: true + type: object + title: BatchError + BatchRequestCounts: + properties: + completed: + type: integer + title: Completed + failed: + type: integer + title: Failed + total: + type: integer + title: Total + additionalProperties: true + type: object + required: + - completed + - failed + - total + title: BatchRequestCounts + BatchUsage: + properties: + input_tokens: + type: integer + title: Input Tokens + input_tokens_details: + $ref: '#/components/schemas/InputTokensDetails' + output_tokens: + type: integer + title: Output Tokens + output_tokens_details: + $ref: '#/components/schemas/OutputTokensDetails' + total_tokens: + type: integer + title: Total Tokens + additionalProperties: true + type: object + required: + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens + title: BatchUsage BooleanType: properties: type: @@ -8573,6 +8424,114 @@ components: :param type: Discriminator type. Always "chat_completion_input"' + Chunk-Output: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + chunk_id: + type: string + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: + title: Embedding + items: + type: number + type: array + chunk_metadata: + $ref: '#/components/schemas/ChunkMetadata' + type: object + required: + - content + - chunk_id + title: Chunk + description: "A chunk of content that can be inserted into a vector database.\n\ + :param content: The content of the chunk, which can be interleaved text, images,\ + \ or other types.\n:param chunk_id: Unique identifier for the chunk. Must\ + \ be provided explicitly.\n:param metadata: Metadata associated with the chunk\ + \ that will be used in the model context during inference.\n:param embedding:\ + \ Optional embedding for the chunk. If not provided, it will be computed later.\n\ + :param chunk_metadata: Metadata for the chunk that will NOT be used in the\ + \ context during inference.\n The `chunk_metadata` is required backend\ + \ functionality." + ChunkMetadata: + properties: + chunk_id: + title: Chunk Id + type: string + document_id: + title: Document Id + type: string + source: + title: Source + type: string + created_timestamp: + title: Created Timestamp + type: integer + updated_timestamp: + title: Updated Timestamp + type: integer + chunk_window: + title: Chunk Window + type: string + chunk_tokenizer: + title: Chunk Tokenizer + type: string + chunk_embedding_model: + title: Chunk Embedding Model + type: string + chunk_embedding_dimension: + title: Chunk Embedding Dimension + type: integer + content_token_count: + title: Content Token Count + type: integer + metadata_token_count: + title: Metadata Token Count + type: integer + type: object + title: ChunkMetadata + description: "`ChunkMetadata` is backend metadata for a `Chunk` that is used\ + \ to store additional information about the chunk that\n will not be used\ + \ in the context during inference, but is required for backend functionality.\ + \ The `ChunkMetadata`\n is set during chunk creation in `MemoryToolRuntimeImpl().insert()`and\ + \ is not expected to change after.\n Use `Chunk.metadata` for metadata\ + \ that will be used in the context during inference.\n:param chunk_id: The\ + \ ID of the chunk. If not set, it will be generated based on the document\ + \ ID and content.\n:param document_id: The ID of the document this chunk belongs\ + \ to.\n:param source: The source of the content, such as a URL, file path,\ + \ or other identifier.\n:param created_timestamp: An optional timestamp indicating\ + \ when the chunk was created.\n:param updated_timestamp: An optional timestamp\ + \ indicating when the chunk was last updated.\n:param chunk_window: The window\ + \ of the chunk, which can be used to group related chunks together.\n:param\ + \ chunk_tokenizer: The tokenizer used to create the chunk. Default is Tiktoken.\n\ + :param chunk_embedding_model: The embedding model used to create the chunk's\ + \ embedding.\n:param chunk_embedding_dimension: The dimension of the embedding\ + \ vector for the chunk.\n:param content_token_count: The number of tokens\ + \ in the content of the chunk.\n:param metadata_token_count: The number of\ + \ tokens in the metadata of the chunk." CompletionInputType: properties: type: @@ -8586,6 +8545,45 @@ components: :param type: Discriminator type. Always "completion_input"' + Conversation: + properties: + id: + type: string + title: Id + description: The unique ID of the conversation. + object: + type: string + const: conversation + title: Object + description: The object type, which is always conversation. + default: conversation + created_at: + type: integer + title: Created At + description: The time at which the conversation was created, measured in + seconds since the Unix epoch. + metadata: + title: Metadata + description: Set of 16 key-value pairs that can be attached to an object. + This can be useful for storing additional information about the object + in a structured format, and querying for objects via API or the dashboard. + additionalProperties: + type: string + type: object + items: + title: Items + description: Initial items to include in the conversation context. You may + add up to 20 items at a time. + items: + additionalProperties: true + type: object + type: array + type: object + required: + - id + - created_at + title: Conversation + description: OpenAI-compatible conversation object. ConversationItemInclude: type: string enum: @@ -9170,6 +9168,19 @@ components: :param type: Type of query generator, always ''default'' :param separator: String separator used to join query terms' + Errors: + properties: + data: + title: Data + items: + $ref: '#/components/schemas/BatchError' + type: array + object: + title: Object + type: string + additionalProperties: true + type: object + title: Errors HealthInfo: properties: status: @@ -9189,6 +9200,35 @@ components: - Error - Not Implemented title: HealthStatus + ImageContentItem-Output: + properties: + type: + type: string + const: image + title: Type + default: image + image: + $ref: '#/components/schemas/_URLOrData' + type: object + required: + - image + title: ImageContentItem + description: 'A image content item + + + :param type: Discriminator type of the content item. Always "image" + + :param image: Image as a base64 encoded string or an URL' + InputTokensDetails: + properties: + cached_tokens: + type: integer + title: Cached Tokens + additionalProperties: true + type: object + required: + - cached_tokens + title: InputTokensDetails JsonType: properties: type: @@ -9213,10 +9253,8 @@ components: type: string title: Judge Model prompt_template: - anyOf: - - type: string - - type: 'null' title: Prompt Template + type: string judge_score_regexes: items: type: string @@ -9371,10 +9409,8 @@ components: type: string title: Name description: - anyOf: - - type: string - - type: 'null' title: Description + type: string type: object required: - input_schema @@ -9395,11 +9431,9 @@ components: title: Identifier description: Unique identifier for this resource in llama stack provider_resource_id: - anyOf: - - type: string - - type: 'null' title: Provider Resource Id description: Unique identifier for this resource in the provider + type: string provider_id: type: string title: Provider Id @@ -9452,6 +9486,77 @@ components: :cvar rerank: Reranking model for reordering documents based on their relevance to a query' + ModerationObject: + properties: + id: + type: string + title: Id + model: + type: string + title: Model + results: + items: + $ref: '#/components/schemas/ModerationObjectResults' + type: array + title: Results + type: object + required: + - id + - model + - results + title: ModerationObject + description: 'A moderation object. + + :param id: The unique identifier for the moderation request. + + :param model: The model used to generate the moderation results. + + :param results: A list of moderation objects' + ModerationObjectResults: + properties: + flagged: + type: boolean + title: Flagged + categories: + title: Categories + additionalProperties: + type: boolean + type: object + category_applied_input_types: + title: Category Applied Input Types + additionalProperties: + items: + type: string + type: array + type: object + category_scores: + title: Category Scores + additionalProperties: + type: number + type: object + user_message: + title: User Message + type: string + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - flagged + title: ModerationObjectResults + description: 'A moderation object. + + :param flagged: Whether any of the below categories are flagged. + + :param categories: A list of the categories, and whether they are flagged + or not. + + :param category_applied_input_types: A list of the categories along with the + input type(s) that the score applies to. + + :param category_scores: A list of the categories along with their scores as + predicted by model.' NumberType: properties: type: @@ -9491,20 +9596,15 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array - - type: 'null' title: Content name: - anyOf: - - type: string - - type: 'null' title: Name + type: string tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array - - type: 'null' title: Tool Calls + items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array type: object title: OpenAIAssistantMessageParam description: 'A message containing the model''s (assistant) response in an OpenAI-compatible @@ -9532,20 +9632,15 @@ components: - items: $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' type: array - - type: 'null' title: Content name: - anyOf: - - type: string - - type: 'null' title: Name + type: string tool_calls: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIChatCompletionToolCall' - type: array - - type: 'null' title: Tool Calls + items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array type: object title: OpenAIAssistantMessageParam description: 'A message containing the model''s (assistant) response in an OpenAI-compatible @@ -9582,9 +9677,7 @@ components: type: string title: Model usage: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsage' - - type: 'null' + $ref: '#/components/schemas/OpenAIChatCompletionUsage' type: object required: - id @@ -9671,135 +9764,96 @@ components: minItems: 1 title: Messages frequency_penalty: - anyOf: - - type: number - - type: 'null' title: Frequency Penalty + type: number function_call: anyOf: - type: string - additionalProperties: true type: object - - type: 'null' title: Function Call functions: - anyOf: - - items: - additionalProperties: true - type: object - type: array - - type: 'null' title: Functions - logit_bias: - anyOf: - - additionalProperties: - type: number + items: + additionalProperties: true type: object - - type: 'null' + type: array + logit_bias: title: Logit Bias + additionalProperties: + type: number + type: object logprobs: - anyOf: - - type: boolean - - type: 'null' title: Logprobs + type: boolean max_completion_tokens: - anyOf: - - type: integer - - type: 'null' title: Max Completion Tokens + type: integer max_tokens: - anyOf: - - type: integer - - type: 'null' title: Max Tokens + type: integer n: - anyOf: - - type: integer - - type: 'null' title: N + type: integer parallel_tool_calls: - anyOf: - - type: boolean - - type: 'null' title: Parallel Tool Calls + type: boolean presence_penalty: - anyOf: - - type: number - - type: 'null' title: Presence Penalty + type: number response_format: - anyOf: - - oneOf: - - $ref: '#/components/schemas/OpenAIResponseFormatText' - - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' - - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' - discriminator: - propertyName: type - mapping: - json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' - json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' - text: '#/components/schemas/OpenAIResponseFormatText' - - type: 'null' title: Response Format + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + discriminator: + propertyName: type + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' seed: - anyOf: - - type: integer - - type: 'null' title: Seed + type: integer stop: anyOf: - type: string - items: type: string type: array - - type: 'null' title: Stop stream: - anyOf: - - type: boolean - - type: 'null' title: Stream + type: boolean stream_options: - anyOf: - - additionalProperties: true - type: object - - type: 'null' title: Stream Options + additionalProperties: true + type: object temperature: - anyOf: - - type: number - - type: 'null' title: Temperature + type: number tool_choice: anyOf: - type: string - additionalProperties: true type: object - - type: 'null' title: Tool Choice tools: - anyOf: - - items: - additionalProperties: true - type: object - type: array - - type: 'null' title: Tools + items: + additionalProperties: true + type: object + type: array top_logprobs: - anyOf: - - type: integer - - type: 'null' title: Top Logprobs + type: integer top_p: - anyOf: - - type: number - - type: 'null' title: Top P + type: number user: - anyOf: - - type: string - - type: 'null' title: User + type: string additionalProperties: true type: object required: @@ -9858,24 +9912,18 @@ components: OpenAIChatCompletionToolCall: properties: index: - anyOf: - - type: integer - - type: 'null' title: Index + type: integer id: - anyOf: - - type: string - - type: 'null' title: Id + type: string type: type: string const: function title: Type default: function function: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' - - type: 'null' + $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' type: object title: OpenAIChatCompletionToolCall description: 'Tool call specification for OpenAI-compatible chat completion @@ -9892,15 +9940,11 @@ components: OpenAIChatCompletionToolCallFunction: properties: name: - anyOf: - - type: string - - type: 'null' title: Name + type: string arguments: - anyOf: - - type: string - - type: 'null' title: Arguments + type: string type: object title: OpenAIChatCompletionToolCallFunction description: 'Function call details for OpenAI-compatible tool calls. @@ -9921,13 +9965,9 @@ components: type: integer title: Total Tokens prompt_tokens_details: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' - - type: 'null' + $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' completion_tokens_details: - anyOf: - - $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' - - type: 'null' + $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' type: object required: - prompt_tokens @@ -9949,10 +9989,8 @@ components: OpenAIChatCompletionUsageCompletionTokensDetails: properties: reasoning_tokens: - anyOf: - - type: integer - - type: 'null' title: Reasoning Tokens + type: integer type: object title: OpenAIChatCompletionUsageCompletionTokensDetails description: 'Token details for output tokens in OpenAI chat completion usage. @@ -9962,10 +10000,8 @@ components: OpenAIChatCompletionUsagePromptTokensDetails: properties: cached_tokens: - anyOf: - - type: integer - - type: 'null' title: Cached Tokens + type: integer type: object title: OpenAIChatCompletionUsagePromptTokensDetails description: 'Token details for prompt tokens in OpenAI chat completion usage. @@ -9997,9 +10033,7 @@ components: type: integer title: Index logprobs: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' - - type: 'null' + $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' type: object required: - message @@ -10019,19 +10053,15 @@ components: OpenAIChoiceLogprobs-Output: properties: content: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' title: Content + items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array refusal: - anyOf: - - items: - $ref: '#/components/schemas/OpenAITokenLogProb' - type: array - - type: 'null' title: Refusal + items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array type: object title: OpenAIChoiceLogprobs description: 'The log probabilities for the tokens in the message from an OpenAI-compatible @@ -10093,9 +10123,7 @@ components: type: integer title: Index logprobs: - anyOf: - - $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' - - type: 'null' + $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' type: object required: - finish_reason @@ -10133,91 +10161,60 @@ components: type: array title: Prompt best_of: - anyOf: - - type: integer - - type: 'null' title: Best Of + type: integer echo: - anyOf: - - type: boolean - - type: 'null' title: Echo + type: boolean frequency_penalty: - anyOf: - - type: number - - type: 'null' title: Frequency Penalty + type: number logit_bias: - anyOf: - - additionalProperties: - type: number - type: object - - type: 'null' title: Logit Bias + additionalProperties: + type: number + type: object logprobs: - anyOf: - - type: boolean - - type: 'null' title: Logprobs + type: boolean max_tokens: - anyOf: - - type: integer - - type: 'null' title: Max Tokens + type: integer n: - anyOf: - - type: integer - - type: 'null' title: N + type: integer presence_penalty: - anyOf: - - type: number - - type: 'null' title: Presence Penalty + type: number seed: - anyOf: - - type: integer - - type: 'null' title: Seed + type: integer stop: anyOf: - type: string - items: type: string type: array - - type: 'null' title: Stop stream: - anyOf: - - type: boolean - - type: 'null' title: Stream + type: boolean stream_options: - anyOf: - - additionalProperties: true - type: object - - type: 'null' title: Stream Options + additionalProperties: true + type: object temperature: - anyOf: - - type: number - - type: 'null' title: Temperature + type: number top_p: - anyOf: - - type: number - - type: 'null' title: Top P + type: number user: - anyOf: - - type: string - - type: 'null' title: User + type: string suffix: - anyOf: - - type: string - - type: 'null' title: Suffix + type: string additionalProperties: true type: object required: @@ -10271,23 +10268,19 @@ components: type: array title: File Ids attributes: - anyOf: - - additionalProperties: true - type: object - - type: 'null' title: Attributes + additionalProperties: true + type: object chunking_strategy: - anyOf: - - oneOf: - - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' - - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' - discriminator: - propertyName: type - mapping: - auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' - static: '#/components/schemas/VectorStoreChunkingStrategyStatic' - - type: 'null' title: Chunking Strategy + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' additionalProperties: true type: object required: @@ -10305,35 +10298,25 @@ components: OpenAICreateVectorStoreRequestWithExtraBody: properties: name: - anyOf: - - type: string - - type: 'null' title: Name + type: string file_ids: - anyOf: - - items: - type: string - type: array - - type: 'null' title: File Ids + items: + type: string + type: array expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' title: Expires After + additionalProperties: true + type: object chunking_strategy: - anyOf: - - additionalProperties: true - type: object - - type: 'null' title: Chunking Strategy + additionalProperties: true + type: object metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' title: Metadata + additionalProperties: true + type: object additionalProperties: true type: object title: OpenAICreateVectorStoreRequestWithExtraBody @@ -10365,10 +10348,8 @@ components: type: array title: Content name: - anyOf: - - type: string - - type: 'null' title: Name + type: string type: object required: - content @@ -10446,21 +10427,15 @@ components: type: array title: Input encoding_format: - anyOf: - - type: string - - type: 'null' title: Encoding Format default: float + type: string dimensions: - anyOf: - - type: integer - - type: 'null' title: Dimensions + type: integer user: - anyOf: - - type: string - - type: 'null' title: User + type: string additionalProperties: true type: object required: @@ -10533,20 +10508,14 @@ components: OpenAIFileFile: properties: file_data: - anyOf: - - type: string - - type: 'null' title: File Data + type: string file_id: - anyOf: - - type: string - - type: 'null' title: File Id + type: string filename: - anyOf: - - type: string - - type: 'null' title: Filename + type: string type: object title: OpenAIFileFile OpenAIFileObject: @@ -10611,10 +10580,8 @@ components: type: string title: Url detail: - anyOf: - - type: string - - type: 'null' title: Detail + type: string type: object required: - url @@ -10633,21 +10600,15 @@ components: type: string title: Name description: - anyOf: - - type: string - - type: 'null' title: Description + type: string strict: - anyOf: - - type: boolean - - type: 'null' title: Strict + type: boolean schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' title: Schema + additionalProperties: true + type: object type: object title: OpenAIJSONSchema description: 'JSON schema specification for OpenAI-compatible structured response @@ -10800,6 +10761,25 @@ components: :param type: Content part type identifier, always "refusal" :param refusal: Refusal text supplied by the model' + OpenAIResponseError: + properties: + code: + type: string + title: Code + message: + type: string + title: Message + type: object + required: + - code + - message + title: OpenAIResponseError + description: 'Error details for failed OpenAI response requests. + + + :param code: Error code identifying the type of failure + + :param message: Human-readable error message describing the failure' OpenAIResponseFormatJSONObject: properties: type: @@ -10862,15 +10842,11 @@ components: title: Type default: function_call_output id: - anyOf: - - type: string - - type: 'null' title: Id + type: string status: - anyOf: - - type: string - - type: 'null' title: Status + type: string type: object required: - call_id @@ -10886,25 +10862,17 @@ components: title: Type default: input_file file_data: - anyOf: - - type: string - - type: 'null' title: File Data + type: string file_id: - anyOf: - - type: string - - type: 'null' title: File Id + type: string file_url: - anyOf: - - type: string - - type: 'null' title: File Url + type: string filename: - anyOf: - - type: string - - type: 'null' title: Filename + type: string type: object title: OpenAIResponseInputMessageContentFile description: 'File content for input messages in OpenAI response format. @@ -10937,15 +10905,11 @@ components: title: Type default: input_image file_id: - anyOf: - - type: string - - type: 'null' title: File Id + type: string image_url: - anyOf: - - type: string - - type: 'null' title: Image Url + type: string type: object title: OpenAIResponseInputMessageContentImage description: 'Image content for input messages in OpenAI response format. @@ -10992,23 +10956,17 @@ components: type: array title: Vector Store Ids filters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' title: Filters + additionalProperties: true + type: object max_num_results: - anyOf: - - type: integer - maximum: 50.0 - minimum: 1.0 - - type: 'null' title: Max Num Results default: 10 + type: integer + maximum: 50.0 + minimum: 1.0 ranking_options: - anyOf: - - $ref: '#/components/schemas/SearchRankingOptions' - - type: 'null' + $ref: '#/components/schemas/SearchRankingOptions' type: object required: - vector_store_ids @@ -11038,21 +10996,15 @@ components: type: string title: Name description: - anyOf: - - type: string - - type: 'null' title: Description + type: string parameters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' title: Parameters + additionalProperties: true + type: object strict: - anyOf: - - type: boolean - - type: 'null' title: Strict + type: boolean type: object required: - name @@ -11084,11 +11036,9 @@ components: type: string title: Server Url headers: - anyOf: - - additionalProperties: true - type: object - - type: 'null' title: Headers + additionalProperties: true + type: object require_approval: anyOf: - type: string @@ -11104,7 +11054,6 @@ components: type: string type: array - $ref: '#/components/schemas/AllowedToolsFilter' - - type: 'null' title: Allowed Tools type: object required: @@ -11142,12 +11091,10 @@ components: title: Type default: web_search search_context_size: - anyOf: - - type: string - pattern: ^low|medium|high$ - - type: 'null' title: Search Context Size default: medium + type: string + pattern: ^low|medium|high$ type: object title: OpenAIResponseInputToolWebSearch description: 'Web search tool configuration for OpenAI response inputs. @@ -11198,22 +11145,18 @@ components: title: Type default: mcp_approval_response id: - anyOf: - - type: string - - type: 'null' title: Id + type: string reason: - anyOf: - - type: string - - type: 'null' title: Reason + type: string type: object required: - approval_request_id - approve title: OpenAIResponseMCPApprovalResponse description: A response to an MCP approval request. - OpenAIResponseMessage: + OpenAIResponseMessage-Input: properties: content: anyOf: @@ -11258,15 +11201,11 @@ components: title: Type default: message id: - anyOf: - - type: string - - type: 'null' title: Id + type: string status: - anyOf: - - type: string - - type: 'null' title: Status + type: string type: object required: - content @@ -11279,6 +11218,204 @@ components: the same "type" value, and there is no way to tell them apart in certain scenarios.' + OpenAIResponseMessage-Output: + properties: + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + type: array + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + type: array + title: Content + role: + anyOf: + - type: string + const: system + - type: string + const: developer + - type: string + const: user + - type: string + const: assistant + title: Role + type: + type: string + const: message + title: Type + default: message + id: + title: Id + type: string + status: + title: Status + type: string + type: object + required: + - content + - role + title: OpenAIResponseMessage + description: 'Corresponds to the various Message types in the Responses API. + + They are all under one type because the Responses API gives them all + + the same "type" value, and there is no way to tell them apart in certain + + scenarios.' + OpenAIResponseObject: + properties: + created_at: + type: integer + title: Created At + error: + $ref: '#/components/schemas/OpenAIResponseError' + id: + type: string + title: Id + model: + type: string + title: Model + object: + type: string + const: response + title: Object + default: response + output: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + discriminator: + propertyName: type + mapping: + file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + message: '#/components/schemas/OpenAIResponseMessage-Output' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + type: array + title: Output + parallel_tool_calls: + type: boolean + title: Parallel Tool Calls + default: false + previous_response_id: + title: Previous Response Id + type: string + prompt: + $ref: '#/components/schemas/OpenAIResponsePrompt' + status: + type: string + title: Status + temperature: + title: Temperature + type: number + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + title: Top P + type: number + tools: + title: Tools + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + discriminator: + propertyName: type + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + type: array + truncation: + title: Truncation + type: string + usage: + $ref: '#/components/schemas/OpenAIResponseUsage' + instructions: + title: Instructions + type: string + type: object + required: + - created_at + - id + - model + - output + - status + title: OpenAIResponseObject + description: 'Complete OpenAI response object containing generation results + and metadata. + + + :param created_at: Unix timestamp when the response was created + + :param error: (Optional) Error details if the response generation failed + + :param id: Unique identifier for this response + + :param model: Model identifier used for generation + + :param object: Object type identifier, always "response" + + :param output: List of generated output items (messages, tool calls, etc.) + + :param parallel_tool_calls: Whether tool calls can be executed in parallel + + :param previous_response_id: (Optional) ID of the previous response in a conversation + + :param prompt: (Optional) Reference to a prompt template and its variables. + + :param status: Current status of the response generation + + :param temperature: (Optional) Sampling temperature used for generation + + :param text: Text formatting configuration for the response + + :param top_p: (Optional) Nucleus sampling parameter used for generation + + :param tools: (Optional) An array of tools the model may call while generating + a response. + + :param truncation: (Optional) Truncation strategy applied to the response + + :param usage: (Optional) Token usage information for the response + + :param instructions: (Optional) System message inserted into the model''s + context' OpenAIResponseOutputMessageContentOutputText: properties: text: @@ -11328,12 +11465,10 @@ components: title: Type default: file_search_call results: - anyOf: - - items: - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' - type: array - - type: 'null' title: Results + items: + $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' + type: array type: object required: - id @@ -11407,15 +11542,11 @@ components: title: Type default: function_call id: - anyOf: - - type: string - - type: 'null' title: Id + type: string status: - anyOf: - - type: string - - type: 'null' title: Status + type: string type: object required: - call_id @@ -11456,15 +11587,11 @@ components: type: string title: Server Label error: - anyOf: - - type: string - - type: 'null' title: Error + type: string output: - anyOf: - - type: string - - type: 'null' title: Output + type: string type: object required: - id @@ -11555,26 +11682,22 @@ components: type: string title: Id variables: - anyOf: - - additionalProperties: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - discriminator: - propertyName: type - mapping: - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - type: object - - type: 'null' title: Variables + additionalProperties: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + type: object version: - anyOf: - - type: string - - type: 'null' title: Version + type: string type: object required: - id @@ -11595,9 +11718,7 @@ components: OpenAIResponseText: properties: format: - anyOf: - - $ref: '#/components/schemas/OpenAIResponseTextFormat' - - type: 'null' + $ref: '#/components/schemas/OpenAIResponseTextFormat' type: object title: OpenAIResponseText description: 'Text response configuration for OpenAI responses. @@ -11617,26 +11738,18 @@ components: const: json_object title: Type name: - anyOf: - - type: string - - type: 'null' title: Name + type: string schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' title: Schema + additionalProperties: true + type: object description: - anyOf: - - type: string - - type: 'null' title: Description + type: string strict: - anyOf: - - type: boolean - - type: 'null' title: Strict + type: boolean type: object title: OpenAIResponseTextFormat description: 'Configuration for Responses API text format. @@ -11655,6 +11768,92 @@ components: :param strict: (Optional) Whether to strictly enforce the JSON schema. If true, the response must match the schema exactly. Only used for json_schema.' + OpenAIResponseToolMCP: + properties: + type: + type: string + const: mcp + title: Type + default: mcp + server_label: + type: string + title: Server Label + allowed_tools: + anyOf: + - items: + type: string + type: array + - $ref: '#/components/schemas/AllowedToolsFilter' + title: Allowed Tools + type: object + required: + - server_label + title: OpenAIResponseToolMCP + description: 'Model Context Protocol (MCP) tool configuration for OpenAI response + object. + + + :param type: Tool type identifier, always "mcp" + + :param server_label: Label to identify this MCP server + + :param allowed_tools: (Optional) Restriction on which tools can be used from + this server' + OpenAIResponseUsage: + properties: + input_tokens: + type: integer + title: Input Tokens + output_tokens: + type: integer + title: Output Tokens + total_tokens: + type: integer + title: Total Tokens + input_tokens_details: + $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + output_tokens_details: + $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + type: object + required: + - input_tokens + - output_tokens + - total_tokens + title: OpenAIResponseUsage + description: 'Usage information for OpenAI response. + + + :param input_tokens: Number of tokens in the input + + :param output_tokens: Number of tokens in the output + + :param total_tokens: Total tokens used (input + output) + + :param input_tokens_details: Detailed breakdown of input token usage + + :param output_tokens_details: Detailed breakdown of output token usage' + OpenAIResponseUsageInputTokensDetails: + properties: + cached_tokens: + title: Cached Tokens + type: integer + type: object + title: OpenAIResponseUsageInputTokensDetails + description: 'Token details for input tokens in OpenAI response usage. + + + :param cached_tokens: Number of tokens retrieved from cache' + OpenAIResponseUsageOutputTokensDetails: + properties: + reasoning_tokens: + title: Reasoning Tokens + type: integer + type: object + title: OpenAIResponseUsageOutputTokensDetails + description: 'Token details for output tokens in OpenAI response usage. + + + :param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models)' OpenAISystemMessageParam: properties: role: @@ -11670,10 +11869,8 @@ components: type: array title: Content name: - anyOf: - - type: string - - type: 'null' title: Name + type: string type: object required: - content @@ -11694,12 +11891,10 @@ components: type: string title: Token bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' title: Bytes + items: + type: integer + type: array logprob: type: number title: Logprob @@ -11763,12 +11958,10 @@ components: type: string title: Token bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' title: Bytes + items: + type: integer + type: array logprob: type: number title: Logprob @@ -11810,10 +12003,8 @@ components: type: array title: Content name: - anyOf: - - type: string - - type: 'null' title: Name + type: string type: object required: - content @@ -11852,10 +12043,8 @@ components: type: array title: Content name: - anyOf: - - type: string - - type: 'null' title: Name + type: string type: object required: - content @@ -11881,14 +12070,22 @@ components: :cvar asc: Ascending order :cvar desc: Descending order' + OutputTokensDetails: + properties: + reasoning_tokens: + type: integer + title: Reasoning Tokens + additionalProperties: true + type: object + required: + - reasoning_tokens + title: OutputTokensDetails Prompt: properties: prompt: - anyOf: - - type: string - - type: 'null' title: Prompt description: The system prompt with variable placeholders + type: string version: type: integer minimum: 1.0 @@ -11970,6 +12167,29 @@ components: :param config: Configuration parameters for the provider :param health: Current health status of the provider' + QueryChunksResponse: + properties: + chunks: + items: + $ref: '#/components/schemas/Chunk-Output' + type: array + title: Chunks + scores: + items: + type: number + type: array + title: Scores + type: object + required: + - chunks + - scores + title: QueryChunksResponse + description: 'Response from querying chunks in a vector database. + + + :param chunks: List of content chunks returned from the query + + :param scores: Relevance scores corresponding to each returned chunk' RAGQueryConfig: properties: query_generator_config: @@ -12004,22 +12224,18 @@ components: ' mode: - anyOf: - - $ref: '#/components/schemas/RAGSearchMode' - - type: 'null' default: vector + $ref: '#/components/schemas/RAGSearchMode' ranker: - anyOf: - - oneOf: - - $ref: '#/components/schemas/RRFRanker' - - $ref: '#/components/schemas/WeightedRanker' - discriminator: - propertyName: type - mapping: - rrf: '#/components/schemas/RRFRanker' - weighted: '#/components/schemas/WeightedRanker' - - type: 'null' title: Ranker + oneOf: + - $ref: '#/components/schemas/RRFRanker' + - $ref: '#/components/schemas/WeightedRanker' + discriminator: + propertyName: type + mapping: + rrf: '#/components/schemas/RRFRanker' + weighted: '#/components/schemas/WeightedRanker' type: object title: RAGQueryConfig description: "Configuration for the RAG query generation.\n\n:param query_generator_config:\ @@ -12032,6 +12248,42 @@ components: \ {metadata}\\n\"\n:param mode: Search mode for retrieval\u2014either \"vector\"\ , \"keyword\", or \"hybrid\". Default \"vector\".\n:param ranker: Configuration\ \ for the ranker to use in hybrid search. Defaults to RRF ranker." + RAGQueryResult: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + title: RAGQueryResult + description: 'Result of a RAG query containing retrieved content and metadata. + + + :param content: (Optional) The retrieved content from the query + + :param metadata: Additional metadata about the query result' RAGSearchMode: type: string enum: @@ -12121,6 +12373,75 @@ components: :param method: HTTP method for the route :param provider_types: List of provider types that implement this route' + RunShieldResponse: + properties: + violation: + $ref: '#/components/schemas/SafetyViolation' + type: object + title: RunShieldResponse + description: 'Response from running a safety shield. + + + :param violation: (Optional) Safety violation detected by the shield, if any' + SafetyViolation: + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + user_message: + title: User Message + type: string + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - violation_level + title: SafetyViolation + description: 'Details of a safety violation detected by content moderation. + + + :param violation_level: Severity level of the violation + + :param user_message: (Optional) Message to convey to the user about the violation + + :param metadata: Additional metadata including specific violation codes for + debugging and telemetry' + ScoreBatchResponse: + properties: + dataset_id: + title: Dataset Id + type: string + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Results + type: object + required: + - results + title: ScoreBatchResponse + description: 'Response from batch scoring operations on datasets. + + + :param dataset_id: (Optional) The identifier of the dataset that was scored + + :param results: A map of scoring function name to ScoringResult' + ScoreResponse: + properties: + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Results + type: object + required: + - results + title: ScoreResponse + description: 'The response from scoring. + + + :param results: A map of scoring function name to ScoringResult.' ScoringFn-Output: properties: identifier: @@ -12128,11 +12449,9 @@ components: title: Identifier description: Unique identifier for this resource in llama stack provider_resource_id: - anyOf: - - type: string - - type: 'null' title: Provider Resource Id description: Unique identifier for this resource in the provider + type: string provider_id: type: string title: Provider Id @@ -12143,10 +12462,8 @@ components: title: Type default: scoring_function description: - anyOf: - - type: string - - type: 'null' title: Description + type: string metadata: additionalProperties: true type: object @@ -12180,21 +12497,19 @@ components: string: '#/components/schemas/StringType' union: '#/components/schemas/UnionType' params: - anyOf: - - oneOf: - - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' - - $ref: '#/components/schemas/RegexParserScoringFnParams' - - $ref: '#/components/schemas/BasicScoringFnParams' - discriminator: - propertyName: type - mapping: - basic: '#/components/schemas/BasicScoringFnParams' - llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' - regex_parser: '#/components/schemas/RegexParserScoringFnParams' - - type: 'null' title: Params description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + - $ref: '#/components/schemas/RegexParserScoringFnParams' + - $ref: '#/components/schemas/BasicScoringFnParams' + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' type: object required: - identifier @@ -12204,19 +12519,39 @@ components: description: 'A scoring function resource for evaluating model outputs. :param type: The resource type, always scoring_function' + ScoringResult: + properties: + score_rows: + items: + additionalProperties: true + type: object + type: array + title: Score Rows + aggregated_results: + additionalProperties: true + type: object + title: Aggregated Results + type: object + required: + - score_rows + - aggregated_results + title: ScoringResult + description: 'A scoring result for a single row. + + + :param score_rows: The scoring result for each row. Each row is a map of column + name to value. + + :param aggregated_results: Map of metric name to aggregated value' SearchRankingOptions: properties: ranker: - anyOf: - - type: string - - type: 'null' title: Ranker + type: string score_threshold: - anyOf: - - type: number - - type: 'null' title: Score Threshold default: 0.0 + type: number type: object title: SearchRankingOptions description: 'Options for ranking and filtering search results. @@ -12232,11 +12567,9 @@ components: title: Identifier description: Unique identifier for this resource in llama stack provider_resource_id: - anyOf: - - type: string - - type: 'null' title: Provider Resource Id description: Unique identifier for this resource in the provider + type: string provider_id: type: string title: Provider Id @@ -12247,11 +12580,9 @@ components: title: Type default: shield params: - anyOf: - - additionalProperties: true - type: object - - type: 'null' title: Params + additionalProperties: true + type: object type: object required: - identifier @@ -12276,39 +12607,49 @@ components: :param type: Discriminator type. Always "string"' + TextContentItem: + properties: + type: + type: string + const: text + title: Type + default: text + text: + type: string + title: Text + type: object + required: + - text + title: TextContentItem + description: 'A text content item + + + :param type: Discriminator type of the content item. Always "text" + + :param text: Text content' ToolDef: properties: toolgroup_id: - anyOf: - - type: string - - type: 'null' title: Toolgroup Id + type: string name: type: string title: Name description: - anyOf: - - type: string - - type: 'null' title: Description + type: string input_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' title: Input Schema + additionalProperties: true + type: object output_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' title: Output Schema + additionalProperties: true + type: object metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' title: Metadata + additionalProperties: true + type: object type: object required: - name @@ -12335,11 +12676,9 @@ components: title: Identifier description: Unique identifier for this resource in llama stack provider_resource_id: - anyOf: - - type: string - - type: 'null' title: Provider Resource Id description: Unique identifier for this resource in the provider + type: string provider_id: type: string title: Provider Id @@ -12350,15 +12689,11 @@ components: title: Type default: tool_group mcp_endpoint: - anyOf: - - $ref: '#/components/schemas/URL' - - type: 'null' + $ref: '#/components/schemas/URL' args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' title: Args + additionalProperties: true + type: object type: object required: - identifier @@ -12373,6 +12708,52 @@ components: tools :param args: (Optional) Additional arguments for the tool group' + ToolInvocationResult: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + error_message: + title: Error Message + type: string + error_code: + title: Error Code + type: integer + metadata: + title: Metadata + additionalProperties: true + type: object + type: object + title: ToolInvocationResult + description: 'Result of a tool invocation. + + + :param content: (Optional) The output content from the tool execution + + :param error_message: (Optional) Error message if the tool execution failed + + :param error_code: (Optional) Numeric error code if the tool execution failed + + :param metadata: (Optional) Additional metadata about the tool execution' URL: properties: uri: @@ -12453,6 +12834,26 @@ components: :param max_chunk_size_tokens: Maximum number of tokens per chunk, must be between 100 and 4096' + VectorStoreContent: + properties: + type: + type: string + const: text + title: Type + text: + type: string + title: Text + type: object + required: + - type + - text + title: VectorStoreContent + description: 'Content item from a vector store file or search result. + + + :param type: Content type, currently only "text" is supported + + :param text: The actual text content' VectorStoreFileBatchObject: properties: id: @@ -12540,6 +12941,103 @@ components: :param in_progress: Number of files currently being processed :param total: Total number of files in the vector store' + VectorStoreFileLastError: + properties: + code: + anyOf: + - type: string + const: server_error + - type: string + const: rate_limit_exceeded + title: Code + message: + type: string + title: Message + type: object + required: + - code + - message + title: VectorStoreFileLastError + description: 'Error information for failed vector store file processing. + + + :param code: Error code indicating the type of failure + + :param message: Human-readable error message describing the failure' + VectorStoreFileObject: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store.file + attributes: + additionalProperties: true + type: object + title: Attributes + chunking_strategy: + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: Chunking Strategy + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + created_at: + type: integer + title: Created At + last_error: + $ref: '#/components/schemas/VectorStoreFileLastError' + status: + anyOf: + - type: string + const: completed + - type: string + const: in_progress + - type: string + const: cancelled + - type: string + const: failed + title: Status + usage_bytes: + type: integer + title: Usage Bytes + default: 0 + vector_store_id: + type: string + title: Vector Store Id + type: object + required: + - id + - chunking_strategy + - created_at + - status + - vector_store_id + title: VectorStoreFileObject + description: 'OpenAI Vector Store File object. + + + :param id: Unique identifier for the file + + :param object: Object type identifier, always "vector_store.file" + + :param attributes: Key-value attributes associated with the file + + :param chunking_strategy: Strategy used for splitting the file into chunks + + :param created_at: Timestamp when the file was added to the vector store + + :param last_error: (Optional) Error information if file processing failed + + :param status: Current processing status of the file + + :param usage_bytes: Storage space used by this file in bytes + + :param vector_store_id: ID of the vector store containing this file' VectorStoreObject: properties: id: @@ -12553,10 +13051,8 @@ components: type: integer title: Created At name: - anyOf: - - type: string - - type: 'null' title: Name + type: string usage_bytes: type: integer title: Usage Bytes @@ -12568,21 +13064,15 @@ components: title: Status default: completed expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' title: Expires After + additionalProperties: true + type: object expires_at: - anyOf: - - type: integer - - type: 'null' title: Expires At + type: integer last_active_at: - anyOf: - - type: integer - - type: 'null' title: Last Active At + type: integer metadata: additionalProperties: true type: object @@ -12619,6 +13109,87 @@ components: :param metadata: Set of key-value pairs that can be attached to the vector store' + VectorStoreSearchResponse: + properties: + file_id: + type: string + title: File Id + filename: + type: string + title: Filename + score: + type: number + title: Score + attributes: + title: Attributes + additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + type: object + content: + items: + $ref: '#/components/schemas/VectorStoreContent' + type: array + title: Content + type: object + required: + - file_id + - filename + - score + - content + title: VectorStoreSearchResponse + description: 'Response from searching a vector store. + + + :param file_id: Unique identifier of the file containing the result + + :param filename: Name of the file containing the result + + :param score: Relevance score for this search result + + :param attributes: (Optional) Key-value attributes associated with the file + + :param content: List of content items matching the search query' + VectorStoreSearchResponsePage: + properties: + object: + type: string + title: Object + default: vector_store.search_results.page + search_query: + type: string + title: Search Query + data: + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + type: array + title: Data + has_more: + type: boolean + title: Has More + default: false + next_page: + title: Next Page + type: string + type: object + required: + - search_query + - data + title: VectorStoreSearchResponsePage + description: 'Paginated response from searching a vector store. + + + :param object: Object type identifier for the search results page + + :param search_query: The original search query that was executed + + :param data: List of search result objects + + :param has_more: Whether there are more results available beyond this page + + :param next_page: (Optional) Token for retrieving the next page of results' VersionInfo: properties: version: @@ -12632,6 +13203,21 @@ components: :param version: Version number of the service' + ViolationLevel: + type: string + enum: + - info + - warn + - error + title: ViolationLevel + description: 'Severity level of a safety violation. + + + :cvar INFO: Informational level violation that does not require action + + :cvar WARN: Warning level violation that suggests caution but allows continuation + + :cvar ERROR: Error level violation that requires blocking or intervention' WeightedRanker: properties: type: @@ -12654,6 +13240,485 @@ components: \ alpha: Weight factor between 0 and 1.\n 0 means only use keyword\ \ scores,\n 1 means only use vector scores,\n values\ \ in between blend both scores." + _URLOrData: + properties: + url: + $ref: '#/components/schemas/URL' + data: + contentEncoding: base64 + title: Data + type: string + type: object + title: _URLOrData + description: 'A URL or a base64 encoded string + + + :param url: A URL of the image or data URL in the format of data:image/{type};base64,{data}. + Note that URL could have length limits. + + :param data: base64 encoded image data as string' + _batches_Request: + properties: + input_file_id: + type: string + title: Input File Id + endpoint: + type: string + title: Endpoint + completion_window: + type: string + title: Completion Window + metadata: + type: string + title: Metadata + idempotency_key: + type: string + title: Idempotency Key + type: object + required: + - input_file_id + - endpoint + - completion_window + - metadata + - idempotency_key + title: _batches_Request + _batches_batch_id_cancel_Request: + properties: + batch_id: + type: string + title: Batch Id + type: object + required: + - batch_id + title: _batches_batch_id_cancel_Request + _conversations_Request: + properties: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: Items + discriminator: + propertyName: type + mapping: + file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + function_call_output: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + mcp_approval_response: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + message: '#/components/schemas/OpenAIResponseMessage-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + metadata: + type: string + title: Metadata + type: object + required: + - items + - metadata + title: _conversations_Request + _conversations_conversation_id_Request: + properties: + conversation_id: + type: string + title: Conversation Id + metadata: + type: string + title: Metadata + type: object + required: + - conversation_id + - metadata + title: _conversations_conversation_id_Request + _conversations_conversation_id_items_Request: + properties: + conversation_id: + type: string + title: Conversation Id + items: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: Items + type: object + required: + - conversation_id + - items + title: _conversations_conversation_id_items_Request + _models_Request: + properties: + model_id: + type: string + title: Model Id + provider_model_id: + type: string + title: Provider Model Id + provider_id: + type: string + title: Provider Id + metadata: + type: string + title: Metadata + model_type: + $ref: '#/components/schemas/ModelType' + type: object + required: + - model_id + - provider_model_id + - provider_id + - metadata + - model_type + title: _models_Request + _moderations_Request: + properties: + input: + type: string + title: Input + model: + type: string + title: Model + type: object + required: + - input + - model + title: _moderations_Request + _prompts_Request: + properties: + prompt: + type: string + title: Prompt + variables: + type: string + title: Variables + type: object + required: + - prompt + - variables + title: _prompts_Request + _prompts_prompt_id_Request: + properties: + prompt_id: + type: string + title: Prompt Id + prompt: + type: string + title: Prompt + version: + type: integer + title: Version + variables: + type: string + title: Variables + set_as_default: + type: boolean + title: Set As Default + default: true + type: object + required: + - prompt_id + - prompt + - version + - variables + title: _prompts_prompt_id_Request + _prompts_prompt_id_set_default_version_Request: + properties: + prompt_id: + type: string + title: Prompt Id + version: + type: integer + title: Version + type: object + required: + - prompt_id + - version + title: _prompts_prompt_id_set_default_version_Request + _responses_Request: + properties: + input: + type: string + title: Input + model: + type: string + title: Model + prompt: + $ref: '#/components/schemas/OpenAIResponsePrompt' + instructions: + type: string + title: Instructions + previous_response_id: + type: string + title: Previous Response Id + conversation: + type: string + title: Conversation + store: + type: boolean + title: Store + default: true + stream: + type: boolean + title: Stream + default: false + temperature: + type: number + title: Temperature + text: + $ref: '#/components/schemas/OpenAIResponseText' + tools: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: Tools + discriminator: + propertyName: type + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + include: + type: string + title: Include + max_infer_iters: + type: integer + title: Max Infer Iters + default: 10 + type: object + required: + - input + - model + - prompt + - instructions + - previous_response_id + - conversation + - temperature + - text + - tools + - include + title: _responses_Request + _scoring_score_Request: + properties: + input_rows: + type: string + title: Input Rows + scoring_functions: + type: string + title: Scoring Functions + type: object + required: + - input_rows + - scoring_functions + title: _scoring_score_Request + _scoring_score_batch_Request: + properties: + dataset_id: + type: string + title: Dataset Id + scoring_functions: + type: string + title: Scoring Functions + save_results_dataset: + type: boolean + title: Save Results Dataset + default: false + type: object + required: + - dataset_id + - scoring_functions + title: _scoring_score_batch_Request + _shields_Request: + properties: + shield_id: + type: string + title: Shield Id + provider_shield_id: + type: string + title: Provider Shield Id + provider_id: + type: string + title: Provider Id + params: + type: string + title: Params + type: object + required: + - shield_id + - provider_shield_id + - provider_id + - params + title: _shields_Request + _tool_runtime_invoke_Request: + properties: + tool_name: + type: string + title: Tool Name + kwargs: + type: string + title: Kwargs + type: object + required: + - tool_name + - kwargs + title: _tool_runtime_invoke_Request + _tool_runtime_rag_tool_query_Request: + properties: + content: + type: string + title: Content + vector_store_ids: + type: string + title: Vector Store Ids + query_config: + $ref: '#/components/schemas/RAGQueryConfig' + type: object + required: + - content + - vector_store_ids + - query_config + title: _tool_runtime_rag_tool_query_Request + _vector_io_query_Request: + properties: + vector_store_id: + type: string + title: Vector Store Id + query: + type: string + title: Query + params: + type: string + title: Params + type: object + required: + - vector_store_id + - query + - params + title: _vector_io_query_Request + _vector_stores_vector_store_id_Request: + properties: + vector_store_id: + type: string + title: Vector Store Id + name: + type: string + title: Name + expires_after: + type: string + title: Expires After + metadata: + type: string + title: Metadata + type: object + required: + - vector_store_id + - name + - expires_after + - metadata + title: _vector_stores_vector_store_id_Request + _vector_stores_vector_store_id_file_batches_batch_id_cancel_Request: + properties: + batch_id: + type: string + title: Batch Id + vector_store_id: + type: string + title: Vector Store Id + type: object + required: + - batch_id + - vector_store_id + title: _vector_stores_vector_store_id_file_batches_batch_id_cancel_Request + _vector_stores_vector_store_id_files_Request: + properties: + vector_store_id: + type: string + title: Vector Store Id + file_id: + type: string + title: File Id + attributes: + type: string + title: Attributes + chunking_strategy: + anyOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: Chunking Strategy + type: object + required: + - vector_store_id + - file_id + - attributes + - chunking_strategy + title: _vector_stores_vector_store_id_files_Request + _vector_stores_vector_store_id_files_file_id_Request: + properties: + vector_store_id: + type: string + title: Vector Store Id + file_id: + type: string + title: File Id + attributes: + type: string + title: Attributes + type: object + required: + - vector_store_id + - file_id + - attributes + title: _vector_stores_vector_store_id_files_file_id_Request + _vector_stores_vector_store_id_search_Request: + properties: + vector_store_id: + type: string + title: Vector Store Id + query: + type: string + title: Query + filters: + type: string + title: Filters + max_num_results: + type: integer + title: Max Num Results + default: 10 + ranking_options: + $ref: '#/components/schemas/SearchRankingOptions' + rewrite_query: + type: boolean + title: Rewrite Query + default: false + search_mode: + type: string + title: Search Mode + default: vector + type: object + required: + - vector_store_id + - query + - filters + - ranking_options + title: _vector_stores_vector_store_id_search_Request Error: description: 'Error response from the API. Roughly follows RFC 7807. @@ -12678,17 +13743,1022 @@ components: title: Detail type: string instance: - anyOf: - - type: string - - type: 'null' - default: null title: Instance + type: string + nullable: true required: - status - title - detail title: Error type: object + ListOpenAIResponseInputItem: + description: 'List container for OpenAI response input items. + + + :param data: List of input items + + :param object: Object type identifier, always "list"' + properties: + data: + items: + anyOf: + - discriminator: + mapping: + file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + message: '#/components/schemas/OpenAIResponseMessage' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: Data + type: array + object: + const: list + default: list + title: Object + type: string + required: + - data + title: ListOpenAIResponseInputItem + type: object + ListOpenAIResponseObject: + description: 'Paginated list of OpenAI response objects with navigation metadata. + + + :param data: List of response objects with their input context + + :param has_more: Whether there are more results available beyond this page + + :param first_id: Identifier of the first item in this page + + :param last_id: Identifier of the last item in this page + + :param object: Object type identifier, always "list"' + properties: + data: + items: + $ref: '#/components/schemas/OpenAIResponseObjectWithInput' + title: Data + type: array + has_more: + title: Has More + type: boolean + first_id: + title: First Id + type: string + last_id: + title: Last Id + type: string + object: + const: list + default: list + title: Object + type: string + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIResponseObject + type: object + OpenAIDeleteResponseObject: + description: 'Response object confirming deletion of an OpenAI response. + + + :param id: Unique identifier of the deleted response + + :param object: Object type identifier, always "response" + + :param deleted: Deletion confirmation flag, always True' + properties: + id: + title: Id + type: string + object: + const: response + default: response + title: Object + type: string + deleted: + default: true + title: Deleted + type: boolean + required: + - id + title: OpenAIDeleteResponseObject + type: object + ListBatchesResponse: + description: Response containing a list of batch objects. + properties: + object: + const: list + default: list + title: Object + type: string + data: + description: List of batch objects + items: + $ref: '#/components/schemas/Batch' + title: Data + type: array + first_id: + description: ID of the first batch in the list + title: First Id + type: string + nullable: true + last_id: + description: ID of the last batch in the list + title: Last Id + type: string + nullable: true + has_more: + default: false + description: Whether there are more batches available + title: Has More + type: boolean + required: + - data + title: ListBatchesResponse + type: object + ConversationDeletedResource: + description: Response for deleted conversation. + properties: + id: + description: The deleted conversation identifier + title: Id + type: string + object: + default: conversation.deleted + description: Object type + title: Object + type: string + deleted: + default: true + description: Whether the object was deleted + title: Deleted + type: boolean + required: + - id + title: ConversationDeletedResource + type: object + ConversationItemDeletedResource: + description: Response for deleted conversation item. + properties: + id: + description: The deleted item identifier + title: Id + type: string + object: + default: conversation.item.deleted + description: Object type + title: Object + type: string + deleted: + default: true + description: Whether the object was deleted + title: Deleted + type: boolean + required: + - id + title: ConversationItemDeletedResource + type: object + ListOpenAIFileResponse: + description: 'Response for listing files in OpenAI Files API. + + + :param data: List of file objects + + :param has_more: Whether there are more files available beyond this page + + :param first_id: ID of the first file in the list for pagination + + :param last_id: ID of the last file in the list for pagination + + :param object: The object type, which is always "list"' + properties: + data: + items: + $ref: '#/components/schemas/OpenAIFileObject' + title: Data + type: array + has_more: + title: Has More + type: boolean + first_id: + title: First Id + type: string + last_id: + title: Last Id + type: string + object: + const: list + default: list + title: Object + type: string + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIFileResponse + type: object + OpenAIFileDeleteResponse: + description: 'Response for deleting a file in OpenAI Files API. + + + :param id: The file identifier that was deleted + + :param object: The object type, which is always "file" + + :param deleted: Whether the file was successfully deleted' + properties: + id: + title: Id + type: string + object: + const: file + default: file + title: Object + type: string + deleted: + title: Deleted + type: boolean + required: + - id + - deleted + title: OpenAIFileDeleteResponse + type: object + ListOpenAIChatCompletionResponse: + description: 'Response from listing OpenAI-compatible chat completions. + + + :param data: List of chat completion objects with their input messages + + :param has_more: Whether there are more completions available beyond this + list + + :param first_id: ID of the first completion in this list + + :param last_id: ID of the last completion in this list + + :param object: Must be "list" to identify this as a list response' + properties: + data: + items: + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + title: Data + type: array + has_more: + title: Has More + type: boolean + first_id: + title: First Id + type: string + last_id: + title: Last Id + type: string + object: + const: list + default: list + title: Object + type: string + required: + - data + - has_more + - first_id + - last_id + title: ListOpenAIChatCompletionResponse + type: object + OpenAIAssistantMessageParam: + description: 'A message containing the model''s (assistant) response in an OpenAI-compatible + chat completion request. + + + :param role: Must be "assistant" to identify this as the model''s response + + :param content: The content of the model''s response + + :param name: (Optional) The name of the assistant message participant. + + :param tool_calls: List of tool calls. Each tool call is an OpenAIChatCompletionToolCall + object.' + properties: + role: + const: assistant + default: assistant + title: Role + type: string + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: Content + nullable: true + name: + title: Name + type: string + nullable: true + tool_calls: + title: Tool Calls + items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + nullable: true + title: OpenAIAssistantMessageParam + type: object + OpenAIChoice: + description: 'A choice from an OpenAI-compatible chat completion response. + + + :param message: The message from the model + + :param finish_reason: The reason the model stopped generating + + :param index: The index of the choice + + :param logprobs: (Optional) The log probabilities for the tokens in the message' + properties: + message: + discriminator: + mapping: + assistant: '#/components/schemas/OpenAIAssistantMessageParam' + developer: '#/components/schemas/OpenAIDeveloperMessageParam' + system: '#/components/schemas/OpenAISystemMessageParam' + tool: '#/components/schemas/OpenAIToolMessageParam' + user: '#/components/schemas/OpenAIUserMessageParam' + propertyName: role + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: Message + finish_reason: + title: Finish Reason + type: string + index: + title: Index + type: integer + logprobs: + $ref: '#/components/schemas/OpenAIChoiceLogprobs' + nullable: true + required: + - message + - finish_reason + - index + title: OpenAIChoice + type: object + OpenAIChoiceLogprobs: + description: 'The log probabilities for the tokens in the message from an OpenAI-compatible + chat completion response. + + + :param content: (Optional) The log probabilities for the tokens in the message + + :param refusal: (Optional) The log probabilities for the tokens in the message' + properties: + content: + title: Content + items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + nullable: true + refusal: + title: Refusal + items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + nullable: true + title: OpenAIChoiceLogprobs + type: object + OpenAICompletionWithInputMessages: + properties: + id: + title: Id + type: string + choices: + items: + $ref: '#/components/schemas/OpenAIChoice' + title: Choices + type: array + object: + const: chat.completion + default: chat.completion + title: Object + type: string + created: + title: Created + type: integer + model: + title: Model + type: string + usage: + $ref: '#/components/schemas/OpenAIChatCompletionUsage' + nullable: true + input_messages: + items: + discriminator: + mapping: + assistant: '#/components/schemas/OpenAIAssistantMessageParam' + developer: '#/components/schemas/OpenAIDeveloperMessageParam' + system: '#/components/schemas/OpenAISystemMessageParam' + tool: '#/components/schemas/OpenAIToolMessageParam' + user: '#/components/schemas/OpenAIUserMessageParam' + propertyName: role + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: Input Messages + type: array + required: + - id + - choices + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages + type: object + OpenAIUserMessageParam: + description: 'A message from the user in an OpenAI-compatible chat completion + request. + + + :param role: Must be "user" to identify this as a user message + + :param content: The content of the message, which can include text and other + media + + :param name: (Optional) The name of the user message participant.' + properties: + role: + const: user + default: user + title: Role + type: string + content: + anyOf: + - type: string + - items: + discriminator: + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + - $ref: '#/components/schemas/OpenAIFile' + type: array + title: Content + name: + title: Name + type: string + nullable: true + required: + - content + title: OpenAIUserMessageParam + type: object + ScoringFn: + description: 'A scoring function resource for evaluating model outputs. + + :param type: The resource type, always scoring_function' + properties: + identifier: + description: Unique identifier for this resource in llama stack + title: Identifier + type: string + provider_resource_id: + description: Unique identifier for this resource in the provider + title: Provider Resource Id + type: string + nullable: true + provider_id: + description: ID of the provider that owns this resource + title: Provider Id + type: string + type: + const: scoring_function + default: scoring_function + title: Type + type: string + description: + title: Description + type: string + nullable: true + metadata: + additionalProperties: true + description: Any additional metadata for this definition + title: Metadata + type: object + return_type: + description: The return type of the deterministic function + discriminator: + mapping: + agent_turn_input: '#/components/schemas/AgentTurnInputType' + array: '#/components/schemas/ArrayType' + boolean: '#/components/schemas/BooleanType' + chat_completion_input: '#/components/schemas/ChatCompletionInputType' + completion_input: '#/components/schemas/CompletionInputType' + json: '#/components/schemas/JsonType' + number: '#/components/schemas/NumberType' + object: '#/components/schemas/ObjectType' + string: '#/components/schemas/StringType' + union: '#/components/schemas/UnionType' + propertyName: type + oneOf: + - $ref: '#/components/schemas/StringType' + - $ref: '#/components/schemas/NumberType' + - $ref: '#/components/schemas/BooleanType' + - $ref: '#/components/schemas/ArrayType' + - $ref: '#/components/schemas/ObjectType' + - $ref: '#/components/schemas/JsonType' + - $ref: '#/components/schemas/UnionType' + - $ref: '#/components/schemas/ChatCompletionInputType' + - $ref: '#/components/schemas/CompletionInputType' + - $ref: '#/components/schemas/AgentTurnInputType' + title: Return Type + params: + description: The parameters for the scoring function for benchmark eval, + these can be overridden for app eval + title: Params + discriminator: + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + - $ref: '#/components/schemas/RegexParserScoringFnParams' + - $ref: '#/components/schemas/BasicScoringFnParams' + nullable: true + required: + - identifier + - provider_id + - return_type + title: ScoringFn + type: object + ListToolDefsResponse: + description: 'Response containing a list of tool definitions. + + + :param data: List of tool definitions' + properties: + data: + items: + $ref: '#/components/schemas/ToolDef' + title: Data + type: array + required: + - data + title: ListToolDefsResponse + type: object + VectorStoreDeleteResponse: + description: 'Response from deleting a vector store. + + + :param id: Unique identifier of the deleted vector store + + :param object: Object type identifier for the deletion response + + :param deleted: Whether the deletion operation was successful' + properties: + id: + title: Id + type: string + object: + default: vector_store.deleted + title: Object + type: string + deleted: + default: true + title: Deleted + type: boolean + required: + - id + title: VectorStoreDeleteResponse + type: object + VectorStoreFileContentsResponse: + description: 'Response from retrieving the contents of a vector store file. + + + :param file_id: Unique identifier for the file + + :param filename: Name of the file + + :param attributes: Key-value attributes associated with the file + + :param content: List of content items from the file' + properties: + file_id: + title: File Id + type: string + filename: + title: Filename + type: string + attributes: + additionalProperties: true + title: Attributes + type: object + content: + items: + $ref: '#/components/schemas/VectorStoreContent' + title: Content + type: array + required: + - file_id + - filename + - attributes + - content + title: VectorStoreFileContentsResponse + type: object + VectorStoreFileDeleteResponse: + description: 'Response from deleting a vector store file. + + + :param id: Unique identifier of the deleted file + + :param object: Object type identifier for the deletion response + + :param deleted: Whether the deletion operation was successful' + properties: + id: + title: Id + type: string + object: + default: vector_store.file.deleted + title: Object + type: string + deleted: + default: true + title: Deleted + type: boolean + required: + - id + title: VectorStoreFileDeleteResponse + type: object + VectorStoreFilesListInBatchResponse: + description: 'Response from listing files in a vector store file batch. + + + :param object: Object type identifier, always "list" + + :param data: List of vector store file objects in the batch + + :param first_id: (Optional) ID of the first file in the list for pagination + + :param last_id: (Optional) ID of the last file in the list for pagination + + :param has_more: Whether there are more files available beyond this page' + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: + title: First Id + type: string + nullable: true + last_id: + title: Last Id + type: string + nullable: true + has_more: + default: false + title: Has More + type: boolean + required: + - data + title: VectorStoreFilesListInBatchResponse + type: object + VectorStoreListFilesResponse: + description: 'Response from listing files in a vector store. + + + :param object: Object type identifier, always "list" + + :param data: List of vector store file objects + + :param first_id: (Optional) ID of the first file in the list for pagination + + :param last_id: (Optional) ID of the last file in the list for pagination + + :param has_more: Whether there are more files available beyond this page' + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreFileObject' + title: Data + type: array + first_id: + title: First Id + type: string + nullable: true + last_id: + title: Last Id + type: string + nullable: true + has_more: + default: false + title: Has More + type: boolean + required: + - data + title: VectorStoreListFilesResponse + type: object + VectorStoreListResponse: + description: 'Response from listing vector stores. + + + :param object: Object type identifier, always "list" + + :param data: List of vector store objects + + :param first_id: (Optional) ID of the first vector store in the list for pagination + + :param last_id: (Optional) ID of the last vector store in the list for pagination + + :param has_more: Whether there are more vector stores available beyond this + page' + properties: + object: + default: list + title: Object + type: string + data: + items: + $ref: '#/components/schemas/VectorStoreObject' + title: Data + type: array + first_id: + title: First Id + type: string + nullable: true + last_id: + title: Last Id + type: string + nullable: true + has_more: + default: false + title: Has More + type: boolean + required: + - data + title: VectorStoreListResponse + type: object + OpenAIResponseMessage: + description: 'Corresponds to the various Message types in the Responses API. + + They are all under one type because the Responses API gives them all + + the same "type" value, and there is no way to tell them apart in certain + + scenarios.' + properties: + content: + anyOf: + - type: string + - items: + discriminator: + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + type: array + - items: + discriminator: + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + type: array + title: Content + role: + anyOf: + - const: system + type: string + - const: developer + type: string + - const: user + type: string + - const: assistant + type: string + title: Role + type: + const: message + default: message + title: Type + type: string + id: + title: Id + type: string + nullable: true + status: + title: Status + type: string + nullable: true + required: + - content + - role + title: OpenAIResponseMessage + type: object + OpenAIResponseObjectWithInput: + description: 'OpenAI response object extended with input context information. + + + :param input: List of input items that led to this response' + properties: + created_at: + title: Created At + type: integer + error: + $ref: '#/components/schemas/OpenAIResponseError' + nullable: true + id: + title: Id + type: string + model: + title: Model + type: string + object: + const: response + default: response + title: Object + type: string + output: + items: + discriminator: + mapping: + file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + message: '#/components/schemas/OpenAIResponseMessage' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: Output + type: array + parallel_tool_calls: + default: false + title: Parallel Tool Calls + type: boolean + previous_response_id: + title: Previous Response Id + type: string + nullable: true + prompt: + $ref: '#/components/schemas/OpenAIResponsePrompt' + nullable: true + status: + title: Status + type: string + temperature: + title: Temperature + type: number + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + title: Top P + type: number + nullable: true + tools: + title: Tools + items: + discriminator: + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + type: array + nullable: true + truncation: + title: Truncation + type: string + nullable: true + usage: + $ref: '#/components/schemas/OpenAIResponseUsage' + nullable: true + instructions: + title: Instructions + type: string + nullable: true + input: + items: + anyOf: + - discriminator: + mapping: + file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + message: '#/components/schemas/OpenAIResponseMessage' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: Input + type: array + required: + - created_at + - id + - model + - output + - status + - input + title: OpenAIResponseObjectWithInput + type: object + _safety_run_shield_Request: + properties: + shield_id: + title: Shield Id + type: string + messages: + anyOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: Messages + params: + title: Params + type: string + required: + - shield_id + - messages + - params + title: _safety_run_shield_Request + type: object responses: BadRequest400: description: The request was invalid or malformed diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index 120c20b6a..118a887d6 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -1,19 +1,13 @@ openapi: 3.1.0 info: - title: >- - Llama Stack Specification - Stable & Experimental APIs - version: v1 - description: >- - This is the specification of the Llama Stack that provides - a set of endpoints and their corresponding interfaces that are - tailored to - best leverage Llama Models. - - **πŸ”— COMBINED**: This specification includes both stable production-ready APIs - and experimental pre-release APIs. Use stable APIs for production deployments - and experimental APIs for testing new features. + title: Llama Stack API - Stable & Experimental APIs + description: "A comprehensive API for building and deploying AI applications\n\n**πŸ”— COMBINED**: This specification includes both stable production-ready APIs and experimental pre-release APIs. Use stable APIs for production deployments and experimental APIs for testing new features." + version: 1.0.0 servers: - - url: http://any-hosted-llama-stack.com +- url: https://api.llamastack.com + description: Production server +- url: https://staging-api.llamastack.com + description: Staging server paths: /v1/batches: get: @@ -3480,44 +3474,72 @@ paths: deprecated: false /v1beta/datasetio/append-rows/{dataset_id}: post: + tags: + - V1Beta + summary: Append Rows + description: Generic endpoint - this would be replaced with actual implementation. + operationId: append_rows_v1beta_datasetio_append_rows__dataset_id__post + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' responses: '200': - description: OK + description: Successful Response + content: + application/json: + schema: {} '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - DatasetIO - summary: Append rows to a dataset. - description: >- - Append rows to a dataset. - - :param dataset_id: The ID of the dataset to append the rows to. - :param rows: The rows to append to the dataset. - parameters: - - name: dataset_id - description: >- - The ID of the dataset to append the rows to. - required: true - schema: - type: string - in: path - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AppendRowsRequest' - required: true - deprecated: false + description: Default Response /v1beta/datasetio/iterrows/{dataset_id}: get: + tags: + - V1Beta + summary: Iterrows + description: Query endpoint for proper schema generation. + operationId: iterrows_v1beta_datasetio_iterrows__dataset_id__get + parameters: + - name: dataset_id + in: path + required: true + schema: + type: string + title: Dataset Id + - name: limit + in: query + required: true + schema: + type: integer + title: Limit + - name: start_index + in: query + required: true + schema: + type: integer + title: Start Index responses: '200': description: A PaginatedResponse. @@ -3527,59 +3549,23 @@ paths: $ref: '#/components/schemas/PaginatedResponse' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - DatasetIO - summary: >- - Get a paginated list of rows from a dataset. - description: >- - Get a paginated list of rows from a dataset. - - Uses offset-based pagination where: - - start_index: The starting index (0-based). If None, starts from - beginning. - - limit: Number of items to return. If None or -1, returns all items. - - The response includes: - - data: List of items for the current page. - - has_more: Whether there are more items available after this set. - - :param dataset_id: The ID of the dataset to get the rows from. - :param start_index: Index into dataset for the first row to get. Get - all rows if None. - :param limit: The number of rows to get. - :returns: A PaginatedResponse. - parameters: - - name: dataset_id - description: >- - The ID of the dataset to get the rows from. - required: true - schema: - type: string - in: path - - name: start_index - description: >- - Index into dataset for the first row to get. Get all rows if None. - required: false - schema: - type: integer - in: query - - name: limit - description: The number of rows to get. - required: false - schema: - type: integer - in: query - deprecated: false + description: Default Response /v1beta/datasets: get: + tags: + - V1Beta + summary: List Datasets + description: Response-only endpoint for proper schema generation. + operationId: list_datasets_v1beta_datasets_get responses: '200': description: A ListDatasetsResponse. @@ -3588,120 +3574,103 @@ paths: schema: $ref: '#/components/schemas/ListDatasetsResponse' '400': + description: Bad Request $ref: '#/components/responses/BadRequest400' '429': - $ref: >- - #/components/responses/TooManyRequests429 + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: >- - #/components/responses/InternalServerError500 + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: + description: Default Response $ref: '#/components/responses/DefaultError' - tags: - - Datasets - summary: List all datasets. - description: >- - List all datasets. - - :returns: A ListDatasetsResponse. - parameters: [] - deprecated: false post: - responses: - '200': - description: A Dataset. - content: - application/json: - schema: - $ref: '#/components/schemas/Dataset' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' tags: - - Datasets - summary: Register a new dataset. - description: >- - Register a new dataset. - - :param purpose: The purpose of the dataset. - One of: - - "post-training/messages": The dataset contains a messages column - with list of messages for post-training. - { - "messages": [ - {"role": "user", "content": "Hello, world!"}, - {"role": "assistant", "content": "Hello, world!"}, - ] - } - - "eval/question-answer": The dataset contains a question column - and an answer column for evaluation. - { - "question": "What is the capital of France?", - "answer": "Paris" - } - - "eval/messages-answer": The dataset contains a messages column - with list of messages and an answer column for evaluation. - { - "messages": [ - {"role": "user", "content": "Hello, my name is John - Doe."}, - {"role": "assistant", "content": "Hello, John Doe. - How can I help you today?"}, - {"role": "user", "content": "What's my name?"}, - ], - "answer": "John Doe" - } - :param source: The data source of the dataset. Ensure that the data - source schema is compatible with the purpose of the dataset. Examples: - - { - "type": "uri", - "uri": "https://mywebsite.com/mydata.jsonl" - } - - { - "type": "uri", - "uri": "lsfs://mydata.jsonl" - } - - { - "type": "uri", - "uri": "data:csv;base64,{base64_content}" - } - - { - "type": "uri", - "uri": "huggingface://llamastack/simpleqa?split=train" - } - - { - "type": "rows", - "rows": [ - { - "messages": [ - {"role": "user", "content": "Hello, world!"}, - {"role": "assistant", "content": "Hello, world!"}, - ] - } - ] - } - :param metadata: The metadata for the dataset. - - E.g. {"description": "My dataset"}. - :param dataset_id: The ID of the dataset. If not provided, an ID will - be generated. - :returns: A Dataset. - parameters: [] + - V1Beta + summary: Register Dataset + description: Typed endpoint for proper schema generation. + operationId: register_dataset_v1beta_datasets_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/RegisterDatasetRequest' + $ref: '#/components/schemas/__main_____datasets_Request' required: true - deprecated: false + responses: + '200': + description: A Dataset. + content: + application/json: + schema: + $ref: '#/components/schemas/Dataset' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' /v1beta/datasets/{dataset_id}: + delete: + tags: + - V1Beta + summary: Unregister Dataset + description: Generic endpoint - this would be replaced with actual implementation. + operationId: unregister_dataset_v1beta_datasets__dataset_id__delete + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: dataset_id + in: path + required: true + schema: + type: string + description: 'Path parameter: dataset_id' + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response get: + tags: + - V1Beta + summary: Get Dataset + description: Query endpoint for proper schema generation. + operationId: get_dataset_v1beta_datasets__dataset_id__get + parameters: + - name: dataset_id + in: path + required: true + schema: + type: string + title: Dataset Id responses: '200': description: A Dataset. @@ -3711,61 +3680,36 @@ paths: $ref: '#/components/schemas/Dataset' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Datasets - summary: Get a dataset by its ID. - description: >- - Get a dataset by its ID. - - :param dataset_id: The ID of the dataset to get. - :returns: A Dataset. - parameters: - - name: dataset_id - description: The ID of the dataset to get. - required: true - schema: - type: string - in: path - deprecated: false - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Datasets - summary: Unregister a dataset by its ID. - description: >- - Unregister a dataset by its ID. - - :param dataset_id: The ID of the dataset to unregister. - parameters: - - name: dataset_id - description: The ID of the dataset to unregister. - required: true - schema: - type: string - in: path - deprecated: false + description: Default Response /v1alpha/agents: get: + tags: + - V1Alpha + summary: List Agents + description: Query endpoint for proper schema generation. + operationId: list_agents_v1alpha_agents_get + parameters: + - name: limit + in: query + required: true + schema: + type: integer + title: Limit + - name: start_index + in: query + required: true + schema: + type: integer + title: Start Index responses: '200': description: A PaginatedResponse. @@ -3775,75 +3719,102 @@ paths: $ref: '#/components/schemas/PaginatedResponse' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: List all agents. - description: >- - List all agents. - - :param start_index: The index to start the pagination from. - :param limit: The number of agents to return. - :returns: A PaginatedResponse. - parameters: - - name: start_index - description: The index to start the pagination from. - required: false - schema: - type: integer - in: query - - name: limit - description: The number of agents to return. - required: false - schema: - type: integer - in: query - deprecated: false + description: Default Response post: + tags: + - V1Alpha + summary: Create Agent + description: Typed endpoint for proper schema generation. + operationId: create_agent_v1alpha_agents_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AgentConfig' responses: '200': - description: >- - An AgentCreateResponse with the agent ID. + description: An AgentCreateResponse with the agent ID. content: application/json: schema: $ref: '#/components/schemas/AgentCreateResponse' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: >- - Create an agent with the given configuration. - description: >- - Create an agent with the given configuration. - - :param agent_config: The configuration for the agent. - :returns: An AgentCreateResponse with the agent ID. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateAgentRequest' - required: true - deprecated: false + description: Default Response /v1alpha/agents/{agent_id}: + delete: + tags: + - V1Alpha + summary: Delete Agent + description: Generic endpoint - this would be replaced with actual implementation. + operationId: delete_agent_v1alpha_agents__agent_id__delete + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: agent_id + in: path + required: true + schema: + type: string + description: 'Path parameter: agent_id' + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response get: + tags: + - V1Alpha + summary: Get Agent + description: Query endpoint for proper schema generation. + operationId: get_agent_v1alpha_agents__agent_id__get + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + title: Agent Id responses: '200': description: An Agent of the agent. @@ -3853,62 +3824,29 @@ paths: $ref: '#/components/schemas/Agent' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Describe an agent by its ID. - description: >- - Describe an agent by its ID. - - :param agent_id: ID of the agent. - :returns: An Agent of the agent. - parameters: - - name: agent_id - description: ID of the agent. - required: true - schema: - type: string - in: path - deprecated: false - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: >- - Delete an agent by its ID and its associated sessions and turns. - description: >- - Delete an agent by its ID and its associated sessions and turns. - - :param agent_id: The ID of the agent to delete. - parameters: - - name: agent_id - description: The ID of the agent to delete. - required: true - schema: - type: string - in: path - deprecated: false + description: Default Response /v1alpha/agents/{agent_id}/session: post: + tags: + - V1Alpha + summary: Create Agent Session + description: Typed endpoint for proper schema generation. + operationId: create_agent_session_v1alpha_agents__agent_id__session_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/__main_____agents_agent_id_session_Request' + required: true responses: '200': description: An AgentSessionCreateResponse. @@ -3917,41 +3855,97 @@ paths: schema: $ref: '#/components/schemas/AgentSessionCreateResponse' '400': + description: Bad Request $ref: '#/components/responses/BadRequest400' '429': - $ref: >- - #/components/responses/TooManyRequests429 + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: >- - #/components/responses/InternalServerError500 + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + description: 'Path parameter: agent_id' + /v1alpha/agents/{agent_id}/session/{session_id}: + delete: + tags: + - V1Alpha + summary: Delete Agents Session + description: Generic endpoint - this would be replaced with actual implementation. + operationId: delete_agents_session_v1alpha_agents__agent_id__session__session_id__delete + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: agent_id + in: path + required: true + schema: + type: string + description: 'Path parameter: agent_id' + - name: session_id + in: path + required: true + schema: + type: string + description: 'Path parameter: session_id' + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Create a new session for an agent. - description: >- - Create a new session for an agent. - - :param agent_id: The ID of the agent to create the session for. - :param session_name: The name of the session to create. - :returns: An AgentSessionCreateResponse. - parameters: - - name: agent_id - description: >- - The ID of the agent to create the session for. - required: true - schema: - type: string - in: path - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateAgentSessionRequest' - required: true - deprecated: false - /v1alpha/agents/{agent_id}/session/{session_id}: + description: Default Response get: + tags: + - V1Alpha + summary: Get Agents Session + description: Query endpoint for proper schema generation. + operationId: get_agents_session_v1alpha_agents__agent_id__session__session_id__get + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + title: Agent Id + - name: session_id + in: path + required: true + schema: + type: string + title: Session Id + - name: turn_ids + in: query + required: true + schema: + type: string + title: Turn Ids responses: '200': description: A Session. @@ -3961,87 +3955,29 @@ paths: $ref: '#/components/schemas/Session' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Retrieve an agent session by its ID. - description: >- - Retrieve an agent session by its ID. - - :param session_id: The ID of the session to get. - :param agent_id: The ID of the agent to get the session for. - :param turn_ids: (Optional) List of turn IDs to filter the session - by. - :returns: A Session. - parameters: - - name: session_id - description: The ID of the session to get. - required: true - schema: - type: string - in: path - - name: agent_id - description: >- - The ID of the agent to get the session for. - required: true - schema: - type: string - in: path - - name: turn_ids - description: >- - (Optional) List of turn IDs to filter the session by. - required: false - schema: - $ref: '#/components/schemas/list' - in: query - deprecated: false - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: >- - Delete an agent session by its ID and its associated turns. - description: >- - Delete an agent session by its ID and its associated turns. - - :param session_id: The ID of the session to delete. - :param agent_id: The ID of the agent to delete the session for. - parameters: - - name: session_id - description: The ID of the session to delete. - required: true - schema: - type: string - in: path - - name: agent_id - description: >- - The ID of the agent to delete the session for. - required: true - schema: - type: string - in: path - deprecated: false + description: Default Response /v1alpha/agents/{agent_id}/session/{session_id}/turn: post: + tags: + - V1Alpha + summary: Create Agent Turn + description: Typed endpoint for proper schema generation. + operationId: create_agent_turn_v1alpha_agents__agent_id__session__session_id__turn_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/__main_____agents_agent_id_session_session_id_turn_Request' + required: true responses: '200': description: If stream=False, returns a Turn object. @@ -4049,62 +3985,57 @@ paths: application/json: schema: $ref: '#/components/schemas/Turn' - text/event-stream: - schema: - $ref: '#/components/schemas/AsyncIterator' '400': + description: Bad Request $ref: '#/components/responses/BadRequest400' '429': - $ref: >- - #/components/responses/TooManyRequests429 + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: >- - #/components/responses/InternalServerError500 + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: + description: Default Response $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Create a new turn for an agent. - description: >- - Create a new turn for an agent. - - :param agent_id: The ID of the agent to create the turn for. - :param session_id: The ID of the session to create the turn for. - :param messages: List of messages to start the turn with. - :param stream: (Optional) If True, generate an SSE event stream of - the response. Defaults to False. - :param documents: (Optional) List of documents to create the turn - with. - :param toolgroups: (Optional) List of toolgroups to create the turn - with, will be used in addition to the agent's config toolgroups for the request. - :param tool_config: (Optional) The tool configuration to create the - turn with, will be used to override the agent's tool_config. - :returns: If stream=False, returns a Turn object. - If stream=True, returns an SSE event stream of AgentTurnResponseStreamChunk. parameters: - - name: agent_id - description: >- - The ID of the agent to create the turn for. - required: true - schema: - type: string - in: path - - name: session_id - description: >- - The ID of the session to create the turn for. - required: true - schema: - type: string - in: path - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateAgentTurnRequest' + - name: agent_id + in: path required: true - deprecated: false + schema: + type: string + description: 'Path parameter: agent_id' + - name: session_id + in: path + required: true + schema: + type: string + description: 'Path parameter: session_id' /v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}: get: + tags: + - V1Alpha + summary: Get Agents Turn + description: Query endpoint for proper schema generation. + operationId: get_agents_turn_v1alpha_agents__agent_id__session__session_id__turn__turn_id__get + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + title: Agent Id + - name: session_id + in: path + required: true + schema: + type: string + title: Session Id + - name: turn_id + in: path + required: true + schema: + type: string + title: Turn Id responses: '200': description: A Turn. @@ -4114,116 +4045,99 @@ paths: $ref: '#/components/schemas/Turn' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Retrieve an agent turn by its ID. - description: >- - Retrieve an agent turn by its ID. - - :param agent_id: The ID of the agent to get the turn for. - :param session_id: The ID of the session to get the turn for. - :param turn_id: The ID of the turn to get. - :returns: A Turn. - parameters: - - name: agent_id - description: The ID of the agent to get the turn for. - required: true - schema: - type: string - in: path - - name: session_id - description: >- - The ID of the session to get the turn for. - required: true - schema: - type: string - in: path - - name: turn_id - description: The ID of the turn to get. - required: true - schema: - type: string - in: path - deprecated: false + description: Default Response /v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}/resume: post: - responses: - '200': - description: >- - A Turn object if stream is False, otherwise an AsyncIterator of AgentTurnResponseStreamChunk - objects. - content: - application/json: - schema: - $ref: '#/components/schemas/Turn' - text/event-stream: - schema: - $ref: '#/components/schemas/AsyncIterator' - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' tags: - - Agents - summary: >- - Resume an agent turn with executed tool call responses. - description: >- - Resume an agent turn with executed tool call responses. - - When a Turn has the status `awaiting_input` due to pending input from client - side tool calls, this endpoint can be used to submit the outputs from the - tool calls once they are ready. - - :param agent_id: The ID of the agent to resume. - :param session_id: The ID of the session to resume. - :param turn_id: The ID of the turn to resume. - :param tool_responses: The tool call responses to resume the turn - with. - :param stream: Whether to stream the response. - :returns: A Turn object if stream is False, otherwise an AsyncIterator - of AgentTurnResponseStreamChunk objects. - parameters: - - name: agent_id - description: The ID of the agent to resume. - required: true - schema: - type: string - in: path - - name: session_id - description: The ID of the session to resume. - required: true - schema: - type: string - in: path - - name: turn_id - description: The ID of the turn to resume. - required: true - schema: - type: string - in: path + - V1Alpha + summary: Resume Agent Turn + description: Typed endpoint for proper schema generation. + operationId: resume_agent_turn_v1alpha_agents__agent_id__session__session_id__turn__turn_id__resume_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/ResumeAgentTurnRequest' + $ref: '#/components/schemas/__main_____agents_agent_id_session_session_id_turn_turn_id_resume_Request' required: true - deprecated: false + responses: + '200': + description: A Turn object if stream is False, otherwise an AsyncIterator of AgentTurnResponseStreamChunk objects. + content: + application/json: + schema: + $ref: '#/components/schemas/Turn' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + description: 'Path parameter: agent_id' + - name: session_id + in: path + required: true + schema: + type: string + description: 'Path parameter: session_id' + - name: turn_id + in: path + required: true + schema: + type: string + description: 'Path parameter: turn_id' /v1alpha/agents/{agent_id}/session/{session_id}/turn/{turn_id}/step/{step_id}: get: + tags: + - V1Alpha + summary: Get Agents Step + description: Query endpoint for proper schema generation. + operationId: get_agents_step_v1alpha_agents__agent_id__session__session_id__turn__turn_id__step__step_id__get + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + title: Agent Id + - name: session_id + in: path + required: true + schema: + type: string + title: Session Id + - name: step_id + in: path + required: true + schema: + type: string + title: Step Id + - name: turn_id + in: path + required: true + schema: + type: string + title: Turn Id responses: '200': description: An AgentStepResponse. @@ -4233,54 +4147,42 @@ paths: $ref: '#/components/schemas/AgentStepResponse' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: Retrieve an agent step by its ID. - description: >- - Retrieve an agent step by its ID. - - :param agent_id: The ID of the agent to get the step for. - :param session_id: The ID of the session to get the step for. - :param turn_id: The ID of the turn to get the step for. - :param step_id: The ID of the step to get. - :returns: An AgentStepResponse. - parameters: - - name: agent_id - description: The ID of the agent to get the step for. - required: true - schema: - type: string - in: path - - name: session_id - description: >- - The ID of the session to get the step for. - required: true - schema: - type: string - in: path - - name: turn_id - description: The ID of the turn to get the step for. - required: true - schema: - type: string - in: path - - name: step_id - description: The ID of the step to get. - required: true - schema: - type: string - in: path - deprecated: false + description: Default Response /v1alpha/agents/{agent_id}/sessions: get: + tags: + - V1Alpha + summary: List Agent Sessions + description: Query endpoint for proper schema generation. + operationId: list_agent_sessions_v1alpha_agents__agent_id__sessions_get + parameters: + - name: agent_id + in: path + required: true + schema: + type: string + title: Agent Id + - name: limit + in: query + required: true + schema: + type: integer + title: Limit + - name: start_index + in: query + required: true + schema: + type: integer + title: Start Index responses: '200': description: A PaginatedResponse. @@ -4290,47 +4192,23 @@ paths: $ref: '#/components/schemas/PaginatedResponse' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Agents - summary: List all session(s) of a given agent. - description: >- - List all session(s) of a given agent. - - :param agent_id: The ID of the agent to list sessions for. - :param start_index: The index to start the pagination from. - :param limit: The number of sessions to return. - :returns: A PaginatedResponse. - parameters: - - name: agent_id - description: >- - The ID of the agent to list sessions for. - required: true - schema: - type: string - in: path - - name: start_index - description: The index to start the pagination from. - required: false - schema: - type: integer - in: query - - name: limit - description: The number of sessions to return. - required: false - schema: - type: integer - in: query - deprecated: false + description: Default Response /v1alpha/eval/benchmarks: get: + tags: + - V1Alpha + summary: List Benchmarks + description: Response-only endpoint for proper schema generation. + operationId: list_benchmarks_v1alpha_eval_benchmarks_get responses: '200': description: A ListBenchmarksResponse. @@ -4340,60 +4218,106 @@ paths: $ref: '#/components/schemas/ListBenchmarksResponse' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Benchmarks - summary: List all benchmarks. - description: >- - List all benchmarks. - - :returns: A ListBenchmarksResponse. - parameters: [] - deprecated: false + description: Default Response post: + tags: + - V1Alpha + summary: Register Benchmark + description: Generic endpoint - this would be replaced with actual implementation. + operationId: register_benchmark_v1alpha_eval_benchmarks_post + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs responses: '200': - description: OK + description: Successful Response + content: + application/json: + schema: {} '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Benchmarks - summary: Register a benchmark. - description: >- - Register a benchmark. - - :param benchmark_id: The ID of the benchmark to register. - :param dataset_id: The ID of the dataset to use for the benchmark. - :param scoring_functions: The scoring functions to use for the benchmark. - :param provider_benchmark_id: The ID of the provider benchmark to - use for the benchmark. - :param provider_id: The ID of the provider to use for the benchmark. - :param metadata: The metadata to use for the benchmark. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RegisterBenchmarkRequest' - required: true - deprecated: false + description: Default Response /v1alpha/eval/benchmarks/{benchmark_id}: + delete: + tags: + - V1Alpha + summary: Unregister Benchmark + description: Generic endpoint - this would be replaced with actual implementation. + operationId: unregister_benchmark_v1alpha_eval_benchmarks__benchmark_id__delete + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response get: + tags: + - V1Alpha + summary: Get Benchmark + description: Query endpoint for proper schema generation. + operationId: get_benchmark_v1alpha_eval_benchmarks__benchmark_id__get + parameters: + - name: benchmark_id + in: path + required: true + schema: + type: string + title: Benchmark Id responses: '200': description: A Benchmark. @@ -4403,151 +4327,161 @@ paths: $ref: '#/components/schemas/Benchmark' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Benchmarks - summary: Get a benchmark by its ID. - description: >- - Get a benchmark by its ID. - - :param benchmark_id: The ID of the benchmark to get. - :returns: A Benchmark. - parameters: - - name: benchmark_id - description: The ID of the benchmark to get. - required: true - schema: - type: string - in: path - deprecated: false - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Benchmarks - summary: Unregister a benchmark. - description: >- - Unregister a benchmark. - - :param benchmark_id: The ID of the benchmark to unregister. - parameters: - - name: benchmark_id - description: The ID of the benchmark to unregister. - required: true - schema: - type: string - in: path - deprecated: false + description: Default Response /v1alpha/eval/benchmarks/{benchmark_id}/evaluations: post: + tags: + - V1Alpha + summary: Evaluate Rows + description: Typed endpoint for proper schema generation. + operationId: evaluate_rows_v1alpha_eval_benchmarks__benchmark_id__evaluations_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BenchmarkConfig' + required: true responses: '200': - description: >- - EvaluateResponse object containing generations and scores. + description: EvaluateResponse object containing generations and scores. content: application/json: schema: $ref: '#/components/schemas/EvaluateResponse' '400': + description: Bad Request $ref: '#/components/responses/BadRequest400' '429': - $ref: >- - #/components/responses/TooManyRequests429 + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: >- - #/components/responses/InternalServerError500 + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: + description: Default Response $ref: '#/components/responses/DefaultError' - tags: - - Eval - summary: Evaluate a list of rows on a benchmark. - description: >- - Evaluate a list of rows on a benchmark. - - :param benchmark_id: The ID of the benchmark to run the evaluation on. - :param input_rows: The rows to evaluate. - :param scoring_functions: The scoring functions to use for the evaluation. - :param benchmark_config: The configuration for the benchmark. - :returns: EvaluateResponse object containing generations and scores. parameters: - - name: benchmark_id - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - in: path + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs: + post: + tags: + - V1Alpha + summary: Run Eval + description: Typed endpoint for proper schema generation. + operationId: run_eval_v1alpha_eval_benchmarks__benchmark_id__jobs_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/EvaluateRowsRequest' + $ref: '#/components/schemas/BenchmarkConfig' required: true - deprecated: false - /v1alpha/eval/benchmarks/{benchmark_id}/jobs: - post: responses: '200': - description: >- - The job that was created to run the evaluation. + description: The job that was created to run the evaluation. content: application/json: schema: $ref: '#/components/schemas/Job' '400': + description: Bad Request $ref: '#/components/responses/BadRequest400' '429': - $ref: >- - #/components/responses/TooManyRequests429 + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: >- - #/components/responses/InternalServerError500 + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' + /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: + delete: + tags: + - V1Alpha + summary: Job Cancel + description: Generic endpoint - this would be replaced with actual implementation. + operationId: job_cancel_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__delete + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: benchmark_id + in: path + required: true + schema: + type: string + description: 'Path parameter: benchmark_id' + - name: job_id + in: path + required: true + schema: + type: string + description: 'Path parameter: job_id' + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Eval - summary: Run an evaluation on a benchmark. - description: >- - Run an evaluation on a benchmark. - - :param benchmark_id: The ID of the benchmark to run the evaluation on. - :param benchmark_config: The configuration for the benchmark. - :returns: The job that was created to run the evaluation. - parameters: - - name: benchmark_id - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - in: path - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RunEvalRequest' - required: true - deprecated: false - /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}: + description: Default Response get: + tags: + - V1Alpha + summary: Job Status + description: Query endpoint for proper schema generation. + operationId: job_status_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__get + parameters: + - name: benchmark_id + in: path + required: true + schema: + type: string + title: Benchmark Id + - name: job_id + in: path + required: true + schema: + type: string + title: Job Id responses: '200': description: The status of the evaluation job. @@ -4557,77 +4491,36 @@ paths: $ref: '#/components/schemas/Job' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Eval - summary: Get the status of a job. - description: >- - Get the status of a job. - - :param benchmark_id: The ID of the benchmark to run the evaluation on. - :param job_id: The ID of the job to get the status of. - :returns: The status of the evaluation job. - parameters: - - name: benchmark_id - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - in: path - - name: job_id - description: The ID of the job to get the status of. - required: true - schema: - type: string - in: path - deprecated: false - delete: - responses: - '200': - description: OK - '400': - $ref: '#/components/responses/BadRequest400' - '429': - $ref: >- - #/components/responses/TooManyRequests429 - '500': - $ref: >- - #/components/responses/InternalServerError500 - default: - $ref: '#/components/responses/DefaultError' - tags: - - Eval - summary: Cancel a job. - description: >- - Cancel a job. - - :param benchmark_id: The ID of the benchmark to run the evaluation on. - :param job_id: The ID of the job to cancel. - parameters: - - name: benchmark_id - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - in: path - - name: job_id - description: The ID of the job to cancel. - required: true - schema: - type: string - in: path - deprecated: false + description: Default Response /v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result: get: + tags: + - V1Alpha + summary: Job Result + description: Query endpoint for proper schema generation. + operationId: job_result_v1alpha_eval_benchmarks__benchmark_id__jobs__job_id__result_get + parameters: + - name: benchmark_id + in: path + required: true + schema: + type: string + title: Benchmark Id + - name: job_id + in: path + required: true + schema: + type: string + title: Job Id responses: '200': description: The result of the job. @@ -4637,85 +4530,62 @@ paths: $ref: '#/components/schemas/EvaluateResponse' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - Eval - summary: Get the result of a job. - description: >- - Get the result of a job. - - :param benchmark_id: The ID of the benchmark to run the evaluation on. - :param job_id: The ID of the job to get the result of. - :returns: The result of the job. - parameters: - - name: benchmark_id - description: >- - The ID of the benchmark to run the evaluation on. - required: true - schema: - type: string - in: path - - name: job_id - description: The ID of the job to get the result of. - required: true - schema: - type: string - in: path - deprecated: false + description: Default Response /v1alpha/inference/rerank: post: + tags: + - V1Alpha + summary: Rerank + description: Typed endpoint for proper schema generation. + operationId: rerank_v1alpha_inference_rerank_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_inference_rerank_Request' + required: true responses: '200': - description: >- - RerankResponse with indices sorted by relevance score (descending). + description: RerankResponse with indices sorted by relevance score (descending). content: application/json: schema: $ref: '#/components/schemas/RerankResponse' '400': + description: Bad Request $ref: '#/components/responses/BadRequest400' '429': - $ref: >- - #/components/responses/TooManyRequests429 + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: >- - #/components/responses/InternalServerError500 + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: + description: Default Response $ref: '#/components/responses/DefaultError' - tags: - - Inference - summary: >- - Rerank a list of documents based on their relevance to a query. - description: >- - Rerank a list of documents based on their relevance to a query. - - :param model: The identifier of the reranking model to use. - :param query: The search query to rank items against. Can be a string, - text content part, or image content part. The input must not exceed the model's - max input token length. - :param items: List of items to rerank. Each item can be a string, - text content part, or image content part. Each input must not exceed the model's - max input token length. - :param max_num_results: (Optional) Maximum number of results to return. - Default: returns all. - :returns: RerankResponse with indices sorted by relevance score (descending). - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RerankRequest' - required: true - deprecated: false /v1alpha/post-training/job/artifacts: get: + tags: + - V1Alpha + summary: Get Training Job Artifacts + description: Query endpoint for proper schema generation. + operationId: get_training_job_artifacts_v1alpha_post_training_job_artifacts_get + parameters: + - name: job_uuid + in: query + required: true + schema: + type: string + title: Job Uuid responses: '200': description: A PostTrainingJobArtifactsResponse. @@ -4725,63 +4595,66 @@ paths: $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Get the artifacts of a training job. - description: >- - Get the artifacts of a training job. - - :param job_uuid: The UUID of the job to get the artifacts of. - :returns: A PostTrainingJobArtifactsResponse. - parameters: - - name: job_uuid - description: >- - The UUID of the job to get the artifacts of. - required: true - schema: - type: string - in: query - deprecated: false + description: Default Response /v1alpha/post-training/job/cancel: post: + tags: + - V1Alpha + summary: Cancel Training Job + description: Generic endpoint - this would be replaced with actual implementation. + operationId: cancel_training_job_v1alpha_post_training_job_cancel_post + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs responses: '200': - description: OK + description: Successful Response + content: + application/json: + schema: {} '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Cancel a training job. - description: >- - Cancel a training job. - - :param job_uuid: The UUID of the job to cancel. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CancelTrainingJobRequest' - required: true - deprecated: false + description: Default Response /v1alpha/post-training/job/status: get: + tags: + - V1Alpha + summary: Get Training Job Status + description: Query endpoint for proper schema generation. + operationId: get_training_job_status_v1alpha_post_training_job_status_get + parameters: + - name: job_uuid + in: query + required: true + schema: + type: string + title: Job Uuid responses: '200': description: A PostTrainingJobStatusResponse. @@ -4791,33 +4664,23 @@ paths: $ref: '#/components/schemas/PostTrainingJobStatusResponse' '400': $ref: '#/components/responses/BadRequest400' + description: Bad Request '429': - $ref: >- - #/components/responses/TooManyRequests429 + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests '500': - $ref: >- - #/components/responses/InternalServerError500 + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Get the status of a training job. - description: >- - Get the status of a training job. - - :param job_uuid: The UUID of the job to get the status of. - :returns: A PostTrainingJobStatusResponse. - parameters: - - name: job_uuid - description: >- - The UUID of the job to get the status of. - required: true - schema: - type: string - in: query - deprecated: false + description: Default Response /v1alpha/post-training/jobs: get: + tags: + - V1Alpha + summary: Get Training Jobs + description: Response-only endpoint for proper schema generation. + operationId: get_training_jobs_v1alpha_post_training_jobs_get responses: '200': description: A ListPostTrainingJobsResponse. @@ -4826,26 +4689,30 @@ paths: schema: $ref: '#/components/schemas/ListPostTrainingJobsResponse' '400': + description: Bad Request $ref: '#/components/responses/BadRequest400' '429': - $ref: >- - #/components/responses/TooManyRequests429 + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: >- - #/components/responses/InternalServerError500 + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: + description: Default Response $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Get all training jobs. - description: >- - Get all training jobs. - - :returns: A ListPostTrainingJobsResponse. - parameters: [] - deprecated: false /v1alpha/post-training/preference-optimize: post: + tags: + - V1Alpha + summary: Preference Optimize + description: Typed endpoint for proper schema generation. + operationId: preference_optimize_v1alpha_post_training_preference_optimize_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DPOAlignmentConfig' + required: true responses: '200': description: A PostTrainingJob. @@ -4854,38 +4721,30 @@ paths: schema: $ref: '#/components/schemas/PostTrainingJob' '400': + description: Bad Request $ref: '#/components/responses/BadRequest400' '429': - $ref: >- - #/components/responses/TooManyRequests429 + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: >- - #/components/responses/InternalServerError500 + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' default: + description: Default Response $ref: '#/components/responses/DefaultError' - tags: - - PostTraining (Coming Soon) - summary: Run preference optimization of a model. - description: >- - Run preference optimization of a model. - - :param job_uuid: The UUID of the job to create. - :param finetuned_model: The model to fine-tune. - :param algorithm_config: The algorithm configuration. - :param training_config: The training configuration. - :param hyperparam_search_config: The hyperparam search configuration. - :param logger_config: The logger configuration. - :returns: A PostTrainingJob. - parameters: [] - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PreferenceOptimizeRequest' - required: true - deprecated: false /v1alpha/post-training/supervised-fine-tune: post: + tags: + - V1Alpha + summary: Supervised Fine Tune + description: Typed endpoint for proper schema generation. + operationId: supervised_fine_tune_v1alpha_post_training_supervised_fine_tune_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TrainingConfig' + required: true responses: '200': description: A PostTrainingJob. @@ -4894,55 +4753,8440 @@ paths: schema: $ref: '#/components/schemas/PostTrainingJob' '400': + description: Bad Request $ref: '#/components/responses/BadRequest400' '429': - $ref: >- - #/components/responses/TooManyRequests429 + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' '500': - $ref: >- - #/components/responses/InternalServerError500 + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/batches: + get: + tags: + - V1 + summary: List Batches + description: Query endpoint for proper schema generation. + operationId: list_batches_v1_batches_get + parameters: + - name: after + in: query + required: true + schema: + type: string + title: After + - name: limit + in: query + required: false + schema: + type: integer + default: 20 + title: Limit + responses: + '200': + description: A list of batch objects. + content: + application/json: + schema: + $ref: '#/components/schemas/ListBatchesResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error default: $ref: '#/components/responses/DefaultError' + description: Default Response + post: tags: - - PostTraining (Coming Soon) - summary: Run supervised fine-tuning of a model. - description: >- - Run supervised fine-tuning of a model. - - :param job_uuid: The UUID of the job to create. - :param training_config: The training configuration. - :param hyperparam_search_config: The hyperparam search configuration. - :param logger_config: The logger configuration. - :param model: The model to fine-tune. - :param checkpoint_dir: The directory to save checkpoint(s) to. - :param algorithm_config: The algorithm configuration. - :returns: A PostTrainingJob. - parameters: [] + - V1 + summary: Create Batch + description: Typed endpoint for proper schema generation. + operationId: create_batch_v1_batches_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_batches_Request' + responses: + '200': + description: The created batch object. + content: + application/json: + schema: + $ref: '#/components/schemas/Batch' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/batches/{batch_id}: + get: + tags: + - V1 + summary: Retrieve Batch + description: Query endpoint for proper schema generation. + operationId: retrieve_batch_v1_batches__batch_id__get + parameters: + - name: batch_id + in: path + required: true + schema: + type: string + title: Batch Id + responses: + '200': + description: The batch object. + content: + application/json: + schema: + $ref: '#/components/schemas/Batch' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/batches/{batch_id}/cancel: + post: + tags: + - V1 + summary: Cancel Batch + description: Typed endpoint for proper schema generation. + operationId: cancel_batch_v1_batches__batch_id__cancel_post requestBody: content: application/json: schema: - $ref: '#/components/schemas/SupervisedFineTuneRequest' + $ref: '#/components/schemas/_batches_batch_id_cancel_Request' required: true - deprecated: false -jsonSchemaDialect: >- - https://json-schema.org/draft/2020-12/schema + responses: + '200': + description: The updated batch object. + content: + application/json: + schema: + $ref: '#/components/schemas/Batch' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: batch_id + in: path + required: true + schema: + type: string + description: 'Path parameter: batch_id' + /v1/chat/completions: + get: + tags: + - V1 + summary: List Chat Completions + description: Query endpoint for proper schema generation. + operationId: list_chat_completions_v1_chat_completions_get + parameters: + - name: after + in: query + required: true + schema: + type: string + title: After + - name: model + in: query + required: true + schema: + type: string + title: Model + - name: limit + in: query + required: false + schema: + type: integer + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + $ref: '#/components/schemas/Order' + default: desc + responses: + '200': + description: A ListOpenAIChatCompletionResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListOpenAIChatCompletionResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Openai Chat Completion + description: Typed endpoint for proper schema generation. + operationId: openai_chat_completion_v1_chat_completions_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIChatCompletionRequestWithExtraBody' + responses: + '200': + description: An OpenAIChatCompletion. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIChatCompletion' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/chat/completions/{completion_id}: + get: + tags: + - V1 + summary: Get Chat Completion + description: Query endpoint for proper schema generation. + operationId: get_chat_completion_v1_chat_completions__completion_id__get + parameters: + - name: completion_id + in: path + required: true + schema: + type: string + title: Completion Id + responses: + '200': + description: A OpenAICompletionWithInputMessages. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAICompletionWithInputMessages' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/completions: + post: + tags: + - V1 + summary: Openai Completion + description: Typed endpoint for proper schema generation. + operationId: openai_completion_v1_completions_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAICompletionRequestWithExtraBody' + required: true + responses: + '200': + description: An OpenAICompletion. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAICompletion' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/conversations: + post: + tags: + - V1 + summary: Create Conversation + description: Typed endpoint for proper schema generation. + operationId: create_conversation_v1_conversations_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_conversations_Request' + required: true + responses: + '200': + description: The created conversation object. + content: + application/json: + schema: + $ref: '#/components/schemas/Conversation' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/conversations/{conversation_id}: + delete: + tags: + - V1 + summary: Openai Delete Conversation + description: Query endpoint for proper schema generation. + operationId: openai_delete_conversation_v1_conversations__conversation_id__delete + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + title: Conversation Id + responses: + '200': + description: The deleted conversation resource. + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationDeletedResource' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Get Conversation + description: Query endpoint for proper schema generation. + operationId: get_conversation_v1_conversations__conversation_id__get + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + title: Conversation Id + responses: + '200': + description: The conversation object. + content: + application/json: + schema: + $ref: '#/components/schemas/Conversation' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Update Conversation + description: Typed endpoint for proper schema generation. + operationId: update_conversation_v1_conversations__conversation_id__post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_conversations_conversation_id_Request' + responses: + '200': + description: The updated conversation object. + content: + application/json: + schema: + $ref: '#/components/schemas/Conversation' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + /v1/conversations/{conversation_id}/items: + get: + tags: + - V1 + summary: List Items + description: Query endpoint for proper schema generation. + operationId: list_items_v1_conversations__conversation_id__items_get + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + title: Conversation Id + - name: after + in: query + required: true + schema: + type: string + title: After + - name: include + in: query + required: true + schema: + $ref: '#/components/schemas/ConversationItemInclude' + - name: limit + in: query + required: true + schema: + type: integer + title: Limit + - name: order + in: query + required: true + schema: + type: string + title: Order + responses: + '200': + description: List of conversation items. + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationItemList' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Add Items + description: Typed endpoint for proper schema generation. + operationId: add_items_v1_conversations__conversation_id__items_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_conversations_conversation_id_items_Request' + responses: + '200': + description: List of created items. + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationItemList' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + description: 'Path parameter: conversation_id' + /v1/conversations/{conversation_id}/items/{item_id}: + delete: + tags: + - V1 + summary: Openai Delete Conversation Item + description: Query endpoint for proper schema generation. + operationId: openai_delete_conversation_item_v1_conversations__conversation_id__items__item_id__delete + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + title: Conversation Id + - name: item_id + in: path + required: true + schema: + type: string + title: Item Id + responses: + '200': + description: The deleted item resource. + content: + application/json: + schema: + $ref: '#/components/schemas/ConversationItemDeletedResource' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Retrieve + description: Query endpoint for proper schema generation. + operationId: retrieve_v1_conversations__conversation_id__items__item_id__get + parameters: + - name: conversation_id + in: path + required: true + schema: + type: string + title: Conversation Id + - name: item_id + in: path + required: true + schema: + type: string + title: Item Id + responses: + '200': + description: The conversation item. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIResponseMessage' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/embeddings: + post: + tags: + - V1 + summary: Openai Embeddings + description: Typed endpoint for proper schema generation. + operationId: openai_embeddings_v1_embeddings_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIEmbeddingsRequestWithExtraBody' + required: true + responses: + '200': + description: An OpenAIEmbeddingsResponse containing the embeddings. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIEmbeddingsResponse' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/files: + get: + tags: + - V1 + summary: Openai List Files + description: Query endpoint for proper schema generation. + operationId: openai_list_files_v1_files_get + parameters: + - name: after + in: query + required: true + schema: + type: string + title: After + - name: purpose + in: query + required: true + schema: + $ref: '#/components/schemas/OpenAIFilePurpose' + - name: limit + in: query + required: false + schema: + type: integer + default: 10000 + title: Limit + - name: order + in: query + required: false + schema: + $ref: '#/components/schemas/Order' + default: desc + responses: + '200': + description: An ListOpenAIFileResponse containing the list of files. + content: + application/json: + schema: + $ref: '#/components/schemas/ListOpenAIFileResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Openai Upload File + description: Response-only endpoint for proper schema generation. + operationId: openai_upload_file_v1_files_post + responses: + '200': + description: An OpenAIFileObject representing the uploaded file. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIFileObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/files/{file_id}: + delete: + tags: + - V1 + summary: Openai Delete File + description: Query endpoint for proper schema generation. + operationId: openai_delete_file_v1_files__file_id__delete + parameters: + - name: file_id + in: path + required: true + schema: + type: string + title: File Id + responses: + '200': + description: An OpenAIFileDeleteResponse indicating successful deletion. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIFileDeleteResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Openai Retrieve File + description: Query endpoint for proper schema generation. + operationId: openai_retrieve_file_v1_files__file_id__get + parameters: + - name: file_id + in: path + required: true + schema: + type: string + title: File Id + responses: + '200': + description: An OpenAIFileObject containing file information. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIFileObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/files/{file_id}/content: + get: + tags: + - V1 + summary: Openai Retrieve File Content + description: Generic endpoint - this would be replaced with actual implementation. + operationId: openai_retrieve_file_content_v1_files__file_id__content_get + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' + responses: + '200': + description: The raw file content as a binary response. + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/health: + get: + tags: + - V1 + summary: Health + description: Response-only endpoint for proper schema generation. + operationId: health_v1_health_get + responses: + '200': + description: Health information indicating if the service is operational. + content: + application/json: + schema: + $ref: '#/components/schemas/HealthInfo' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/inspect/routes: + get: + tags: + - V1 + summary: List Routes + description: Response-only endpoint for proper schema generation. + operationId: list_routes_v1_inspect_routes_get + responses: + '200': + description: Response containing information about all available routes. + content: + application/json: + schema: + $ref: '#/components/schemas/ListRoutesResponse' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/models: + get: + tags: + - V1 + summary: List Models + description: Response-only endpoint for proper schema generation. + operationId: list_models_v1_models_get + responses: + '200': + description: A ListModelsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListModelsResponse' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + post: + tags: + - V1 + summary: Register Model + description: Typed endpoint for proper schema generation. + operationId: register_model_v1_models_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_models_Request' + required: true + responses: + '200': + description: A Model. + content: + application/json: + schema: + $ref: '#/components/schemas/Model' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/models/{model_id}: + delete: + tags: + - V1 + summary: Unregister Model + description: Generic endpoint - this would be replaced with actual implementation. + operationId: unregister_model_v1_models__model_id__delete + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: model_id + in: path + required: true + schema: + type: string + description: 'Path parameter: model_id' + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Get Model + description: Query endpoint for proper schema generation. + operationId: get_model_v1_models__model_id__get + parameters: + - name: model_id + in: path + required: true + schema: + type: string + title: Model Id + responses: + '200': + description: A Model. + content: + application/json: + schema: + $ref: '#/components/schemas/Model' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/moderations: + post: + tags: + - V1 + summary: Run Moderation + description: Typed endpoint for proper schema generation. + operationId: run_moderation_v1_moderations_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_moderations_Request' + required: true + responses: + '200': + description: A moderation object. + content: + application/json: + schema: + $ref: '#/components/schemas/ModerationObject' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/prompts: + get: + tags: + - V1 + summary: List Prompts + description: Response-only endpoint for proper schema generation. + operationId: list_prompts_v1_prompts_get + responses: + '200': + description: A ListPromptsResponse containing all prompts. + content: + application/json: + schema: + $ref: '#/components/schemas/ListPromptsResponse' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + post: + tags: + - V1 + summary: Create Prompt + description: Typed endpoint for proper schema generation. + operationId: create_prompt_v1_prompts_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_prompts_Request' + required: true + responses: + '200': + description: The created Prompt resource. + content: + application/json: + schema: + $ref: '#/components/schemas/Prompt' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/prompts/{prompt_id}: + delete: + tags: + - V1 + summary: Delete Prompt + description: Generic endpoint - this would be replaced with actual implementation. + operationId: delete_prompt_v1_prompts__prompt_id__delete + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - &id001 + name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Get Prompt + description: Query endpoint for proper schema generation. + operationId: get_prompt_v1_prompts__prompt_id__get + parameters: + - name: prompt_id + in: path + required: true + schema: + type: string + title: Prompt Id + - name: version + in: query + required: true + schema: + type: integer + title: Version + responses: + '200': + description: A Prompt resource. + content: + application/json: + schema: + $ref: '#/components/schemas/Prompt' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Update Prompt + description: Typed endpoint for proper schema generation. + operationId: update_prompt_v1_prompts__prompt_id__post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_prompts_prompt_id_Request' + responses: + '200': + description: The updated Prompt resource with incremented version. + content: + application/json: + schema: + $ref: '#/components/schemas/Prompt' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + parameters: + - *id001 + /v1/prompts/{prompt_id}/set-default-version: + post: + tags: + - V1 + summary: Set Default Version + description: Typed endpoint for proper schema generation. + operationId: set_default_version_v1_prompts__prompt_id__set_default_version_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_prompts_prompt_id_set_default_version_Request' + required: true + responses: + '200': + description: The prompt with the specified version now set as default. + content: + application/json: + schema: + $ref: '#/components/schemas/Prompt' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: prompt_id + in: path + required: true + schema: + type: string + description: 'Path parameter: prompt_id' + /v1/prompts/{prompt_id}/versions: + get: + tags: + - V1 + summary: List Prompt Versions + description: Query endpoint for proper schema generation. + operationId: list_prompt_versions_v1_prompts__prompt_id__versions_get + parameters: + - name: prompt_id + in: path + required: true + schema: + type: string + title: Prompt Id + responses: + '200': + description: A ListPromptsResponse containing all versions of the prompt. + content: + application/json: + schema: + $ref: '#/components/schemas/ListPromptsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/providers: + get: + tags: + - V1 + summary: List Providers + description: Response-only endpoint for proper schema generation. + operationId: list_providers_v1_providers_get + responses: + '200': + description: A ListProvidersResponse containing information about all providers. + content: + application/json: + schema: + $ref: '#/components/schemas/ListProvidersResponse' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/providers/{provider_id}: + get: + tags: + - V1 + summary: Inspect Provider + description: Query endpoint for proper schema generation. + operationId: inspect_provider_v1_providers__provider_id__get + parameters: + - name: provider_id + in: path + required: true + schema: + type: string + title: Provider Id + responses: + '200': + description: A ProviderInfo object containing the provider's details. + content: + application/json: + schema: + $ref: '#/components/schemas/ProviderInfo' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/responses: + get: + tags: + - V1 + summary: List Openai Responses + description: Query endpoint for proper schema generation. + operationId: list_openai_responses_v1_responses_get + parameters: + - name: after + in: query + required: true + schema: + type: string + title: After + - name: model + in: query + required: true + schema: + type: string + title: Model + - name: limit + in: query + required: false + schema: + type: integer + default: 50 + title: Limit + - name: order + in: query + required: false + schema: + $ref: '#/components/schemas/Order' + default: desc + responses: + '200': + description: A ListOpenAIResponseObject. + content: + application/json: + schema: + $ref: '#/components/schemas/ListOpenAIResponseObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Create Openai Response + description: Typed endpoint for proper schema generation. + operationId: create_openai_response_v1_responses_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_responses_Request' + responses: + '200': + description: An OpenAIResponseObject. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIResponseObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/responses/{response_id}: + delete: + tags: + - V1 + summary: Delete Openai Response + description: Query endpoint for proper schema generation. + operationId: delete_openai_response_v1_responses__response_id__delete + parameters: + - name: response_id + in: path + required: true + schema: + type: string + title: Response Id + responses: + '200': + description: An OpenAIDeleteResponseObject + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIDeleteResponseObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Get Openai Response + description: Query endpoint for proper schema generation. + operationId: get_openai_response_v1_responses__response_id__get + parameters: + - name: response_id + in: path + required: true + schema: + type: string + title: Response Id + responses: + '200': + description: An OpenAIResponseObject. + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAIResponseObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/responses/{response_id}/input_items: + get: + tags: + - V1 + summary: List Openai Response Input Items + description: Query endpoint for proper schema generation. + operationId: list_openai_response_input_items_v1_responses__response_id__input_items_get + parameters: + - name: response_id + in: path + required: true + schema: + type: string + title: Response Id + - name: after + in: query + required: true + schema: + type: string + title: After + - name: before + in: query + required: true + schema: + type: string + title: Before + - name: include + in: query + required: true + schema: + type: string + title: Include + - name: limit + in: query + required: false + schema: + type: integer + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + $ref: '#/components/schemas/Order' + default: desc + responses: + '200': + description: An ListOpenAIResponseInputItem. + content: + application/json: + schema: + $ref: '#/components/schemas/ListOpenAIResponseInputItem' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/safety/run-shield: + post: + tags: + - V1 + summary: Run Shield + description: Typed endpoint for proper schema generation. + operationId: run_shield_v1_safety_run_shield_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_safety_run_shield_Request' + required: true + responses: + '200': + description: A RunShieldResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/RunShieldResponse' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/scoring-functions: + get: + tags: + - V1 + summary: List Scoring Functions + description: Response-only endpoint for proper schema generation. + operationId: list_scoring_functions_v1_scoring_functions_get + responses: + '200': + description: A ListScoringFunctionsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListScoringFunctionsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Register Scoring Function + description: Generic endpoint - this would be replaced with actual implementation. + operationId: register_scoring_function_v1_scoring_functions_post + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/scoring-functions/{scoring_fn_id}: + delete: + tags: + - V1 + summary: Unregister Scoring Function + description: Generic endpoint - this would be replaced with actual implementation. + operationId: unregister_scoring_function_v1_scoring_functions__scoring_fn_id__delete + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: scoring_fn_id + in: path + required: true + schema: + type: string + description: 'Path parameter: scoring_fn_id' + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Get Scoring Function + description: Query endpoint for proper schema generation. + operationId: get_scoring_function_v1_scoring_functions__scoring_fn_id__get + parameters: + - name: scoring_fn_id + in: path + required: true + schema: + type: string + title: Scoring Fn Id + responses: + '200': + description: A ScoringFn. + content: + application/json: + schema: + $ref: '#/components/schemas/ScoringFn' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/scoring/score: + post: + tags: + - V1 + summary: Score + description: Typed endpoint for proper schema generation. + operationId: score_v1_scoring_score_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_scoring_score_Request' + required: true + responses: + '200': + description: A ScoreResponse object containing rows and aggregated results. + content: + application/json: + schema: + $ref: '#/components/schemas/ScoreResponse' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/scoring/score-batch: + post: + tags: + - V1 + summary: Score Batch + description: Typed endpoint for proper schema generation. + operationId: score_batch_v1_scoring_score_batch_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_scoring_score_batch_Request' + required: true + responses: + '200': + description: A ScoreBatchResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ScoreBatchResponse' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/shields: + get: + tags: + - V1 + summary: List Shields + description: Response-only endpoint for proper schema generation. + operationId: list_shields_v1_shields_get + responses: + '200': + description: A ListShieldsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListShieldsResponse' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + post: + tags: + - V1 + summary: Register Shield + description: Typed endpoint for proper schema generation. + operationId: register_shield_v1_shields_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_shields_Request' + required: true + responses: + '200': + description: A Shield. + content: + application/json: + schema: + $ref: '#/components/schemas/Shield' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/shields/{identifier}: + delete: + tags: + - V1 + summary: Unregister Shield + description: Generic endpoint - this would be replaced with actual implementation. + operationId: unregister_shield_v1_shields__identifier__delete + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: identifier + in: path + required: true + schema: + type: string + description: 'Path parameter: identifier' + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Get Shield + description: Query endpoint for proper schema generation. + operationId: get_shield_v1_shields__identifier__get + parameters: + - name: identifier + in: path + required: true + schema: + type: string + title: Identifier + responses: + '200': + description: A Shield. + content: + application/json: + schema: + $ref: '#/components/schemas/Shield' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/tool-runtime/invoke: + post: + tags: + - V1 + summary: Invoke Tool + description: Typed endpoint for proper schema generation. + operationId: invoke_tool_v1_tool_runtime_invoke_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_tool_runtime_invoke_Request' + required: true + responses: + '200': + description: A ToolInvocationResult. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolInvocationResult' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/tool-runtime/list-tools: + get: + tags: + - V1 + summary: List Runtime Tools + description: Query endpoint for proper schema generation. + operationId: list_runtime_tools_v1_tool_runtime_list_tools_get + parameters: + - name: tool_group_id + in: query + required: true + schema: + type: string + title: Tool Group Id + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/URL' + responses: + '200': + description: A ListToolDefsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListToolDefsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/tool-runtime/rag-tool/insert: + post: + tags: + - V1 + summary: Rag Tool.Insert + description: Generic endpoint - this would be replaced with actual implementation. + operationId: rag_tool_insert_v1_tool_runtime_rag_tool_insert_post + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/tool-runtime/rag-tool/query: + post: + tags: + - V1 + summary: Rag Tool.Query + description: Typed endpoint for proper schema generation. + operationId: rag_tool_query_v1_tool_runtime_rag_tool_query_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_tool_runtime_rag_tool_query_Request' + required: true + responses: + '200': + description: RAGQueryResult containing the retrieved content and metadata + content: + application/json: + schema: + $ref: '#/components/schemas/RAGQueryResult' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/toolgroups: + get: + tags: + - V1 + summary: List Tool Groups + description: Response-only endpoint for proper schema generation. + operationId: list_tool_groups_v1_toolgroups_get + responses: + '200': + description: A ListToolGroupsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListToolGroupsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Register Tool Group + description: Generic endpoint - this would be replaced with actual implementation. + operationId: register_tool_group_v1_toolgroups_post + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/toolgroups/{toolgroup_id}: + delete: + tags: + - V1 + summary: Unregister Toolgroup + description: Generic endpoint - this would be replaced with actual implementation. + operationId: unregister_toolgroup_v1_toolgroups__toolgroup_id__delete + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + - name: toolgroup_id + in: path + required: true + schema: + type: string + description: 'Path parameter: toolgroup_id' + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Get Tool Group + description: Query endpoint for proper schema generation. + operationId: get_tool_group_v1_toolgroups__toolgroup_id__get + parameters: + - name: toolgroup_id + in: path + required: true + schema: + type: string + title: Toolgroup Id + responses: + '200': + description: A ToolGroup. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolGroup' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/tools: + get: + tags: + - V1 + summary: List Tools + description: Query endpoint for proper schema generation. + operationId: list_tools_v1_tools_get + parameters: + - name: toolgroup_id + in: query + required: true + schema: + type: string + title: Toolgroup Id + responses: + '200': + description: A ListToolDefsResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/ListToolDefsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/tools/{tool_name}: + get: + tags: + - V1 + summary: Get Tool + description: Query endpoint for proper schema generation. + operationId: get_tool_v1_tools__tool_name__get + parameters: + - name: tool_name + in: path + required: true + schema: + type: string + title: Tool Name + responses: + '200': + description: A ToolDef. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolDef' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/vector-io/insert: + post: + tags: + - V1 + summary: Insert Chunks + description: Generic endpoint - this would be replaced with actual implementation. + operationId: insert_chunks_v1_vector_io_insert_post + parameters: + - name: args + in: query + required: true + schema: + title: Args + - name: kwargs + in: query + required: true + schema: + title: Kwargs + responses: + '200': + description: Successful Response + content: + application/json: + schema: {} + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/vector-io/query: + post: + tags: + - V1 + summary: Query Chunks + description: Typed endpoint for proper schema generation. + operationId: query_chunks_v1_vector_io_query_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_vector_io_query_Request' + required: true + responses: + '200': + description: A QueryChunksResponse. + content: + application/json: + schema: + $ref: '#/components/schemas/QueryChunksResponse' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + /v1/vector_stores: + get: + tags: + - V1 + summary: Openai List Vector Stores + description: Query endpoint for proper schema generation. + operationId: openai_list_vector_stores_v1_vector_stores_get + parameters: + - name: after + in: query + required: true + schema: + type: string + title: After + - name: before + in: query + required: true + schema: + type: string + title: Before + - name: limit + in: query + required: false + schema: + type: integer + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + type: string + default: desc + title: Order + responses: + '200': + description: A VectorStoreListResponse containing the list of vector stores. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreListResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Openai Create Vector Store + description: Typed endpoint for proper schema generation. + operationId: openai_create_vector_store_v1_vector_stores_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAICreateVectorStoreRequestWithExtraBody' + responses: + '200': + description: A VectorStoreObject representing the created vector store. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/vector_stores/{vector_store_id}: + delete: + tags: + - V1 + summary: Openai Delete Vector Store + description: Query endpoint for proper schema generation. + operationId: openai_delete_vector_store_v1_vector_stores__vector_store_id__delete + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + title: Vector Store Id + responses: + '200': + description: A VectorStoreDeleteResponse indicating the deletion status. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreDeleteResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Openai Retrieve Vector Store + description: Query endpoint for proper schema generation. + operationId: openai_retrieve_vector_store_v1_vector_stores__vector_store_id__get + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + title: Vector Store Id + responses: + '200': + description: A VectorStoreObject representing the vector store. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Openai Update Vector Store + description: Typed endpoint for proper schema generation. + operationId: openai_update_vector_store_v1_vector_stores__vector_store_id__post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_vector_stores_vector_store_id_Request' + responses: + '200': + description: A VectorStoreObject representing the updated vector store. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + /v1/vector_stores/{vector_store_id}/file_batches: + post: + tags: + - V1 + summary: Openai Create Vector Store File Batch + description: Typed endpoint for proper schema generation. + operationId: openai_create_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAICreateVectorStoreFileBatchRequestWithExtraBody' + required: true + responses: + '200': + description: A VectorStoreFileBatchObject representing the created file batch. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileBatchObject' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}: + get: + tags: + - V1 + summary: Openai Retrieve Vector Store File Batch + description: Query endpoint for proper schema generation. + operationId: openai_retrieve_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__get + parameters: + - name: batch_id + in: path + required: true + schema: + type: string + title: Batch Id + - name: vector_store_id + in: path + required: true + schema: + type: string + title: Vector Store Id + responses: + '200': + description: A VectorStoreFileBatchObject representing the file batch. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileBatchObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: + post: + tags: + - V1 + summary: Openai Cancel Vector Store File Batch + description: Typed endpoint for proper schema generation. + operationId: openai_cancel_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__cancel_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_vector_stores_vector_store_id_file_batches_batch_id_cancel_Request' + required: true + responses: + '200': + description: A VectorStoreFileBatchObject representing the cancelled file batch. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileBatchObject' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + - name: batch_id + in: path + required: true + schema: + type: string + description: 'Path parameter: batch_id' + /v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files: + get: + tags: + - V1 + summary: Openai List Files In Vector Store File Batch + description: Query endpoint for proper schema generation. + operationId: openai_list_files_in_vector_store_file_batch_v1_vector_stores__vector_store_id__file_batches__batch_id__files_get + parameters: + - name: batch_id + in: path + required: true + schema: + type: string + title: Batch Id + - name: vector_store_id + in: path + required: true + schema: + type: string + title: Vector Store Id + - name: after + in: query + required: true + schema: + type: string + title: After + - name: before + in: query + required: true + schema: + type: string + title: Before + - name: filter + in: query + required: true + schema: + type: string + title: Filter + - name: limit + in: query + required: false + schema: + type: integer + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + type: string + default: desc + title: Order + responses: + '200': + description: A VectorStoreFilesListInBatchResponse containing the list of files in the batch. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFilesListInBatchResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/vector_stores/{vector_store_id}/files: + get: + tags: + - V1 + summary: Openai List Files In Vector Store + description: Query endpoint for proper schema generation. + operationId: openai_list_files_in_vector_store_v1_vector_stores__vector_store_id__files_get + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + title: Vector Store Id + - name: after + in: query + required: true + schema: + type: string + title: After + - name: before + in: query + required: true + schema: + type: string + title: Before + - name: filter + in: query + required: true + schema: + type: string + title: Filter + - name: limit + in: query + required: false + schema: + type: integer + default: 20 + title: Limit + - name: order + in: query + required: false + schema: + type: string + default: desc + title: Order + responses: + '200': + description: A VectorStoreListFilesResponse containing the list of files. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreListFilesResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Openai Attach File To Vector Store + description: Typed endpoint for proper schema generation. + operationId: openai_attach_file_to_vector_store_v1_vector_stores__vector_store_id__files_post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_vector_stores_vector_store_id_files_Request' + responses: + '200': + description: A VectorStoreFileObject representing the attached file. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + /v1/vector_stores/{vector_store_id}/files/{file_id}: + delete: + tags: + - V1 + summary: Openai Delete Vector Store File + description: Query endpoint for proper schema generation. + operationId: openai_delete_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__delete + parameters: + - name: file_id + in: path + required: true + schema: + type: string + title: File Id + - name: vector_store_id + in: path + required: true + schema: + type: string + title: Vector Store Id + responses: + '200': + description: A VectorStoreFileDeleteResponse indicating the deletion status. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileDeleteResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + get: + tags: + - V1 + summary: Openai Retrieve Vector Store File + description: Query endpoint for proper schema generation. + operationId: openai_retrieve_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__get + parameters: + - name: file_id + in: path + required: true + schema: + type: string + title: File Id + - name: vector_store_id + in: path + required: true + schema: + type: string + title: Vector Store Id + responses: + '200': + description: A VectorStoreFileObject representing the file. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + post: + tags: + - V1 + summary: Openai Update Vector Store File + description: Typed endpoint for proper schema generation. + operationId: openai_update_vector_store_file_v1_vector_stores__vector_store_id__files__file_id__post + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/_vector_stores_vector_store_id_files_file_id_Request' + responses: + '200': + description: A VectorStoreFileObject representing the updated file. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileObject' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + - name: file_id + in: path + required: true + schema: + type: string + description: 'Path parameter: file_id' + /v1/vector_stores/{vector_store_id}/files/{file_id}/content: + get: + tags: + - V1 + summary: Openai Retrieve Vector Store File Contents + description: Query endpoint for proper schema generation. + operationId: openai_retrieve_vector_store_file_contents_v1_vector_stores__vector_store_id__files__file_id__content_get + parameters: + - name: file_id + in: path + required: true + schema: + type: string + title: File Id + - name: vector_store_id + in: path + required: true + schema: + type: string + title: Vector Store Id + responses: + '200': + description: A list of InterleavedContent representing the file contents. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreFileContentsResponse' + '400': + $ref: '#/components/responses/BadRequest400' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequests429' + description: Too Many Requests + '500': + $ref: '#/components/responses/InternalServerError500' + description: Internal Server Error + default: + $ref: '#/components/responses/DefaultError' + description: Default Response + /v1/vector_stores/{vector_store_id}/search: + post: + tags: + - V1 + summary: Openai Search Vector Store + description: Typed endpoint for proper schema generation. + operationId: openai_search_vector_store_v1_vector_stores__vector_store_id__search_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/_vector_stores_vector_store_id_search_Request' + required: true + responses: + '200': + description: A VectorStoreSearchResponse containing the search results. + content: + application/json: + schema: + $ref: '#/components/schemas/VectorStoreSearchResponsePage' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' + parameters: + - name: vector_store_id + in: path + required: true + schema: + type: string + description: 'Path parameter: vector_store_id' + /v1/version: + get: + tags: + - V1 + summary: Version + description: Response-only endpoint for proper schema generation. + operationId: version_v1_version_get + responses: + '200': + description: Version information containing the service version number. + content: + application/json: + schema: + $ref: '#/components/schemas/VersionInfo' + '400': + description: Bad Request + $ref: '#/components/responses/BadRequest400' + '429': + description: Too Many Requests + $ref: '#/components/responses/TooManyRequests429' + '500': + description: Internal Server Error + $ref: '#/components/responses/InternalServerError500' + default: + description: Default Response + $ref: '#/components/responses/DefaultError' components: schemas: + AgentCandidate: + properties: + type: + type: string + const: agent + title: Type + default: agent + config: + $ref: '#/components/schemas/AgentConfig' + type: object + required: + - config + title: AgentCandidate + description: "An agent candidate for evaluation.\n\n:param config: The configuration for the agent candidate." + AgentConfig: + properties: + sampling_params: + $ref: '#/components/schemas/SamplingParams' + input_shields: + title: Input Shields + items: + type: string + type: array + output_shields: + title: Output Shields + items: + type: string + type: array + toolgroups: + title: Toolgroups + items: + anyOf: + - type: string + - $ref: '#/components/schemas/AgentToolGroupWithArgs' + type: array + client_tools: + title: Client Tools + items: + $ref: '#/components/schemas/ToolDef' + type: array + tool_choice: + deprecated: true + $ref: '#/components/schemas/ToolChoice' + tool_prompt_format: + deprecated: true + $ref: '#/components/schemas/ToolPromptFormat' + tool_config: + $ref: '#/components/schemas/ToolConfig' + max_infer_iters: + title: Max Infer Iters + default: 10 + type: integer + model: + type: string + title: Model + instructions: + type: string + title: Instructions + name: + title: Name + type: string + enable_session_persistence: + title: Enable Session Persistence + default: false + type: boolean + response_format: + title: Response Format + oneOf: + - $ref: '#/components/schemas/JsonSchemaResponseFormat' + - $ref: '#/components/schemas/GrammarResponseFormat' + discriminator: + propertyName: type + mapping: + grammar: '#/components/schemas/GrammarResponseFormat' + json_schema: '#/components/schemas/JsonSchemaResponseFormat' + type: object + required: + - model + - instructions + title: AgentConfig + description: "Configuration for an agent.\n\n:param model: The model identifier to use for the agent\n:param instructions: The system instructions for the agent\n:param name: Optional name for the agent, used in telemetry and identification\n:param enable_session_persistence: Optional flag indicating whether session data has to be persisted\n:param response_format: Optional response format configuration" + AgentCreateResponse: + properties: + agent_id: + type: string + title: Agent Id + type: object + required: + - agent_id + title: AgentCreateResponse + description: "Response returned when creating a new agent.\n\n:param agent_id: Unique identifier for the created agent" + AgentSessionCreateResponse: + properties: + session_id: + type: string + title: Session Id + type: object + required: + - session_id + title: AgentSessionCreateResponse + description: "Response returned when creating a new agent session.\n\n:param session_id: Unique identifier for the created session" + AgentToolGroupWithArgs: + properties: + name: + type: string + title: Name + args: + additionalProperties: true + type: object + title: Args + type: object + required: + - name + - args + title: AgentToolGroupWithArgs + AgentTurnInputType: + properties: + type: + type: string + const: agent_turn_input + title: Type + default: agent_turn_input + type: object + title: AgentTurnInputType + description: "Parameter type for agent turn input.\n\n:param type: Discriminator type. Always \"agent_turn_input\"" + AggregationFunctionType: + type: string + enum: + - average + - weighted_average + - median + - categorical_count + - accuracy + title: AggregationFunctionType + description: "Types of aggregation functions for scoring results.\n:cvar average: Calculate the arithmetic mean of scores\n:cvar weighted_average: Calculate a weighted average of scores\n:cvar median: Calculate the median value of scores\n:cvar categorical_count: Count occurrences of categorical values\n:cvar accuracy: Calculate accuracy as the proportion of correct answers" + AllowedToolsFilter: + properties: + tool_names: + title: Tool Names + items: + type: string + type: array + type: object + title: AllowedToolsFilter + description: "Filter configuration for restricting which MCP tools can be used.\n\n:param tool_names: (Optional) List of specific tool names that are allowed" + ApprovalFilter: + properties: + always: + title: Always + items: + type: string + type: array + never: + title: Never + items: + type: string + type: array + type: object + title: ApprovalFilter + description: "Filter configuration for MCP tool approval requirements.\n\n:param always: (Optional) List of tool names that always require approval\n:param never: (Optional) List of tool names that never require approval" + ArrayType: + properties: + type: + type: string + const: array + title: Type + default: array + type: object + title: ArrayType + description: "Parameter type for array values.\n\n:param type: Discriminator type. Always \"array\"" + Attachment-Output: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + - $ref: '#/components/schemas/URL' + title: Content + mime_type: + type: string + title: Mime Type + type: object + required: + - content + - mime_type + title: Attachment + description: "An attachment to an agent turn.\n\n:param content: The content of the attachment.\n:param mime_type: The MIME type of the attachment." + BasicScoringFnParams: + properties: + type: + type: string + const: basic + title: Type + default: basic + aggregation_functions: + items: + $ref: '#/components/schemas/AggregationFunctionType' + type: array + title: Aggregation Functions + description: Aggregation functions to apply to the scores of each row + type: object + title: BasicScoringFnParams + description: "Parameters for basic scoring function configuration.\n:param type: The type of scoring function parameters, always basic\n:param aggregation_functions: Aggregation functions to apply to the scores of each row" + Batch: + properties: + id: + type: string + title: Id + completion_window: + type: string + title: Completion Window + created_at: + type: integer + title: Created At + endpoint: + type: string + title: Endpoint + input_file_id: + type: string + title: Input File Id + object: + type: string + const: batch + title: Object + status: + type: string + enum: + - validating + - failed + - in_progress + - finalizing + - completed + - expired + - cancelling + - cancelled + title: Status + cancelled_at: + title: Cancelled At + type: integer + cancelling_at: + title: Cancelling At + type: integer + completed_at: + title: Completed At + type: integer + error_file_id: + title: Error File Id + type: string + errors: + $ref: '#/components/schemas/Errors' + expired_at: + title: Expired At + type: integer + expires_at: + title: Expires At + type: integer + failed_at: + title: Failed At + type: integer + finalizing_at: + title: Finalizing At + type: integer + in_progress_at: + title: In Progress At + type: integer + metadata: + title: Metadata + additionalProperties: + type: string + type: object + model: + title: Model + type: string + output_file_id: + title: Output File Id + type: string + request_counts: + $ref: '#/components/schemas/BatchRequestCounts' + usage: + $ref: '#/components/schemas/BatchUsage' + additionalProperties: true + type: object + required: + - id + - completion_window + - created_at + - endpoint + - input_file_id + - object + - status + title: Batch + BatchError: + properties: + code: + title: Code + type: string + line: + title: Line + type: integer + message: + title: Message + type: string + param: + title: Param + type: string + additionalProperties: true + type: object + title: BatchError + BatchRequestCounts: + properties: + completed: + type: integer + title: Completed + failed: + type: integer + title: Failed + total: + type: integer + title: Total + additionalProperties: true + type: object + required: + - completed + - failed + - total + title: BatchRequestCounts + BatchUsage: + properties: + input_tokens: + type: integer + title: Input Tokens + input_tokens_details: + $ref: '#/components/schemas/InputTokensDetails' + output_tokens: + type: integer + title: Output Tokens + output_tokens_details: + $ref: '#/components/schemas/OutputTokensDetails' + total_tokens: + type: integer + title: Total Tokens + additionalProperties: true + type: object + required: + - input_tokens + - input_tokens_details + - output_tokens + - output_tokens_details + - total_tokens + title: BatchUsage + Benchmark: + properties: + identifier: + type: string + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: + title: Provider Resource Id + description: Unique identifier for this resource in the provider + type: string + provider_id: + type: string + title: Provider Id + description: ID of the provider that owns this resource + type: + type: string + const: benchmark + title: Type + default: benchmark + dataset_id: + type: string + title: Dataset Id + scoring_functions: + items: + type: string + type: array + title: Scoring Functions + metadata: + additionalProperties: true + type: object + title: Metadata + description: Metadata for this evaluation task + type: object + required: + - identifier + - provider_id + - dataset_id + - scoring_functions + title: Benchmark + description: "A benchmark resource for evaluating model performance.\n\n:param dataset_id: Identifier of the dataset to use for the benchmark evaluation\n:param scoring_functions: List of scoring function identifiers to apply during evaluation\n:param metadata: Metadata for this evaluation task\n:param type: The resource type, always benchmark" + BenchmarkConfig: + properties: + eval_candidate: + oneOf: + - $ref: '#/components/schemas/ModelCandidate' + - $ref: '#/components/schemas/AgentCandidate' + title: Eval Candidate + discriminator: + propertyName: type + mapping: + agent: '#/components/schemas/AgentCandidate' + model: '#/components/schemas/ModelCandidate' + scoring_params: + additionalProperties: + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + - $ref: '#/components/schemas/RegexParserScoringFnParams' + - $ref: '#/components/schemas/BasicScoringFnParams' + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + type: object + title: Scoring Params + description: Map between scoring function id and parameters for each scoring function you want to run + num_examples: + title: Num Examples + description: Number of examples to evaluate (useful for testing), if not provided, all examples in the dataset will be evaluated + type: integer + type: object + required: + - eval_candidate + title: BenchmarkConfig + description: "A benchmark configuration for evaluation.\n\n:param eval_candidate: The candidate to evaluate.\n:param scoring_params: Map between scoring function id and parameters for each scoring function you want to run\n:param num_examples: (Optional) The number of examples to evaluate. If not provided, all examples in the dataset will be evaluated" + BooleanType: + properties: + type: + type: string + const: boolean + title: Type + default: boolean + type: object + title: BooleanType + description: "Parameter type for boolean values.\n\n:param type: Discriminator type. Always \"boolean\"" + BuiltinTool: + type: string + enum: + - brave_search + - wolfram_alpha + - photogen + - code_interpreter + title: BuiltinTool + ChatCompletionInputType: + properties: + type: + type: string + const: chat_completion_input + title: Type + default: chat_completion_input + type: object + title: ChatCompletionInputType + description: "Parameter type for chat completion input.\n\n:param type: Discriminator type. Always \"chat_completion_input\"" + Chunk-Output: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + chunk_id: + type: string + title: Chunk Id + metadata: + additionalProperties: true + type: object + title: Metadata + embedding: + title: Embedding + items: + type: number + type: array + chunk_metadata: + $ref: '#/components/schemas/ChunkMetadata' + type: object + required: + - content + - chunk_id + title: Chunk + description: "A chunk of content that can be inserted into a vector database.\n:param content: The content of the chunk, which can be interleaved text, images, or other types.\n:param chunk_id: Unique identifier for the chunk. Must be provided explicitly.\n:param metadata: Metadata associated with the chunk that will be used in the model context during inference.\n:param embedding: Optional embedding for the chunk. If not provided, it will be computed later.\n:param chunk_metadata: Metadata for the chunk that will NOT be used in the context during inference.\n The `chunk_metadata` is required backend functionality." + ChunkMetadata: + properties: + chunk_id: + title: Chunk Id + type: string + document_id: + title: Document Id + type: string + source: + title: Source + type: string + created_timestamp: + title: Created Timestamp + type: integer + updated_timestamp: + title: Updated Timestamp + type: integer + chunk_window: + title: Chunk Window + type: string + chunk_tokenizer: + title: Chunk Tokenizer + type: string + chunk_embedding_model: + title: Chunk Embedding Model + type: string + chunk_embedding_dimension: + title: Chunk Embedding Dimension + type: integer + content_token_count: + title: Content Token Count + type: integer + metadata_token_count: + title: Metadata Token Count + type: integer + type: object + title: ChunkMetadata + description: "`ChunkMetadata` is backend metadata for a `Chunk` that is used to store additional information about the chunk that\n will not be used in the context during inference, but is required for backend functionality. The `ChunkMetadata`\n is set during chunk creation in `MemoryToolRuntimeImpl().insert()`and is not expected to change after.\n Use `Chunk.metadata` for metadata that will be used in the context during inference.\n:param chunk_id: The ID of the chunk. If not set, it will be generated based on the document ID and content.\n:param document_id: The ID of the document this chunk belongs to.\n:param source: The source of the content, such as a URL, file path, or other identifier.\n:param created_timestamp: An optional timestamp indicating when the chunk was created.\n:param updated_timestamp: An optional timestamp indicating when the chunk was last updated.\n:param chunk_window: The window of the chunk, which can be used to group related chunks together.\n:param chunk_tokenizer: The tokenizer used to create the chunk. Default is Tiktoken.\n:param chunk_embedding_model: The embedding model used to create the chunk's embedding.\n:param chunk_embedding_dimension: The dimension of the embedding vector for the chunk.\n:param content_token_count: The number of tokens in the content of the chunk.\n:param metadata_token_count: The number of tokens in the metadata of the chunk." + CompletionInputType: + properties: + type: + type: string + const: completion_input + title: Type + default: completion_input + type: object + title: CompletionInputType + description: "Parameter type for completion input.\n\n:param type: Discriminator type. Always \"completion_input\"" + CompletionMessage-Output: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + stop_reason: + $ref: '#/components/schemas/StopReason' + tool_calls: + title: Tool Calls + items: + $ref: '#/components/schemas/ToolCall' + type: array + type: object + required: + - content + - stop_reason + title: CompletionMessage + description: "A message containing the model's (assistant) response in a chat conversation.\n\n:param role: Must be \"assistant\" to identify this as the model's response\n:param content: The content of the model's response\n:param stop_reason: Reason why the model stopped generating. Options are:\n - `StopReason.end_of_turn`: The model finished generating the entire response.\n - `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response.\n - `StopReason.out_of_tokens`: The model ran out of token budget.\n:param tool_calls: List of tool calls. Each tool call is a ToolCall object." + Conversation: + properties: + id: + type: string + title: Id + description: The unique ID of the conversation. + object: + type: string + const: conversation + title: Object + description: The object type, which is always conversation. + default: conversation + created_at: + type: integer + title: Created At + description: The time at which the conversation was created, measured in seconds since the Unix epoch. + metadata: + title: Metadata + description: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. + additionalProperties: + type: string + type: object + items: + title: Items + description: Initial items to include in the conversation context. You may add up to 20 items at a time. + items: + additionalProperties: true + type: object + type: array + type: object + required: + - id + - created_at + title: Conversation + description: OpenAI-compatible conversation object. + ConversationItemInclude: + type: string + enum: + - web_search_call.action.sources + - code_interpreter_call.outputs + - computer_call_output.output.image_url + - file_search_call.results + - message.input_image.image_url + - message.output_text.logprobs + - reasoning.encrypted_content + title: ConversationItemInclude + description: Specify additional output data to include in the model response. + ConversationItemList: + properties: + object: + type: string + title: Object + description: Object type + default: list + data: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + discriminator: + propertyName: type + mapping: + file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + function_call_output: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + mcp_approval_response: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + message: '#/components/schemas/OpenAIResponseMessage-Output' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + type: array + title: Data + description: List of conversation items + first_id: + title: First Id + description: The ID of the first item in the list + type: string + last_id: + title: Last Id + description: The ID of the last item in the list + type: string + has_more: + type: boolean + title: Has More + description: Whether there are more items available + default: false + type: object + required: + - data + title: ConversationItemList + description: List of conversation items with pagination. + DPOAlignmentConfig: + properties: + beta: + type: number + title: Beta + loss_type: + $ref: '#/components/schemas/DPOLossType' + default: sigmoid + type: object + required: + - beta + title: DPOAlignmentConfig + description: "Configuration for Direct Preference Optimization (DPO) alignment.\n\n:param beta: Temperature parameter for the DPO loss\n:param loss_type: The type of loss function to use for DPO" + DPOLossType: + type: string + enum: + - sigmoid + - hinge + - ipo + - kto_pair + title: DPOLossType + DataConfig: + properties: + dataset_id: + type: string + title: Dataset Id + batch_size: + type: integer + title: Batch Size + shuffle: + type: boolean + title: Shuffle + data_format: + $ref: '#/components/schemas/DatasetFormat' + validation_dataset_id: + title: Validation Dataset Id + type: string + packed: + title: Packed + default: false + type: boolean + train_on_input: + title: Train On Input + default: false + type: boolean + type: object + required: + - dataset_id + - batch_size + - shuffle + - data_format + title: DataConfig + description: "Configuration for training data and data loading.\n\n:param dataset_id: Unique identifier for the training dataset\n:param batch_size: Number of samples per training batch\n:param shuffle: Whether to shuffle the dataset during training\n:param data_format: Format of the dataset (instruct or dialog)\n:param validation_dataset_id: (Optional) Unique identifier for the validation dataset\n:param packed: (Optional) Whether to pack multiple samples into a single sequence for efficiency\n:param train_on_input: (Optional) Whether to compute loss on input tokens as well as output tokens" + Dataset: + properties: + identifier: + type: string + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: + title: Provider Resource Id + description: Unique identifier for this resource in the provider + type: string + provider_id: + type: string + title: Provider Id + description: ID of the provider that owns this resource + type: + type: string + const: dataset + title: Type + default: dataset + purpose: + $ref: '#/components/schemas/DatasetPurpose' + source: + oneOf: + - $ref: '#/components/schemas/URIDataSource' + - $ref: '#/components/schemas/RowsDataSource' + title: Source + discriminator: + propertyName: type + mapping: + rows: '#/components/schemas/RowsDataSource' + uri: '#/components/schemas/URIDataSource' + metadata: + additionalProperties: true + type: object + title: Metadata + description: Any additional metadata for this dataset + type: object + required: + - identifier + - provider_id + - purpose + - source + title: Dataset + description: "Dataset resource for storing and accessing training or evaluation data.\n\n:param type: Type of resource, always 'dataset' for datasets" + DatasetFormat: + type: string + enum: + - instruct + - dialog + title: DatasetFormat + description: "Format of the training dataset.\n:cvar instruct: Instruction-following format with prompt and completion\n:cvar dialog: Multi-turn conversation format with messages" + DatasetPurpose: + type: string + enum: + - post-training/messages + - eval/question-answer + - eval/messages-answer + title: DatasetPurpose + description: "Purpose of the dataset. Each purpose has a required input data schema.\n\n:cvar post-training/messages: The dataset contains messages used for post-training.\n {\n \"messages\": [\n {\"role\": \"user\", \"content\": \"Hello, world!\"},\n {\"role\": \"assistant\", \"content\": \"Hello, world!\"},\n ]\n }\n:cvar eval/question-answer: The dataset contains a question column and an answer column.\n {\n \"question\": \"What is the capital of France?\",\n \"answer\": \"Paris\"\n }\n:cvar eval/messages-answer: The dataset contains a messages column with list of messages and an answer column.\n {\n \"messages\": [\n {\"role\": \"user\", \"content\": \"Hello, my name is John Doe.\"},\n {\"role\": \"assistant\", \"content\": \"Hello, John Doe. How can I help you today?\"},\n {\"role\": \"user\", \"content\": \"What's my name?\"},\n ],\n \"answer\": \"John Doe\"\n }" + DefaultRAGQueryGeneratorConfig: + properties: + type: + type: string + const: default + title: Type + default: default + separator: + type: string + title: Separator + default: ' ' + type: object + title: DefaultRAGQueryGeneratorConfig + description: "Configuration for the default RAG query generator.\n\n:param type: Type of query generator, always 'default'\n:param separator: String separator used to join query terms" + Document: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + type: array + - $ref: '#/components/schemas/URL' + title: Content + mime_type: + type: string + title: Mime Type + type: object + required: + - content + - mime_type + title: Document + description: "A document to be used by an agent.\n\n:param content: The content of the document.\n:param mime_type: The MIME type of the document." + EfficiencyConfig: + properties: + enable_activation_checkpointing: + title: Enable Activation Checkpointing + default: false + type: boolean + enable_activation_offloading: + title: Enable Activation Offloading + default: false + type: boolean + memory_efficient_fsdp_wrap: + title: Memory Efficient Fsdp Wrap + default: false + type: boolean + fsdp_cpu_offload: + title: Fsdp Cpu Offload + default: false + type: boolean + type: object + title: EfficiencyConfig + description: "Configuration for memory and compute efficiency optimizations.\n\n:param enable_activation_checkpointing: (Optional) Whether to use activation checkpointing to reduce memory usage\n:param enable_activation_offloading: (Optional) Whether to offload activations to CPU to save GPU memory\n:param memory_efficient_fsdp_wrap: (Optional) Whether to use memory-efficient FSDP wrapping\n:param fsdp_cpu_offload: (Optional) Whether to offload FSDP parameters to CPU" + Errors: + properties: + data: + title: Data + items: + $ref: '#/components/schemas/BatchError' + type: array + object: + title: Object + type: string + additionalProperties: true + type: object + title: Errors + EvaluateResponse: + properties: + generations: + items: + additionalProperties: true + type: object + type: array + title: Generations + scores: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Scores + type: object + required: + - generations + - scores + title: EvaluateResponse + description: "The response from an evaluation.\n\n:param generations: The generations from the evaluation.\n:param scores: The scores from the evaluation." + GrammarResponseFormat: + properties: + type: + type: string + const: grammar + title: Type + default: grammar + bnf: + additionalProperties: true + type: object + title: Bnf + type: object + required: + - bnf + title: GrammarResponseFormat + description: "Configuration for grammar-guided response generation.\n\n:param type: Must be \"grammar\" to identify this format type\n:param bnf: The BNF grammar specification the response should conform to" + GreedySamplingStrategy: + properties: + type: + type: string + const: greedy + title: Type + default: greedy + type: object + title: GreedySamplingStrategy + description: "Greedy sampling strategy that selects the highest probability token at each step.\n\n:param type: Must be \"greedy\" to identify this sampling strategy" + HealthInfo: + properties: + status: + $ref: '#/components/schemas/HealthStatus' + type: object + required: + - status + title: HealthInfo + description: "Health status information for the service.\n\n:param status: Current health status of the service" + HealthStatus: + type: string + enum: + - OK + - Error + - Not Implemented + title: HealthStatus + ImageContentItem-Input: + properties: + type: + type: string + const: image + title: Type + default: image + image: + $ref: '#/components/schemas/_URLOrData' + type: object + required: + - image + title: ImageContentItem + description: "A image content item\n\n:param type: Discriminator type of the content item. Always \"image\"\n:param image: Image as a base64 encoded string or an URL" + ImageContentItem-Output: + properties: + type: + type: string + const: image + title: Type + default: image + image: + $ref: '#/components/schemas/_URLOrData' + type: object + required: + - image + title: ImageContentItem + description: "A image content item\n\n:param type: Discriminator type of the content item. Always \"image\"\n:param image: Image as a base64 encoded string or an URL" + InferenceStep-Output: + properties: + turn_id: + type: string + title: Turn Id + step_id: + type: string + title: Step Id + started_at: + title: Started At + type: string + format: date-time + completed_at: + title: Completed At + type: string + format: date-time + step_type: + type: string + const: inference + title: Step Type + default: inference + model_response: + $ref: '#/components/schemas/CompletionMessage-Output' + type: object + required: + - turn_id + - step_id + - model_response + title: InferenceStep + description: "An inference step in an agent turn.\n\n:param model_response: The response from the LLM." + InputTokensDetails: + properties: + cached_tokens: + type: integer + title: Cached Tokens + additionalProperties: true + type: object + required: + - cached_tokens + title: InputTokensDetails + Job: + properties: + job_id: + type: string + title: Job Id + status: + $ref: '#/components/schemas/JobStatus' + type: object + required: + - job_id + - status + title: Job + description: "A job execution instance with status tracking.\n\n:param job_id: Unique identifier for the job\n:param status: Current execution status of the job" + JobStatus: + type: string + enum: + - completed + - in_progress + - failed + - scheduled + - cancelled + title: JobStatus + description: "Status of a job execution.\n:cvar completed: Job has finished successfully\n:cvar in_progress: Job is currently running\n:cvar failed: Job has failed during execution\n:cvar scheduled: Job is scheduled but not yet started\n:cvar cancelled: Job was cancelled before completion" + JsonSchemaResponseFormat: + properties: + type: + type: string + const: json_schema + title: Type + default: json_schema + json_schema: + additionalProperties: true + type: object + title: Json Schema + type: object + required: + - json_schema + title: JsonSchemaResponseFormat + description: "Configuration for JSON schema-guided response generation.\n\n:param type: Must be \"json_schema\" to identify this format type\n:param json_schema: The JSON schema the response should conform to. In a Python SDK, this is often a `pydantic` model." + JsonType: + properties: + type: + type: string + const: json + title: Type + default: json + type: object + title: JsonType + description: "Parameter type for JSON values.\n\n:param type: Discriminator type. Always \"json\"" + LLMAsJudgeScoringFnParams: + properties: + type: + type: string + const: llm_as_judge + title: Type + default: llm_as_judge + judge_model: + type: string + title: Judge Model + prompt_template: + title: Prompt Template + type: string + judge_score_regexes: + items: + type: string + type: array + title: Judge Score Regexes + description: Regexes to extract the answer from generated response + aggregation_functions: + items: + $ref: '#/components/schemas/AggregationFunctionType' + type: array + title: Aggregation Functions + description: Aggregation functions to apply to the scores of each row + type: object + required: + - judge_model + title: LLMAsJudgeScoringFnParams + description: "Parameters for LLM-as-judge scoring function configuration.\n:param type: The type of scoring function parameters, always llm_as_judge\n:param judge_model: Identifier of the LLM model to use as a judge for scoring\n:param prompt_template: (Optional) Custom prompt template for the judge model\n:param judge_score_regexes: Regexes to extract the answer from generated response\n:param aggregation_functions: Aggregation functions to apply to the scores of each row" + LLMRAGQueryGeneratorConfig: + properties: + type: + type: string + const: llm + title: Type + default: llm + model: + type: string + title: Model + template: + type: string + title: Template + type: object + required: + - model + - template + title: LLMRAGQueryGeneratorConfig + description: "Configuration for the LLM-based RAG query generator.\n\n:param type: Type of query generator, always 'llm'\n:param model: Name of the language model to use for query generation\n:param template: Template string for formatting the query generation prompt" + ListBenchmarksResponse: + properties: + data: + items: + $ref: '#/components/schemas/Benchmark' + type: array + title: Data + type: object + required: + - data + title: ListBenchmarksResponse + ListDatasetsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Dataset' + type: array + title: Data + type: object + required: + - data + title: ListDatasetsResponse + description: "Response from listing datasets.\n\n:param data: List of datasets" + ListModelsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Model' + type: array + title: Data + type: object + required: + - data + title: ListModelsResponse + ListPostTrainingJobsResponse: + properties: + data: + items: + $ref: '#/components/schemas/PostTrainingJob' + type: array + title: Data + type: object + required: + - data + title: ListPostTrainingJobsResponse + ListPromptsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Prompt' + type: array + title: Data + type: object + required: + - data + title: ListPromptsResponse + description: Response model to list prompts. + ListProvidersResponse: + properties: + data: + items: + $ref: '#/components/schemas/ProviderInfo' + type: array + title: Data + type: object + required: + - data + title: ListProvidersResponse + description: "Response containing a list of all available providers.\n\n:param data: List of provider information objects" + ListRoutesResponse: + properties: + data: + items: + $ref: '#/components/schemas/RouteInfo' + type: array + title: Data + type: object + required: + - data + title: ListRoutesResponse + description: "Response containing a list of all available API routes.\n\n:param data: List of available route information objects" + ListScoringFunctionsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ScoringFn-Output' + type: array + title: Data + type: object + required: + - data + title: ListScoringFunctionsResponse + ListShieldsResponse: + properties: + data: + items: + $ref: '#/components/schemas/Shield' + type: array + title: Data + type: object + required: + - data + title: ListShieldsResponse + ListToolGroupsResponse: + properties: + data: + items: + $ref: '#/components/schemas/ToolGroup' + type: array + title: Data + type: object + required: + - data + title: ListToolGroupsResponse + description: "Response containing a list of tool groups.\n\n:param data: List of tool groups" + MCPListToolsTool: + properties: + input_schema: + additionalProperties: true + type: object + title: Input Schema + name: + type: string + title: Name + description: + title: Description + type: string + type: object + required: + - input_schema + - name + title: MCPListToolsTool + description: "Tool definition returned by MCP list tools operation.\n\n:param input_schema: JSON schema defining the tool's input parameters\n:param name: Name of the tool\n:param description: (Optional) Description of what the tool does" + MemoryRetrievalStep-Output: + properties: + turn_id: + type: string + title: Turn Id + step_id: + type: string + title: Step Id + started_at: + title: Started At + type: string + format: date-time + completed_at: + title: Completed At + type: string + format: date-time + step_type: + type: string + const: memory_retrieval + title: Step Type + default: memory_retrieval + vector_store_ids: + type: string + title: Vector Store Ids + inserted_context: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Inserted Context + type: object + required: + - turn_id + - step_id + - vector_store_ids + - inserted_context + title: MemoryRetrievalStep + description: "A memory retrieval step in an agent turn.\n\n:param vector_store_ids: The IDs of the vector databases to retrieve context from.\n:param inserted_context: The context retrieved from the vector databases." + Model: + properties: + identifier: + type: string + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: + title: Provider Resource Id + description: Unique identifier for this resource in the provider + type: string + provider_id: + type: string + title: Provider Id + description: ID of the provider that owns this resource + type: + type: string + const: model + title: Type + default: model + metadata: + additionalProperties: true + type: object + title: Metadata + description: Any additional metadata for this model + model_type: + $ref: '#/components/schemas/ModelType' + default: llm + type: object + required: + - identifier + - provider_id + title: Model + description: "A model resource representing an AI model registered in Llama Stack.\n\n:param type: The resource type, always 'model' for model resources\n:param model_type: The type of model (LLM or embedding model)\n:param metadata: Any additional metadata for this model\n:param identifier: Unique identifier for this resource in llama stack\n:param provider_resource_id: Unique identifier for this resource in the provider\n:param provider_id: ID of the provider that owns this resource" + ModelCandidate: + properties: + type: + type: string + const: model + title: Type + default: model + model: + type: string + title: Model + sampling_params: + $ref: '#/components/schemas/SamplingParams' + system_message: + $ref: '#/components/schemas/SystemMessage' + type: object + required: + - model + - sampling_params + title: ModelCandidate + description: "A model candidate for evaluation.\n\n:param model: The model ID to evaluate.\n:param sampling_params: The sampling parameters for the model.\n:param system_message: (Optional) The system message providing instructions or context to the model." + ModelType: + type: string + enum: + - llm + - embedding + - rerank + title: ModelType + description: "Enumeration of supported model types in Llama Stack.\n:cvar llm: Large language model for text generation and completion\n:cvar embedding: Embedding model for converting text to vector representations\n:cvar rerank: Reranking model for reordering documents based on their relevance to a query" + ModerationObject: + properties: + id: + type: string + title: Id + model: + type: string + title: Model + results: + items: + $ref: '#/components/schemas/ModerationObjectResults' + type: array + title: Results + type: object + required: + - id + - model + - results + title: ModerationObject + description: "A moderation object.\n:param id: The unique identifier for the moderation request.\n:param model: The model used to generate the moderation results.\n:param results: A list of moderation objects" + ModerationObjectResults: + properties: + flagged: + type: boolean + title: Flagged + categories: + title: Categories + additionalProperties: + type: boolean + type: object + category_applied_input_types: + title: Category Applied Input Types + additionalProperties: + items: + type: string + type: array + type: object + category_scores: + title: Category Scores + additionalProperties: + type: number + type: object + user_message: + title: User Message + type: string + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - flagged + title: ModerationObjectResults + description: "A moderation object.\n:param flagged: Whether any of the below categories are flagged.\n:param categories: A list of the categories, and whether they are flagged or not.\n:param category_applied_input_types: A list of the categories along with the input type(s) that the score applies to.\n:param category_scores: A list of the categories along with their scores as predicted by model." + NumberType: + properties: + type: + type: string + const: number + title: Type + default: number + type: object + title: NumberType + description: "Parameter type for numeric values.\n\n:param type: Discriminator type. Always \"number\"" + ObjectType: + properties: + type: + type: string + const: object + title: Type + default: object + type: object + title: ObjectType + description: "Parameter type for object values.\n\n:param type: Discriminator type. Always \"object\"" + OpenAIAssistantMessageParam-Input: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: Content + name: + title: Name + type: string + tool_calls: + title: Tool Calls + items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + type: object + title: OpenAIAssistantMessageParam + description: "A message containing the model's (assistant) response in an OpenAI-compatible chat completion request.\n\n:param role: Must be \"assistant\" to identify this as the model's response\n:param content: The content of the model's response\n:param name: (Optional) The name of the assistant message participant.\n:param tool_calls: List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object." + OpenAIAssistantMessageParam-Output: + properties: + role: + type: string + const: assistant + title: Role + default: assistant + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: Content + name: + title: Name + type: string + tool_calls: + title: Tool Calls + items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + type: object + title: OpenAIAssistantMessageParam + description: "A message containing the model's (assistant) response in an OpenAI-compatible chat completion request.\n\n:param role: Must be \"assistant\" to identify this as the model's response\n:param content: The content of the model's response\n:param name: (Optional) The name of the assistant message participant.\n:param tool_calls: List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object." + OpenAIChatCompletion: + properties: + id: + type: string + title: Id + choices: + items: + $ref: '#/components/schemas/OpenAIChoice-Output' + type: array + title: Choices + object: + type: string + const: chat.completion + title: Object + default: chat.completion + created: + type: integer + title: Created + model: + type: string + title: Model + usage: + $ref: '#/components/schemas/OpenAIChatCompletionUsage' + type: object + required: + - id + - choices + - created + - model + title: OpenAIChatCompletion + description: "Response from an OpenAI-compatible chat completion request.\n\n:param id: The ID of the chat completion\n:param choices: List of choices\n:param object: The object type, which will be \"chat.completion\"\n:param created: The Unix timestamp in seconds when the chat completion was created\n:param model: The model that was used to generate the chat completion\n:param usage: Token usage information for the completion" + OpenAIChatCompletionContentPartImageParam: + properties: + type: + type: string + const: image_url + title: Type + default: image_url + image_url: + $ref: '#/components/schemas/OpenAIImageURL' + type: object + required: + - image_url + title: OpenAIChatCompletionContentPartImageParam + description: "Image content part for OpenAI-compatible chat completion messages.\n\n:param type: Must be \"image_url\" to identify this as image content\n:param image_url: Image URL specification and processing details" + OpenAIChatCompletionContentPartTextParam: + properties: + type: + type: string + const: text + title: Type + default: text + text: + type: string + title: Text + type: object + required: + - text + title: OpenAIChatCompletionContentPartTextParam + description: "Text content part for OpenAI-compatible chat completion messages.\n\n:param type: Must be \"text\" to identify this as text content\n:param text: The text content of the message" + OpenAIChatCompletionRequestWithExtraBody: + properties: + model: + type: string + title: Model + messages: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Input' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Input' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + discriminator: + propertyName: role + mapping: + assistant: '#/components/schemas/OpenAIAssistantMessageParam-Input' + developer: '#/components/schemas/OpenAIDeveloperMessageParam' + system: '#/components/schemas/OpenAISystemMessageParam' + tool: '#/components/schemas/OpenAIToolMessageParam' + user: '#/components/schemas/OpenAIUserMessageParam-Input' + type: array + minItems: 1 + title: Messages + frequency_penalty: + title: Frequency Penalty + type: number + function_call: + anyOf: + - type: string + - additionalProperties: true + type: object + title: Function Call + functions: + title: Functions + items: + additionalProperties: true + type: object + type: array + logit_bias: + title: Logit Bias + additionalProperties: + type: number + type: object + logprobs: + title: Logprobs + type: boolean + max_completion_tokens: + title: Max Completion Tokens + type: integer + max_tokens: + title: Max Tokens + type: integer + n: + title: N + type: integer + parallel_tool_calls: + title: Parallel Tool Calls + type: boolean + presence_penalty: + title: Presence Penalty + type: number + response_format: + title: Response Format + oneOf: + - $ref: '#/components/schemas/OpenAIResponseFormatText' + - $ref: '#/components/schemas/OpenAIResponseFormatJSONSchema' + - $ref: '#/components/schemas/OpenAIResponseFormatJSONObject' + discriminator: + propertyName: type + mapping: + json_object: '#/components/schemas/OpenAIResponseFormatJSONObject' + json_schema: '#/components/schemas/OpenAIResponseFormatJSONSchema' + text: '#/components/schemas/OpenAIResponseFormatText' + seed: + title: Seed + type: integer + stop: + anyOf: + - type: string + - items: + type: string + type: array + title: Stop + stream: + title: Stream + type: boolean + stream_options: + title: Stream Options + additionalProperties: true + type: object + temperature: + title: Temperature + type: number + tool_choice: + anyOf: + - type: string + - additionalProperties: true + type: object + title: Tool Choice + tools: + title: Tools + items: + additionalProperties: true + type: object + type: array + top_logprobs: + title: Top Logprobs + type: integer + top_p: + title: Top P + type: number + user: + title: User + type: string + additionalProperties: true + type: object + required: + - model + - messages + title: OpenAIChatCompletionRequestWithExtraBody + description: "Request parameters for OpenAI-compatible chat completion endpoint.\n\n:param model: The identifier of the model to use. The model must be registered with Llama Stack and available via the /models endpoint.\n:param messages: List of messages in the conversation.\n:param frequency_penalty: (Optional) The penalty for repeated tokens.\n:param function_call: (Optional) The function call to use.\n:param functions: (Optional) List of functions to use.\n:param logit_bias: (Optional) The logit bias to use.\n:param logprobs: (Optional) The log probabilities to use.\n:param max_completion_tokens: (Optional) The maximum number of tokens to generate.\n:param max_tokens: (Optional) The maximum number of tokens to generate.\n:param n: (Optional) The number of completions to generate.\n:param parallel_tool_calls: (Optional) Whether to parallelize tool calls.\n:param presence_penalty: (Optional) The penalty for repeated tokens.\n:param response_format: (Optional) The response format to use.\n:param seed: (Optional) The seed to use.\n:param stop: (Optional) The stop tokens to use.\n:param stream: (Optional) Whether to stream the response.\n:param stream_options: (Optional) The stream options to use.\n:param temperature: (Optional) The temperature to use.\n:param tool_choice: (Optional) The tool choice to use.\n:param tools: (Optional) The tools to use.\n:param top_logprobs: (Optional) The top log probabilities to use.\n:param top_p: (Optional) The top p to use.\n:param user: (Optional) The user to use." + OpenAIChatCompletionToolCall: + properties: + index: + title: Index + type: integer + id: + title: Id + type: string + type: + type: string + const: function + title: Type + default: function + function: + $ref: '#/components/schemas/OpenAIChatCompletionToolCallFunction' + type: object + title: OpenAIChatCompletionToolCall + description: "Tool call specification for OpenAI-compatible chat completion responses.\n\n:param index: (Optional) Index of the tool call in the list\n:param id: (Optional) Unique identifier for the tool call\n:param type: Must be \"function\" to identify this as a function call\n:param function: (Optional) Function call details" + OpenAIChatCompletionToolCallFunction: + properties: + name: + title: Name + type: string + arguments: + title: Arguments + type: string + type: object + title: OpenAIChatCompletionToolCallFunction + description: "Function call details for OpenAI-compatible tool calls.\n\n:param name: (Optional) Name of the function to call\n:param arguments: (Optional) Arguments to pass to the function as a JSON string" + OpenAIChatCompletionUsage: + properties: + prompt_tokens: + type: integer + title: Prompt Tokens + completion_tokens: + type: integer + title: Completion Tokens + total_tokens: + type: integer + title: Total Tokens + prompt_tokens_details: + $ref: '#/components/schemas/OpenAIChatCompletionUsagePromptTokensDetails' + completion_tokens_details: + $ref: '#/components/schemas/OpenAIChatCompletionUsageCompletionTokensDetails' + type: object + required: + - prompt_tokens + - completion_tokens + - total_tokens + title: OpenAIChatCompletionUsage + description: "Usage information for OpenAI chat completion.\n\n:param prompt_tokens: Number of tokens in the prompt\n:param completion_tokens: Number of tokens in the completion\n:param total_tokens: Total tokens used (prompt + completion)\n:param input_tokens_details: Detailed breakdown of input token usage\n:param output_tokens_details: Detailed breakdown of output token usage" + OpenAIChatCompletionUsageCompletionTokensDetails: + properties: + reasoning_tokens: + title: Reasoning Tokens + type: integer + type: object + title: OpenAIChatCompletionUsageCompletionTokensDetails + description: "Token details for output tokens in OpenAI chat completion usage.\n\n:param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models)" + OpenAIChatCompletionUsagePromptTokensDetails: + properties: + cached_tokens: + title: Cached Tokens + type: integer + type: object + title: OpenAIChatCompletionUsagePromptTokensDetails + description: "Token details for prompt tokens in OpenAI chat completion usage.\n\n:param cached_tokens: Number of tokens retrieved from cache" + OpenAIChoice-Output: + properties: + message: + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam-Output' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam-Output' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: Message + discriminator: + propertyName: role + mapping: + assistant: '#/components/schemas/OpenAIAssistantMessageParam-Output' + developer: '#/components/schemas/OpenAIDeveloperMessageParam' + system: '#/components/schemas/OpenAISystemMessageParam' + tool: '#/components/schemas/OpenAIToolMessageParam' + user: '#/components/schemas/OpenAIUserMessageParam-Output' + finish_reason: + type: string + title: Finish Reason + index: + type: integer + title: Index + logprobs: + $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + type: object + required: + - message + - finish_reason + - index + title: OpenAIChoice + description: "A choice from an OpenAI-compatible chat completion response.\n\n:param message: The message from the model\n:param finish_reason: The reason the model stopped generating\n:param index: The index of the choice\n:param logprobs: (Optional) The log probabilities for the tokens in the message" + OpenAIChoiceLogprobs-Output: + properties: + content: + title: Content + items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + refusal: + title: Refusal + items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + type: object + title: OpenAIChoiceLogprobs + description: "The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response.\n\n:param content: (Optional) The log probabilities for the tokens in the message\n:param refusal: (Optional) The log probabilities for the tokens in the message" + OpenAICompletion: + properties: + id: + type: string + title: Id + choices: + items: + $ref: '#/components/schemas/OpenAICompletionChoice-Output' + type: array + title: Choices + created: + type: integer + title: Created + model: + type: string + title: Model + object: + type: string + const: text_completion + title: Object + default: text_completion + type: object + required: + - id + - choices + - created + - model + title: OpenAICompletion + description: "Response from an OpenAI-compatible completion request.\n\n:id: The ID of the completion\n:choices: List of choices\n:created: The Unix timestamp in seconds when the completion was created\n:model: The model that was used to generate the completion\n:object: The object type, which will be \"text_completion\"" + OpenAICompletionChoice-Output: + properties: + finish_reason: + type: string + title: Finish Reason + text: + type: string + title: Text + index: + type: integer + title: Index + logprobs: + $ref: '#/components/schemas/OpenAIChoiceLogprobs-Output' + type: object + required: + - finish_reason + - text + - index + title: OpenAICompletionChoice + description: "A choice from an OpenAI-compatible completion response.\n\n:finish_reason: The reason the model stopped generating\n:text: The text of the choice\n:index: The index of the choice\n:logprobs: (Optional) The log probabilities for the tokens in the choice" + OpenAICompletionRequestWithExtraBody: + properties: + model: + type: string + title: Model + prompt: + anyOf: + - type: string + - items: + type: string + type: array + - items: + type: integer + type: array + - items: + items: + type: integer + type: array + type: array + title: Prompt + best_of: + title: Best Of + type: integer + echo: + title: Echo + type: boolean + frequency_penalty: + title: Frequency Penalty + type: number + logit_bias: + title: Logit Bias + additionalProperties: + type: number + type: object + logprobs: + title: Logprobs + type: boolean + max_tokens: + title: Max Tokens + type: integer + n: + title: N + type: integer + presence_penalty: + title: Presence Penalty + type: number + seed: + title: Seed + type: integer + stop: + anyOf: + - type: string + - items: + type: string + type: array + title: Stop + stream: + title: Stream + type: boolean + stream_options: + title: Stream Options + additionalProperties: true + type: object + temperature: + title: Temperature + type: number + top_p: + title: Top P + type: number + user: + title: User + type: string + suffix: + title: Suffix + type: string + additionalProperties: true + type: object + required: + - model + - prompt + title: OpenAICompletionRequestWithExtraBody + description: "Request parameters for OpenAI-compatible completion endpoint.\n\n:param model: The identifier of the model to use. The model must be registered with Llama Stack and available via the /models endpoint.\n:param prompt: The prompt to generate a completion for.\n:param best_of: (Optional) The number of completions to generate.\n:param echo: (Optional) Whether to echo the prompt.\n:param frequency_penalty: (Optional) The penalty for repeated tokens.\n:param logit_bias: (Optional) The logit bias to use.\n:param logprobs: (Optional) The log probabilities to use.\n:param max_tokens: (Optional) The maximum number of tokens to generate.\n:param n: (Optional) The number of completions to generate.\n:param presence_penalty: (Optional) The penalty for repeated tokens.\n:param seed: (Optional) The seed to use.\n:param stop: (Optional) The stop tokens to use.\n:param stream: (Optional) Whether to stream the response.\n:param stream_options: (Optional) The stream options to use.\n:param temperature: (Optional) The temperature to use.\n:param top_p: (Optional) The top p to use.\n:param user: (Optional) The user to use.\n:param suffix: (Optional) The suffix that should be appended to the completion." + OpenAICreateVectorStoreFileBatchRequestWithExtraBody: + properties: + file_ids: + items: + type: string + type: array + title: File Ids + attributes: + title: Attributes + additionalProperties: true + type: object + chunking_strategy: + title: Chunking Strategy + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + additionalProperties: true + type: object + required: + - file_ids + title: OpenAICreateVectorStoreFileBatchRequestWithExtraBody + description: "Request to create a vector store file batch with extra_body support.\n\n:param file_ids: A list of File IDs that the vector store should use\n:param attributes: (Optional) Key-value attributes to store with the files\n:param chunking_strategy: (Optional) The chunking strategy used to chunk the file(s). Defaults to auto" + OpenAICreateVectorStoreRequestWithExtraBody: + properties: + name: + title: Name + type: string + file_ids: + title: File Ids + items: + type: string + type: array + expires_after: + title: Expires After + additionalProperties: true + type: object + chunking_strategy: + title: Chunking Strategy + additionalProperties: true + type: object + metadata: + title: Metadata + additionalProperties: true + type: object + additionalProperties: true + type: object + title: OpenAICreateVectorStoreRequestWithExtraBody + description: "Request to create a vector store with extra_body support.\n\n:param name: (Optional) A name for the vector store\n:param file_ids: List of file IDs to include in the vector store\n:param expires_after: (Optional) Expiration policy for the vector store\n:param chunking_strategy: (Optional) Strategy for splitting files into chunks\n:param metadata: Set of key-value pairs that can be attached to the vector store" + OpenAIDeveloperMessageParam: + properties: + role: + type: string + const: developer + title: Role + default: developer + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: Content + name: + title: Name + type: string + type: object + required: + - content + title: OpenAIDeveloperMessageParam + description: "A message from the developer in an OpenAI-compatible chat completion request.\n\n:param role: Must be \"developer\" to identify this as a developer message\n:param content: The content of the developer message\n:param name: (Optional) The name of the developer message participant." + OpenAIEmbeddingData: + properties: + object: + type: string + const: embedding + title: Object + default: embedding + embedding: + anyOf: + - items: + type: number + type: array + - type: string + title: Embedding + index: + type: integer + title: Index + type: object + required: + - embedding + - index + title: OpenAIEmbeddingData + description: "A single embedding data object from an OpenAI-compatible embeddings response.\n\n:param object: The object type, which will be \"embedding\"\n:param embedding: The embedding vector as a list of floats (when encoding_format=\"float\") or as a base64-encoded string (when encoding_format=\"base64\")\n:param index: The index of the embedding in the input list" + OpenAIEmbeddingUsage: + properties: + prompt_tokens: + type: integer + title: Prompt Tokens + total_tokens: + type: integer + title: Total Tokens + type: object + required: + - prompt_tokens + - total_tokens + title: OpenAIEmbeddingUsage + description: "Usage information for an OpenAI-compatible embeddings response.\n\n:param prompt_tokens: The number of tokens in the input\n:param total_tokens: The total number of tokens used" + OpenAIEmbeddingsRequestWithExtraBody: + properties: + model: + type: string + title: Model + input: + anyOf: + - type: string + - items: + type: string + type: array + title: Input + encoding_format: + title: Encoding Format + default: float + type: string + dimensions: + title: Dimensions + type: integer + user: + title: User + type: string + additionalProperties: true + type: object + required: + - model + - input + title: OpenAIEmbeddingsRequestWithExtraBody + description: "Request parameters for OpenAI-compatible embeddings endpoint.\n\n:param model: The identifier of the model to use. The model must be an embedding model registered with Llama Stack and available via the /models endpoint.\n:param input: Input text to embed, encoded as a string or array of strings. To embed multiple inputs in a single request, pass an array of strings.\n:param encoding_format: (Optional) The format to return the embeddings in. Can be either \"float\" or \"base64\". Defaults to \"float\".\n:param dimensions: (Optional) The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.\n:param user: (Optional) A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse." + OpenAIEmbeddingsResponse: + properties: + object: + type: string + const: list + title: Object + default: list + data: + items: + $ref: '#/components/schemas/OpenAIEmbeddingData' + type: array + title: Data + model: + type: string + title: Model + usage: + $ref: '#/components/schemas/OpenAIEmbeddingUsage' + type: object + required: + - data + - model + - usage + title: OpenAIEmbeddingsResponse + description: "Response from an OpenAI-compatible embeddings request.\n\n:param object: The object type, which will be \"list\"\n:param data: List of embedding data objects\n:param model: The model that was used to generate the embeddings\n:param usage: Usage information" + OpenAIFile: + properties: + type: + type: string + const: file + title: Type + default: file + file: + $ref: '#/components/schemas/OpenAIFileFile' + type: object + required: + - file + title: OpenAIFile + OpenAIFileFile: + properties: + file_data: + title: File Data + type: string + file_id: + title: File Id + type: string + filename: + title: Filename + type: string + type: object + title: OpenAIFileFile + OpenAIFileObject: + properties: + object: + type: string + const: file + title: Object + default: file + id: + type: string + title: Id + bytes: + type: integer + title: Bytes + created_at: + type: integer + title: Created At + expires_at: + type: integer + title: Expires At + filename: + type: string + title: Filename + purpose: + $ref: '#/components/schemas/OpenAIFilePurpose' + type: object + required: + - id + - bytes + - created_at + - expires_at + - filename + - purpose + title: OpenAIFileObject + description: "OpenAI File object as defined in the OpenAI Files API.\n\n:param object: The object type, which is always \"file\"\n:param id: The file identifier, which can be referenced in the API endpoints\n:param bytes: The size of the file, in bytes\n:param created_at: The Unix timestamp (in seconds) for when the file was created\n:param expires_at: The Unix timestamp (in seconds) for when the file expires\n:param filename: The name of the file\n:param purpose: The intended purpose of the file" + OpenAIFilePurpose: + type: string + enum: + - assistants + - batch + title: OpenAIFilePurpose + description: Valid purpose values for OpenAI Files API. + OpenAIImageURL: + properties: + url: + type: string + title: Url + detail: + title: Detail + type: string + type: object + required: + - url + title: OpenAIImageURL + description: "Image URL specification for OpenAI-compatible chat completion messages.\n\n:param url: URL of the image to include in the message\n:param detail: (Optional) Level of detail for image processing. Can be \"low\", \"high\", or \"auto\"" + OpenAIJSONSchema: + properties: + name: + type: string + title: Name + description: + title: Description + type: string + strict: + title: Strict + type: boolean + schema: + title: Schema + additionalProperties: true + type: object + type: object + title: OpenAIJSONSchema + description: "JSON schema specification for OpenAI-compatible structured response format.\n\n:param name: Name of the schema\n:param description: (Optional) Description of the schema\n:param strict: (Optional) Whether to enforce strict adherence to the schema\n:param schema: (Optional) The JSON schema definition" + OpenAIResponseAnnotationCitation: + properties: + type: + type: string + const: url_citation + title: Type + default: url_citation + end_index: + type: integer + title: End Index + start_index: + type: integer + title: Start Index + title: + type: string + title: Title + url: + type: string + title: Url + type: object + required: + - end_index + - start_index + - title + - url + title: OpenAIResponseAnnotationCitation + description: "URL citation annotation for referencing external web resources.\n\n:param type: Annotation type identifier, always \"url_citation\"\n:param end_index: End position of the citation span in the content\n:param start_index: Start position of the citation span in the content\n:param title: Title of the referenced web resource\n:param url: URL of the referenced web resource" + OpenAIResponseAnnotationContainerFileCitation: + properties: + type: + type: string + const: container_file_citation + title: Type + default: container_file_citation + container_id: + type: string + title: Container Id + end_index: + type: integer + title: End Index + file_id: + type: string + title: File Id + filename: + type: string + title: Filename + start_index: + type: integer + title: Start Index + type: object + required: + - container_id + - end_index + - file_id + - filename + - start_index + title: OpenAIResponseAnnotationContainerFileCitation + OpenAIResponseAnnotationFileCitation: + properties: + type: + type: string + const: file_citation + title: Type + default: file_citation + file_id: + type: string + title: File Id + filename: + type: string + title: Filename + index: + type: integer + title: Index + type: object + required: + - file_id + - filename + - index + title: OpenAIResponseAnnotationFileCitation + description: "File citation annotation for referencing specific files in response content.\n\n:param type: Annotation type identifier, always \"file_citation\"\n:param file_id: Unique identifier of the referenced file\n:param filename: Name of the referenced file\n:param index: Position index of the citation within the content" + OpenAIResponseAnnotationFilePath: + properties: + type: + type: string + const: file_path + title: Type + default: file_path + file_id: + type: string + title: File Id + index: + type: integer + title: Index + type: object + required: + - file_id + - index + title: OpenAIResponseAnnotationFilePath + OpenAIResponseContentPartRefusal: + properties: + type: + type: string + const: refusal + title: Type + default: refusal + refusal: + type: string + title: Refusal + type: object + required: + - refusal + title: OpenAIResponseContentPartRefusal + description: "Refusal content within a streamed response part.\n\n:param type: Content part type identifier, always \"refusal\"\n:param refusal: Refusal text supplied by the model" + OpenAIResponseError: + properties: + code: + type: string + title: Code + message: + type: string + title: Message + type: object + required: + - code + - message + title: OpenAIResponseError + description: "Error details for failed OpenAI response requests.\n\n:param code: Error code identifying the type of failure\n:param message: Human-readable error message describing the failure" + OpenAIResponseFormatJSONObject: + properties: + type: + type: string + const: json_object + title: Type + default: json_object + type: object + title: OpenAIResponseFormatJSONObject + description: "JSON object response format for OpenAI-compatible chat completion requests.\n\n:param type: Must be \"json_object\" to indicate generic JSON object response format" + OpenAIResponseFormatJSONSchema: + properties: + type: + type: string + const: json_schema + title: Type + default: json_schema + json_schema: + $ref: '#/components/schemas/OpenAIJSONSchema' + type: object + required: + - json_schema + title: OpenAIResponseFormatJSONSchema + description: "JSON schema response format for OpenAI-compatible chat completion requests.\n\n:param type: Must be \"json_schema\" to indicate structured JSON response format\n:param json_schema: The JSON schema specification for the response" + OpenAIResponseFormatText: + properties: + type: + type: string + const: text + title: Type + default: text + type: object + title: OpenAIResponseFormatText + description: "Text response format for OpenAI-compatible chat completion requests.\n\n:param type: Must be \"text\" to indicate plain text response format" + OpenAIResponseInputFunctionToolCallOutput: + properties: + call_id: + type: string + title: Call Id + output: + type: string + title: Output + type: + type: string + const: function_call_output + title: Type + default: function_call_output + id: + title: Id + type: string + status: + title: Status + type: string + type: object + required: + - call_id + - output + title: OpenAIResponseInputFunctionToolCallOutput + description: This represents the output of a function call that gets passed back to the model. + OpenAIResponseInputMessageContentFile: + properties: + type: + type: string + const: input_file + title: Type + default: input_file + file_data: + title: File Data + type: string + file_id: + title: File Id + type: string + file_url: + title: File Url + type: string + filename: + title: Filename + type: string + type: object + title: OpenAIResponseInputMessageContentFile + description: "File content for input messages in OpenAI response format.\n\n:param type: The type of the input item. Always `input_file`.\n:param file_data: The data of the file to be sent to the model.\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param file_url: The URL of the file to be sent to the model.\n:param filename: The name of the file to be sent to the model." + OpenAIResponseInputMessageContentImage: + properties: + detail: + anyOf: + - type: string + const: low + - type: string + const: high + - type: string + const: auto + title: Detail + default: auto + type: + type: string + const: input_image + title: Type + default: input_image + file_id: + title: File Id + type: string + image_url: + title: Image Url + type: string + type: object + title: OpenAIResponseInputMessageContentImage + description: "Image content for input messages in OpenAI response format.\n\n:param detail: Level of detail for image processing, can be \"low\", \"high\", or \"auto\"\n:param type: Content type identifier, always \"input_image\"\n:param file_id: (Optional) The ID of the file to be sent to the model.\n:param image_url: (Optional) URL of the image content" + OpenAIResponseInputMessageContentText: + properties: + text: + type: string + title: Text + type: + type: string + const: input_text + title: Type + default: input_text + type: object + required: + - text + title: OpenAIResponseInputMessageContentText + description: "Text content for input messages in OpenAI response format.\n\n:param text: The text content of the input message\n:param type: Content type identifier, always \"input_text\"" + OpenAIResponseInputToolFileSearch: + properties: + type: + type: string + const: file_search + title: Type + default: file_search + vector_store_ids: + items: + type: string + type: array + title: Vector Store Ids + filters: + title: Filters + additionalProperties: true + type: object + max_num_results: + title: Max Num Results + default: 10 + type: integer + maximum: 50.0 + minimum: 1.0 + ranking_options: + $ref: '#/components/schemas/SearchRankingOptions' + type: object + required: + - vector_store_ids + title: OpenAIResponseInputToolFileSearch + description: "File search tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"file_search\"\n:param vector_store_ids: List of vector store identifiers to search within\n:param filters: (Optional) Additional filters to apply to the search\n:param max_num_results: (Optional) Maximum number of search results to return (1-50)\n:param ranking_options: (Optional) Options for ranking and scoring search results" + OpenAIResponseInputToolFunction: + properties: + type: + type: string + const: function + title: Type + default: function + name: + type: string + title: Name + description: + title: Description + type: string + parameters: + title: Parameters + additionalProperties: true + type: object + strict: + title: Strict + type: boolean + type: object + required: + - name + - parameters + title: OpenAIResponseInputToolFunction + description: "Function tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"function\"\n:param name: Name of the function that can be called\n:param description: (Optional) Description of what the function does\n:param parameters: (Optional) JSON schema defining the function's parameters\n:param strict: (Optional) Whether to enforce strict parameter validation" + OpenAIResponseInputToolMCP: + properties: + type: + type: string + const: mcp + title: Type + default: mcp + server_label: + type: string + title: Server Label + server_url: + type: string + title: Server Url + headers: + title: Headers + additionalProperties: true + type: object + require_approval: + anyOf: + - type: string + const: always + - type: string + const: never + - $ref: '#/components/schemas/ApprovalFilter' + title: Require Approval + default: never + allowed_tools: + anyOf: + - items: + type: string + type: array + - $ref: '#/components/schemas/AllowedToolsFilter' + title: Allowed Tools + type: object + required: + - server_label + - server_url + title: OpenAIResponseInputToolMCP + description: "Model Context Protocol (MCP) tool configuration for OpenAI response inputs.\n\n:param type: Tool type identifier, always \"mcp\"\n:param server_label: Label to identify this MCP server\n:param server_url: URL endpoint of the MCP server\n:param headers: (Optional) HTTP headers to include when connecting to the server\n:param require_approval: Approval requirement for tool calls (\"always\", \"never\", or filter)\n:param allowed_tools: (Optional) Restriction on which tools can be used from this server" + OpenAIResponseInputToolWebSearch: + properties: + type: + anyOf: + - type: string + const: web_search + - type: string + const: web_search_preview + - type: string + const: web_search_preview_2025_03_11 + title: Type + default: web_search + search_context_size: + title: Search Context Size + default: medium + type: string + pattern: ^low|medium|high$ + type: object + title: OpenAIResponseInputToolWebSearch + description: "Web search tool configuration for OpenAI response inputs.\n\n:param type: Web search tool type variant to use\n:param search_context_size: (Optional) Size of search context, must be \"low\", \"medium\", or \"high\"" + OpenAIResponseMCPApprovalRequest: + properties: + arguments: + type: string + title: Arguments + id: + type: string + title: Id + name: + type: string + title: Name + server_label: + type: string + title: Server Label + type: + type: string + const: mcp_approval_request + title: Type + default: mcp_approval_request + type: object + required: + - arguments + - id + - name + - server_label + title: OpenAIResponseMCPApprovalRequest + description: A request for human approval of a tool invocation. + OpenAIResponseMCPApprovalResponse: + properties: + approval_request_id: + type: string + title: Approval Request Id + approve: + type: boolean + title: Approve + type: + type: string + const: mcp_approval_response + title: Type + default: mcp_approval_response + id: + title: Id + type: string + reason: + title: Reason + type: string + type: object + required: + - approval_request_id + - approve + title: OpenAIResponseMCPApprovalResponse + description: A response to an MCP approval request. + OpenAIResponseMessage-Input: + properties: + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + type: array + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + type: array + title: Content + role: + anyOf: + - type: string + const: system + - type: string + const: developer + - type: string + const: user + - type: string + const: assistant + title: Role + type: + type: string + const: message + title: Type + default: message + id: + title: Id + type: string + status: + title: Status + type: string + type: object + required: + - content + - role + title: OpenAIResponseMessage + description: "Corresponds to the various Message types in the Responses API.\nThey are all under one type because the Responses API gives them all\nthe same \"type\" value, and there is no way to tell them apart in certain\nscenarios." + OpenAIResponseMessage-Output: + properties: + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + type: array + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + discriminator: + propertyName: type + mapping: + output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' + type: array + title: Content + role: + anyOf: + - type: string + const: system + - type: string + const: developer + - type: string + const: user + - type: string + const: assistant + title: Role + type: + type: string + const: message + title: Type + default: message + id: + title: Id + type: string + status: + title: Status + type: string + type: object + required: + - content + - role + title: OpenAIResponseMessage + description: "Corresponds to the various Message types in the Responses API.\nThey are all under one type because the Responses API gives them all\nthe same \"type\" value, and there is no way to tell them apart in certain\nscenarios." + OpenAIResponseObject: + properties: + created_at: + type: integer + title: Created At + error: + $ref: '#/components/schemas/OpenAIResponseError' + id: + type: string + title: Id + model: + type: string + title: Model + object: + type: string + const: response + title: Object + default: response + output: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Output' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + discriminator: + propertyName: type + mapping: + file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + message: '#/components/schemas/OpenAIResponseMessage-Output' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + type: array + title: Output + parallel_tool_calls: + type: boolean + title: Parallel Tool Calls + default: false + previous_response_id: + title: Previous Response Id + type: string + prompt: + $ref: '#/components/schemas/OpenAIResponsePrompt' + status: + type: string + title: Status + temperature: + title: Temperature + type: number + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + title: Top P + type: number + tools: + title: Tools + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + discriminator: + propertyName: type + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + type: array + truncation: + title: Truncation + type: string + usage: + $ref: '#/components/schemas/OpenAIResponseUsage' + instructions: + title: Instructions + type: string + type: object + required: + - created_at + - id + - model + - output + - status + title: OpenAIResponseObject + description: "Complete OpenAI response object containing generation results and metadata.\n\n:param created_at: Unix timestamp when the response was created\n:param error: (Optional) Error details if the response generation failed\n:param id: Unique identifier for this response\n:param model: Model identifier used for generation\n:param object: Object type identifier, always \"response\"\n:param output: List of generated output items (messages, tool calls, etc.)\n:param parallel_tool_calls: Whether tool calls can be executed in parallel\n:param previous_response_id: (Optional) ID of the previous response in a conversation\n:param prompt: (Optional) Reference to a prompt template and its variables.\n:param status: Current status of the response generation\n:param temperature: (Optional) Sampling temperature used for generation\n:param text: Text formatting configuration for the response\n:param top_p: (Optional) Nucleus sampling parameter used for generation\n:param tools: (Optional) An array of tools the model may call while generating a response.\n:param truncation: (Optional) Truncation strategy applied to the response\n:param usage: (Optional) Token usage information for the response\n:param instructions: (Optional) System message inserted into the model's context" + OpenAIResponseOutputMessageContentOutputText: + properties: + text: + type: string + title: Text + type: + type: string + const: output_text + title: Type + default: output_text + annotations: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' + discriminator: + propertyName: type + mapping: + container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' + file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' + file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' + url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' + type: array + title: Annotations + type: object + required: + - text + title: OpenAIResponseOutputMessageContentOutputText + OpenAIResponseOutputMessageFileSearchToolCall: + properties: + id: + type: string + title: Id + queries: + items: + type: string + type: array + title: Queries + status: + type: string + title: Status + type: + type: string + const: file_search_call + title: Type + default: file_search_call + results: + title: Results + items: + $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCallResults' + type: array + type: object + required: + - id + - queries + - status + title: OpenAIResponseOutputMessageFileSearchToolCall + description: "File search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param queries: List of search queries executed\n:param status: Current status of the file search operation\n:param type: Tool call type identifier, always \"file_search_call\"\n:param results: (Optional) Search results returned by the file search operation" + OpenAIResponseOutputMessageFileSearchToolCallResults: + properties: + attributes: + additionalProperties: true + type: object + title: Attributes + file_id: + type: string + title: File Id + filename: + type: string + title: Filename + score: + type: number + title: Score + text: + type: string + title: Text + type: object + required: + - attributes + - file_id + - filename + - score + - text + title: OpenAIResponseOutputMessageFileSearchToolCallResults + description: "Search results returned by the file search operation.\n\n:param attributes: (Optional) Key-value attributes associated with the file\n:param file_id: Unique identifier of the file containing the result\n:param filename: Name of the file containing the result\n:param score: Relevance score for this search result (between 0 and 1)\n:param text: Text content of the search result" + OpenAIResponseOutputMessageFunctionToolCall: + properties: + call_id: + type: string + title: Call Id + name: + type: string + title: Name + arguments: + type: string + title: Arguments + type: + type: string + const: function_call + title: Type + default: function_call + id: + title: Id + type: string + status: + title: Status + type: string + type: object + required: + - call_id + - name + - arguments + title: OpenAIResponseOutputMessageFunctionToolCall + description: "Function tool call output message for OpenAI responses.\n\n:param call_id: Unique identifier for the function call\n:param name: Name of the function being called\n:param arguments: JSON string containing the function arguments\n:param type: Tool call type identifier, always \"function_call\"\n:param id: (Optional) Additional identifier for the tool call\n:param status: (Optional) Current status of the function call execution" + OpenAIResponseOutputMessageMCPCall: + properties: + id: + type: string + title: Id + type: + type: string + const: mcp_call + title: Type + default: mcp_call + arguments: + type: string + title: Arguments + name: + type: string + title: Name + server_label: + type: string + title: Server Label + error: + title: Error + type: string + output: + title: Output + type: string + type: object + required: + - id + - arguments + - name + - server_label + title: OpenAIResponseOutputMessageMCPCall + description: "Model Context Protocol (MCP) call output message for OpenAI responses.\n\n:param id: Unique identifier for this MCP call\n:param type: Tool call type identifier, always \"mcp_call\"\n:param arguments: JSON string containing the MCP call arguments\n:param name: Name of the MCP method being called\n:param server_label: Label identifying the MCP server handling the call\n:param error: (Optional) Error message if the MCP call failed\n:param output: (Optional) Output result from the successful MCP call" + OpenAIResponseOutputMessageMCPListTools: + properties: + id: + type: string + title: Id + type: + type: string + const: mcp_list_tools + title: Type + default: mcp_list_tools + server_label: + type: string + title: Server Label + tools: + items: + $ref: '#/components/schemas/MCPListToolsTool' + type: array + title: Tools + type: object + required: + - id + - server_label + - tools + title: OpenAIResponseOutputMessageMCPListTools + description: "MCP list tools output message containing available tools from an MCP server.\n\n:param id: Unique identifier for this MCP list tools operation\n:param type: Tool call type identifier, always \"mcp_list_tools\"\n:param server_label: Label identifying the MCP server providing the tools\n:param tools: List of available tools provided by the MCP server" + OpenAIResponseOutputMessageWebSearchToolCall: + properties: + id: + type: string + title: Id + status: + type: string + title: Status + type: + type: string + const: web_search_call + title: Type + default: web_search_call + type: object + required: + - id + - status + title: OpenAIResponseOutputMessageWebSearchToolCall + description: "Web search tool call output message for OpenAI responses.\n\n:param id: Unique identifier for this tool call\n:param status: Current status of the web search operation\n:param type: Tool call type identifier, always \"web_search_call\"" + OpenAIResponsePrompt: + properties: + id: + type: string + title: Id + variables: + title: Variables + additionalProperties: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + discriminator: + propertyName: type + mapping: + input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' + input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' + input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' + type: object + version: + title: Version + type: string + type: object + required: + - id + title: OpenAIResponsePrompt + description: "OpenAI compatible Prompt object that is used in OpenAI responses.\n\n:param id: Unique identifier of the prompt template\n:param variables: Dictionary of variable names to OpenAIResponseInputMessageContent structure for template substitution. The substitution values can either be strings, or other Response input types\nlike images or files.\n:param version: Version number of the prompt to use (defaults to latest if not specified)" + OpenAIResponseText: + properties: + format: + $ref: '#/components/schemas/OpenAIResponseTextFormat' + type: object + title: OpenAIResponseText + description: "Text response configuration for OpenAI responses.\n\n:param format: (Optional) Text format configuration specifying output format requirements" + OpenAIResponseTextFormat: + properties: + type: + anyOf: + - type: string + const: text + - type: string + const: json_schema + - type: string + const: json_object + title: Type + name: + title: Name + type: string + schema: + title: Schema + additionalProperties: true + type: object + description: + title: Description + type: string + strict: + title: Strict + type: boolean + type: object + title: OpenAIResponseTextFormat + description: "Configuration for Responses API text format.\n\n:param type: Must be \"text\", \"json_schema\", or \"json_object\" to identify the format type\n:param name: The name of the response format. Only used for json_schema.\n:param schema: The JSON schema the response should conform to. In a Python SDK, this is often a `pydantic` model. Only used for json_schema.\n:param description: (Optional) A description of the response format. Only used for json_schema.\n:param strict: (Optional) Whether to strictly enforce the JSON schema. If true, the response must match the schema exactly. Only used for json_schema." + OpenAIResponseToolMCP: + properties: + type: + type: string + const: mcp + title: Type + default: mcp + server_label: + type: string + title: Server Label + allowed_tools: + anyOf: + - items: + type: string + type: array + - $ref: '#/components/schemas/AllowedToolsFilter' + title: Allowed Tools + type: object + required: + - server_label + title: OpenAIResponseToolMCP + description: "Model Context Protocol (MCP) tool configuration for OpenAI response object.\n\n:param type: Tool type identifier, always \"mcp\"\n:param server_label: Label to identify this MCP server\n:param allowed_tools: (Optional) Restriction on which tools can be used from this server" + OpenAIResponseUsage: + properties: + input_tokens: + type: integer + title: Input Tokens + output_tokens: + type: integer + title: Output Tokens + total_tokens: + type: integer + title: Total Tokens + input_tokens_details: + $ref: '#/components/schemas/OpenAIResponseUsageInputTokensDetails' + output_tokens_details: + $ref: '#/components/schemas/OpenAIResponseUsageOutputTokensDetails' + type: object + required: + - input_tokens + - output_tokens + - total_tokens + title: OpenAIResponseUsage + description: "Usage information for OpenAI response.\n\n:param input_tokens: Number of tokens in the input\n:param output_tokens: Number of tokens in the output\n:param total_tokens: Total tokens used (input + output)\n:param input_tokens_details: Detailed breakdown of input token usage\n:param output_tokens_details: Detailed breakdown of output token usage" + OpenAIResponseUsageInputTokensDetails: + properties: + cached_tokens: + title: Cached Tokens + type: integer + type: object + title: OpenAIResponseUsageInputTokensDetails + description: "Token details for input tokens in OpenAI response usage.\n\n:param cached_tokens: Number of tokens retrieved from cache" + OpenAIResponseUsageOutputTokensDetails: + properties: + reasoning_tokens: + title: Reasoning Tokens + type: integer + type: object + title: OpenAIResponseUsageOutputTokensDetails + description: "Token details for output tokens in OpenAI response usage.\n\n:param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models)" + OpenAISystemMessageParam: + properties: + role: + type: string + const: system + title: Role + default: system + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: Content + name: + title: Name + type: string + type: object + required: + - content + title: OpenAISystemMessageParam + description: "A system message providing instructions or context to the model.\n\n:param role: Must be \"system\" to identify this as a system message\n:param content: The content of the \"system prompt\". If multiple system messages are provided, they are concatenated. The underlying Llama Stack code may also add other system messages (for example, for formatting tool definitions).\n:param name: (Optional) The name of the system message participant." + OpenAITokenLogProb: + properties: + token: + type: string + title: Token + bytes: + title: Bytes + items: + type: integer + type: array + logprob: + type: number + title: Logprob + top_logprobs: + items: + $ref: '#/components/schemas/OpenAITopLogProb' + type: array + title: Top Logprobs + type: object + required: + - token + - logprob + - top_logprobs + title: OpenAITokenLogProb + description: "The log probability for a token from an OpenAI-compatible chat completion response.\n\n:token: The token\n:bytes: (Optional) The bytes for the token\n:logprob: The log probability of the token\n:top_logprobs: The top log probabilities for the token" + OpenAIToolMessageParam: + properties: + role: + type: string + const: tool + title: Role + default: tool + tool_call_id: + type: string + title: Tool Call Id + content: + anyOf: + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: Content + type: object + required: + - tool_call_id + - content + title: OpenAIToolMessageParam + description: "A message representing the result of a tool invocation in an OpenAI-compatible chat completion request.\n\n:param role: Must be \"tool\" to identify this as a tool response\n:param tool_call_id: Unique identifier for the tool call this response is for\n:param content: The response content from the tool" + OpenAITopLogProb: + properties: + token: + type: string + title: Token + bytes: + title: Bytes + items: + type: integer + type: array + logprob: + type: number + title: Logprob + type: object + required: + - token + - logprob + title: OpenAITopLogProb + description: "The top log probability for a token from an OpenAI-compatible chat completion response.\n\n:token: The token\n:bytes: (Optional) The bytes for the token\n:logprob: The log probability of the token" + OpenAIUserMessageParam-Input: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + - $ref: '#/components/schemas/OpenAIFile' + discriminator: + propertyName: type + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: Content + name: + title: Name + type: string + type: object + required: + - content + title: OpenAIUserMessageParam + description: "A message from the user in an OpenAI-compatible chat completion request.\n\n:param role: Must be \"user\" to identify this as a user message\n:param content: The content of the message, which can include text and other media\n:param name: (Optional) The name of the user message participant." + OpenAIUserMessageParam-Output: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - items: + oneOf: + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + - $ref: '#/components/schemas/OpenAIFile' + discriminator: + propertyName: type + mapping: + file: '#/components/schemas/OpenAIFile' + image_url: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + text: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: Content + name: + title: Name + type: string + type: object + required: + - content + title: OpenAIUserMessageParam + description: "A message from the user in an OpenAI-compatible chat completion request.\n\n:param role: Must be \"user\" to identify this as a user message\n:param content: The content of the message, which can include text and other media\n:param name: (Optional) The name of the user message participant." + OptimizerConfig: + properties: + optimizer_type: + $ref: '#/components/schemas/OptimizerType' + lr: + type: number + title: Lr + weight_decay: + type: number + title: Weight Decay + num_warmup_steps: + type: integer + title: Num Warmup Steps + type: object + required: + - optimizer_type + - lr + - weight_decay + - num_warmup_steps + title: OptimizerConfig + description: "Configuration parameters for the optimization algorithm.\n\n:param optimizer_type: Type of optimizer to use (adam, adamw, or sgd)\n:param lr: Learning rate for the optimizer\n:param weight_decay: Weight decay coefficient for regularization\n:param num_warmup_steps: Number of steps for learning rate warmup" + OptimizerType: + type: string + enum: + - adam + - adamw + - sgd + title: OptimizerType + description: "Available optimizer algorithms for training.\n:cvar adam: Adaptive Moment Estimation optimizer\n:cvar adamw: AdamW optimizer with weight decay\n:cvar sgd: Stochastic Gradient Descent optimizer" + Order: + type: string + enum: + - asc + - desc + title: Order + description: "Sort order for paginated responses.\n:cvar asc: Ascending order\n:cvar desc: Descending order" + OutputTokensDetails: + properties: + reasoning_tokens: + type: integer + title: Reasoning Tokens + additionalProperties: true + type: object + required: + - reasoning_tokens + title: OutputTokensDetails + PostTrainingJob: + properties: + job_uuid: + type: string + title: Job Uuid + type: object + required: + - job_uuid + title: PostTrainingJob + Prompt: + properties: + prompt: + title: Prompt + description: The system prompt with variable placeholders + type: string + version: + type: integer + minimum: 1.0 + title: Version + description: Version (integer starting at 1, incremented on save) + prompt_id: + type: string + title: Prompt Id + description: Unique identifier in format 'pmpt_<48-digit-hash>' + variables: + items: + type: string + type: array + title: Variables + description: List of variable names that can be used in the prompt template + is_default: + type: boolean + title: Is Default + description: Boolean indicating whether this version is the default version + default: false + type: object + required: + - version + - prompt_id + title: Prompt + description: "A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack.\n\n:param prompt: The system prompt text with variable placeholders. Variables are only supported when using the Responses API.\n:param version: Version (integer starting at 1, incremented on save)\n:param prompt_id: Unique identifier formatted as 'pmpt_<48-digit-hash>'\n:param variables: List of prompt variable names that can be used in the prompt template\n:param is_default: Boolean indicating whether this version is the default version for this prompt" + ProviderInfo: + properties: + api: + type: string + title: Api + provider_id: + type: string + title: Provider Id + provider_type: + type: string + title: Provider Type + config: + additionalProperties: true + type: object + title: Config + health: + additionalProperties: true + type: object + title: Health + type: object + required: + - api + - provider_id + - provider_type + - config + - health + title: ProviderInfo + description: "Information about a registered provider including its configuration and health status.\n\n:param api: The API name this provider implements\n:param provider_id: Unique identifier for the provider\n:param provider_type: The type of provider implementation\n:param config: Configuration parameters for the provider\n:param health: Current health status of the provider" + QueryChunksResponse: + properties: + chunks: + items: + $ref: '#/components/schemas/Chunk-Output' + type: array + title: Chunks + scores: + items: + type: number + type: array + title: Scores + type: object + required: + - chunks + - scores + title: QueryChunksResponse + description: "Response from querying chunks in a vector database.\n\n:param chunks: List of content chunks returned from the query\n:param scores: Relevance scores corresponding to each returned chunk" + RAGQueryConfig: + properties: + query_generator_config: + oneOf: + - $ref: '#/components/schemas/DefaultRAGQueryGeneratorConfig' + - $ref: '#/components/schemas/LLMRAGQueryGeneratorConfig' + title: Query Generator Config + default: + type: default + separator: ' ' + discriminator: + propertyName: type + mapping: + default: '#/components/schemas/DefaultRAGQueryGeneratorConfig' + llm: '#/components/schemas/LLMRAGQueryGeneratorConfig' + max_tokens_in_context: + type: integer + title: Max Tokens In Context + default: 4096 + max_chunks: + type: integer + title: Max Chunks + default: 5 + chunk_template: + type: string + title: Chunk Template + default: "Result {index}\nContent: {chunk.content}\nMetadata: {metadata}\n" + mode: + default: vector + $ref: '#/components/schemas/RAGSearchMode' + ranker: + title: Ranker + oneOf: + - $ref: '#/components/schemas/RRFRanker' + - $ref: '#/components/schemas/WeightedRanker' + discriminator: + propertyName: type + mapping: + rrf: '#/components/schemas/RRFRanker' + weighted: '#/components/schemas/WeightedRanker' + type: object + title: RAGQueryConfig + description: "Configuration for the RAG query generation.\n\n:param query_generator_config: Configuration for the query generator.\n:param max_tokens_in_context: Maximum number of tokens in the context.\n:param max_chunks: Maximum number of chunks to retrieve.\n:param chunk_template: Template for formatting each retrieved chunk in the context.\n Available placeholders: {index} (1-based chunk ordinal), {chunk.content} (chunk content string), {metadata} (chunk metadata dict).\n Default: \"Result {index}\\nContent: {chunk.content}\\nMetadata: {metadata}\\n\"\n:param mode: Search mode for retrievalβ€”either \"vector\", \"keyword\", or \"hybrid\". Default \"vector\".\n:param ranker: Configuration for the ranker to use in hybrid search. Defaults to RRF ranker." + RAGQueryResult: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + title: RAGQueryResult + description: "Result of a RAG query containing retrieved content and metadata.\n\n:param content: (Optional) The retrieved content from the query\n:param metadata: Additional metadata about the query result" + RAGSearchMode: + type: string + enum: + - vector + - keyword + - hybrid + title: RAGSearchMode + description: "Search modes for RAG query retrieval:\n- VECTOR: Uses vector similarity search for semantic matching\n- KEYWORD: Uses keyword-based search for exact matching\n- HYBRID: Combines both vector and keyword search for better results" + RRFRanker: + properties: + type: + type: string + const: rrf + title: Type + default: rrf + impact_factor: + type: number + title: Impact Factor + default: 60.0 + minimum: 0.0 + type: object + title: RRFRanker + description: "Reciprocal Rank Fusion (RRF) ranker configuration.\n\n:param type: The type of ranker, always \"rrf\"\n:param impact_factor: The impact factor for RRF scoring. Higher values give more weight to higher-ranked results.\n Must be greater than 0" + RegexParserScoringFnParams: + properties: + type: + type: string + const: regex_parser + title: Type + default: regex_parser + parsing_regexes: + items: + type: string + type: array + title: Parsing Regexes + description: Regex to extract the answer from generated response + aggregation_functions: + items: + $ref: '#/components/schemas/AggregationFunctionType' + type: array + title: Aggregation Functions + description: Aggregation functions to apply to the scores of each row + type: object + title: RegexParserScoringFnParams + description: "Parameters for regex parser scoring function configuration.\n:param type: The type of scoring function parameters, always regex_parser\n:param parsing_regexes: Regex to extract the answer from generated response\n:param aggregation_functions: Aggregation functions to apply to the scores of each row" + RerankData: + properties: + index: + type: integer + title: Index + relevance_score: + type: number + title: Relevance Score + type: object + required: + - index + - relevance_score + title: RerankData + description: "A single rerank result from a reranking response.\n\n:param index: The original index of the document in the input list\n:param relevance_score: The relevance score from the model output. Values are inverted when applicable so that higher scores indicate greater relevance." + RerankResponse: + properties: + data: + items: + $ref: '#/components/schemas/RerankData' + type: array + title: Data + type: object + required: + - data + title: RerankResponse + description: "Response from a reranking request.\n\n:param data: List of rerank result objects, sorted by relevance score (descending)" + RouteInfo: + properties: + route: + type: string + title: Route + method: + type: string + title: Method + provider_types: + items: + type: string + type: array + title: Provider Types + type: object + required: + - route + - method + - provider_types + title: RouteInfo + description: "Information about an API route including its path, method, and implementing providers.\n\n:param route: The API endpoint path\n:param method: HTTP method for the route\n:param provider_types: List of provider types that implement this route" + RowsDataSource: + properties: + type: + type: string + const: rows + title: Type + default: rows + rows: + items: + additionalProperties: true + type: object + type: array + title: Rows + type: object + required: + - rows + title: RowsDataSource + description: "A dataset stored in rows.\n:param rows: The dataset is stored in rows. E.g.\n - [\n {\"messages\": [{\"role\": \"user\", \"content\": \"Hello, world!\"}, {\"role\": \"assistant\", \"content\": \"Hello, world!\"}]}\n ]" + RunShieldResponse: + properties: + violation: + $ref: '#/components/schemas/SafetyViolation' + type: object + title: RunShieldResponse + description: "Response from running a safety shield.\n\n:param violation: (Optional) Safety violation detected by the shield, if any" + SafetyViolation: + properties: + violation_level: + $ref: '#/components/schemas/ViolationLevel' + user_message: + title: User Message + type: string + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - violation_level + title: SafetyViolation + description: "Details of a safety violation detected by content moderation.\n\n:param violation_level: Severity level of the violation\n:param user_message: (Optional) Message to convey to the user about the violation\n:param metadata: Additional metadata including specific violation codes for debugging and telemetry" + SamplingParams: + properties: + strategy: + oneOf: + - $ref: '#/components/schemas/GreedySamplingStrategy' + - $ref: '#/components/schemas/TopPSamplingStrategy' + - $ref: '#/components/schemas/TopKSamplingStrategy' + title: Strategy + discriminator: + propertyName: type + mapping: + greedy: '#/components/schemas/GreedySamplingStrategy' + top_k: '#/components/schemas/TopKSamplingStrategy' + top_p: '#/components/schemas/TopPSamplingStrategy' + max_tokens: + title: Max Tokens + type: integer + repetition_penalty: + title: Repetition Penalty + default: 1.0 + type: number + stop: + title: Stop + items: + type: string + type: array + type: object + title: SamplingParams + description: "Sampling parameters.\n\n:param strategy: The sampling strategy.\n:param max_tokens: The maximum number of tokens that can be generated in the completion. The token count of\n your prompt plus max_tokens cannot exceed the model's context length.\n:param repetition_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens\n based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n:param stop: Up to 4 sequences where the API will stop generating further tokens.\n The returned text will not contain the stop sequence." + ScoreBatchResponse: + properties: + dataset_id: + title: Dataset Id + type: string + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Results + type: object + required: + - results + title: ScoreBatchResponse + description: "Response from batch scoring operations on datasets.\n\n:param dataset_id: (Optional) The identifier of the dataset that was scored\n:param results: A map of scoring function name to ScoringResult" + ScoreResponse: + properties: + results: + additionalProperties: + $ref: '#/components/schemas/ScoringResult' + type: object + title: Results + type: object + required: + - results + title: ScoreResponse + description: "The response from scoring.\n\n:param results: A map of scoring function name to ScoringResult." + ScoringFn-Output: + properties: + identifier: + type: string + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: + title: Provider Resource Id + description: Unique identifier for this resource in the provider + type: string + provider_id: + type: string + title: Provider Id + description: ID of the provider that owns this resource + type: + type: string + const: scoring_function + title: Type + default: scoring_function + description: + title: Description + type: string + metadata: + additionalProperties: true + type: object + title: Metadata + description: Any additional metadata for this definition + return_type: + oneOf: + - $ref: '#/components/schemas/StringType' + - $ref: '#/components/schemas/NumberType' + - $ref: '#/components/schemas/BooleanType' + - $ref: '#/components/schemas/ArrayType' + - $ref: '#/components/schemas/ObjectType' + - $ref: '#/components/schemas/JsonType' + - $ref: '#/components/schemas/UnionType' + - $ref: '#/components/schemas/ChatCompletionInputType' + - $ref: '#/components/schemas/CompletionInputType' + - $ref: '#/components/schemas/AgentTurnInputType' + title: Return Type + description: The return type of the deterministic function + discriminator: + propertyName: type + mapping: + agent_turn_input: '#/components/schemas/AgentTurnInputType' + array: '#/components/schemas/ArrayType' + boolean: '#/components/schemas/BooleanType' + chat_completion_input: '#/components/schemas/ChatCompletionInputType' + completion_input: '#/components/schemas/CompletionInputType' + json: '#/components/schemas/JsonType' + number: '#/components/schemas/NumberType' + object: '#/components/schemas/ObjectType' + string: '#/components/schemas/StringType' + union: '#/components/schemas/UnionType' + params: + title: Params + description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + - $ref: '#/components/schemas/RegexParserScoringFnParams' + - $ref: '#/components/schemas/BasicScoringFnParams' + discriminator: + propertyName: type + mapping: + basic: '#/components/schemas/BasicScoringFnParams' + llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams' + regex_parser: '#/components/schemas/RegexParserScoringFnParams' + type: object + required: + - identifier + - provider_id + - return_type + title: ScoringFn + description: "A scoring function resource for evaluating model outputs.\n:param type: The resource type, always scoring_function" + ScoringResult: + properties: + score_rows: + items: + additionalProperties: true + type: object + type: array + title: Score Rows + aggregated_results: + additionalProperties: true + type: object + title: Aggregated Results + type: object + required: + - score_rows + - aggregated_results + title: ScoringResult + description: "A scoring result for a single row.\n\n:param score_rows: The scoring result for each row. Each row is a map of column name to value.\n:param aggregated_results: Map of metric name to aggregated value" + SearchRankingOptions: + properties: + ranker: + title: Ranker + type: string + score_threshold: + title: Score Threshold + default: 0.0 + type: number + type: object + title: SearchRankingOptions + description: "Options for ranking and filtering search results.\n\n:param ranker: (Optional) Name of the ranking algorithm to use\n:param score_threshold: (Optional) Minimum relevance score threshold for results" + Shield: + properties: + identifier: + type: string + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: + title: Provider Resource Id + description: Unique identifier for this resource in the provider + type: string + provider_id: + type: string + title: Provider Id + description: ID of the provider that owns this resource + type: + type: string + const: shield + title: Type + default: shield + params: + title: Params + additionalProperties: true + type: object + type: object + required: + - identifier + - provider_id + title: Shield + description: "A safety shield resource that can be used to check content.\n\n:param params: (Optional) Configuration parameters for the shield\n:param type: The resource type, always shield" + ShieldCallStep-Output: + properties: + turn_id: + type: string + title: Turn Id + step_id: + type: string + title: Step Id + started_at: + title: Started At + type: string + format: date-time + completed_at: + title: Completed At + type: string + format: date-time + step_type: + type: string + const: shield_call + title: Step Type + default: shield_call + violation: + $ref: '#/components/schemas/SafetyViolation' + type: object + required: + - turn_id + - step_id + - violation + title: ShieldCallStep + description: "A shield call step in an agent turn.\n\n:param violation: The violation from the shield call." + StopReason: + type: string + enum: + - end_of_turn + - end_of_message + - out_of_tokens + title: StopReason + StringType: + properties: + type: + type: string + const: string + title: Type + default: string + type: object + title: StringType + description: "Parameter type for string values.\n\n:param type: Discriminator type. Always \"string\"" + SystemMessage: + properties: + role: + type: string + const: system + title: Role + default: system + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + type: object + required: + - content + title: SystemMessage + description: "A system message providing instructions or context to the model.\n\n:param role: Must be \"system\" to identify this as a system message\n:param content: The content of the \"system prompt\". If multiple system messages are provided, they are concatenated. The underlying Llama Stack code may also add other system messages (for example, for formatting tool definitions)." + SystemMessageBehavior: + type: string + enum: + - append + - replace + title: SystemMessageBehavior + description: "Config for how to override the default system prompt.\n\n:cvar append: Appends the provided system message to the default system prompt:\n https://www.llama.com/docs/model-cards-and-prompt-formats/llama3_2/#-function-definitions-in-the-system-prompt-\n:cvar replace: Replaces the default system prompt with the provided system message. The system message can include the string\n '{{function_definitions}}' to indicate where the function definitions should be inserted." + TextContentItem: + properties: + type: + type: string + const: text + title: Type + default: text + text: + type: string + title: Text + type: object + required: + - text + title: TextContentItem + description: "A text content item\n\n:param type: Discriminator type of the content item. Always \"text\"\n:param text: Text content" + ToolCall: + properties: + call_id: + type: string + title: Call Id + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + arguments: + type: string + title: Arguments + type: object + required: + - call_id + - tool_name + - arguments + title: ToolCall + ToolChoice: + type: string + enum: + - auto + - required + - none + title: ToolChoice + description: "Whether tool use is required or automatic. This is a hint to the model which may not be followed. It depends on the Instruction Following capabilities of the model.\n\n:cvar auto: The model may use tools if it determines that is appropriate.\n:cvar required: The model must use tools.\n:cvar none: The model must not use tools." + ToolConfig: + properties: + tool_choice: + anyOf: + - $ref: '#/components/schemas/ToolChoice' + - type: string + title: Tool Choice + default: auto + tool_prompt_format: + $ref: '#/components/schemas/ToolPromptFormat' + system_message_behavior: + default: append + $ref: '#/components/schemas/SystemMessageBehavior' + type: object + title: ToolConfig + description: "Configuration for tool use.\n\n:param tool_choice: (Optional) Whether tool use is automatic, required, or none. Can also specify a tool name to use a specific tool. Defaults to ToolChoice.auto.\n:param tool_prompt_format: (Optional) Instructs the model how to format tool calls. By default, Llama Stack will attempt to use a format that is best adapted to the model.\n - `ToolPromptFormat.json`: The tool calls are formatted as a JSON object.\n - `ToolPromptFormat.function_tag`: The tool calls are enclosed in a tag.\n - `ToolPromptFormat.python_list`: The tool calls are output as Python syntax -- a list of function calls.\n:param system_message_behavior: (Optional) Config for how to override the default system prompt.\n - `SystemMessageBehavior.append`: Appends the provided system message to the default system prompt.\n - `SystemMessageBehavior.replace`: Replaces the default system prompt with the provided system message. The system message can include the string\n '{{function_definitions}}' to indicate where the function definitions should be inserted." + ToolDef: + properties: + toolgroup_id: + title: Toolgroup Id + type: string + name: + type: string + title: Name + description: + title: Description + type: string + input_schema: + title: Input Schema + additionalProperties: true + type: object + output_schema: + title: Output Schema + additionalProperties: true + type: object + metadata: + title: Metadata + additionalProperties: true + type: object + type: object + required: + - name + title: ToolDef + description: "Tool definition used in runtime contexts.\n\n:param name: Name of the tool\n:param description: (Optional) Human-readable description of what the tool does\n:param input_schema: (Optional) JSON Schema for tool inputs (MCP inputSchema)\n:param output_schema: (Optional) JSON Schema for tool outputs (MCP outputSchema)\n:param metadata: (Optional) Additional metadata about the tool\n:param toolgroup_id: (Optional) ID of the tool group this tool belongs to" + ToolExecutionStep-Output: + properties: + turn_id: + type: string + title: Turn Id + step_id: + type: string + title: Step Id + started_at: + title: Started At + type: string + format: date-time + completed_at: + title: Completed At + type: string + format: date-time + step_type: + type: string + const: tool_execution + title: Step Type + default: tool_execution + tool_calls: + items: + $ref: '#/components/schemas/ToolCall' + type: array + title: Tool Calls + tool_responses: + items: + $ref: '#/components/schemas/ToolResponse-Output' + type: array + title: Tool Responses + type: object + required: + - turn_id + - step_id + - tool_calls + - tool_responses + title: ToolExecutionStep + description: "A tool execution step in an agent turn.\n\n:param tool_calls: The tool calls to execute.\n:param tool_responses: The tool responses from the tool calls." + ToolGroup: + properties: + identifier: + type: string + title: Identifier + description: Unique identifier for this resource in llama stack + provider_resource_id: + title: Provider Resource Id + description: Unique identifier for this resource in the provider + type: string + provider_id: + type: string + title: Provider Id + description: ID of the provider that owns this resource + type: + type: string + const: tool_group + title: Type + default: tool_group + mcp_endpoint: + $ref: '#/components/schemas/URL' + args: + title: Args + additionalProperties: true + type: object + type: object + required: + - identifier + - provider_id + title: ToolGroup + description: "A group of related tools managed together.\n\n:param type: Type of resource, always 'tool_group'\n:param mcp_endpoint: (Optional) Model Context Protocol endpoint for remote tools\n:param args: (Optional) Additional arguments for the tool group" + ToolInvocationResult: + properties: + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + error_message: + title: Error Message + type: string + error_code: + title: Error Code + type: integer + metadata: + title: Metadata + additionalProperties: true + type: object + type: object + title: ToolInvocationResult + description: "Result of a tool invocation.\n\n:param content: (Optional) The output content from the tool execution\n:param error_message: (Optional) Error message if the tool execution failed\n:param error_code: (Optional) Numeric error code if the tool execution failed\n:param metadata: (Optional) Additional metadata about the tool execution" + ToolPromptFormat: + type: string + enum: + - json + - function_tag + - python_list + title: ToolPromptFormat + description: "Prompt format for calling custom / zero shot tools.\n\n:cvar json: JSON format for calling tools. It takes the form:\n {\n \"type\": \"function\",\n \"function\" : {\n \"name\": \"function_name\",\n \"description\": \"function_description\",\n \"parameters\": {...}\n }\n }\n:cvar function_tag: Function tag format, pseudo-XML. This looks like:\n (parameters)\n\n:cvar python_list: Python list. The output is a valid Python expression that can be\n evaluated to a list. Each element in the list is a function call. Example:\n [\"function_name(param1, param2)\", \"function_name(param1, param2)\"]" + ToolResponse-Input: + properties: + call_id: + type: string + title: Call Id + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + metadata: + title: Metadata + additionalProperties: true + type: object + type: object + required: + - call_id + - tool_name + - content + title: ToolResponse + description: "Response from a tool invocation.\n\n:param call_id: Unique identifier for the tool call this response is for\n:param tool_name: Name of the tool that was invoked\n:param content: The response content from the tool\n:param metadata: (Optional) Additional metadata about the tool response" + ToolResponse-Output: + properties: + call_id: + type: string + title: Call Id + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + metadata: + title: Metadata + additionalProperties: true + type: object + type: object + required: + - call_id + - tool_name + - content + title: ToolResponse + description: "Response from a tool invocation.\n\n:param call_id: Unique identifier for the tool call this response is for\n:param tool_name: Name of the tool that was invoked\n:param content: The response content from the tool\n:param metadata: (Optional) Additional metadata about the tool response" + ToolResponseMessage-Output: + properties: + role: + type: string + const: tool + title: Role + default: tool + call_id: + type: string + title: Call Id + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + type: object + required: + - call_id + - content + title: ToolResponseMessage + description: "A message representing the result of a tool invocation.\n\n:param role: Must be \"tool\" to identify this as a tool response\n:param call_id: Unique identifier for the tool call this response is for\n:param content: The response content from the tool" + TopKSamplingStrategy: + properties: + type: + type: string + const: top_k + title: Type + default: top_k + top_k: + type: integer + minimum: 1.0 + title: Top K + type: object + required: + - top_k + title: TopKSamplingStrategy + description: "Top-k sampling strategy that restricts sampling to the k most likely tokens.\n\n:param type: Must be \"top_k\" to identify this sampling strategy\n:param top_k: Number of top tokens to consider for sampling. Must be at least 1" + TopPSamplingStrategy: + properties: + type: + type: string + const: top_p + title: Type + default: top_p + temperature: + title: Temperature + type: number + minimum: 0.0 + top_p: + title: Top P + default: 0.95 + type: number + type: object + required: + - temperature + title: TopPSamplingStrategy + description: "Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p.\n\n:param type: Must be \"top_p\" to identify this sampling strategy\n:param temperature: Controls randomness in sampling. Higher values increase randomness\n:param top_p: Cumulative probability threshold for nucleus sampling. Defaults to 0.95" + TrainingConfig: + properties: + n_epochs: + type: integer + title: N Epochs + max_steps_per_epoch: + type: integer + title: Max Steps Per Epoch + default: 1 + gradient_accumulation_steps: + type: integer + title: Gradient Accumulation Steps + default: 1 + max_validation_steps: + title: Max Validation Steps + default: 1 + type: integer + data_config: + $ref: '#/components/schemas/DataConfig' + optimizer_config: + $ref: '#/components/schemas/OptimizerConfig' + efficiency_config: + $ref: '#/components/schemas/EfficiencyConfig' + dtype: + title: Dtype + default: bf16 + type: string + type: object + required: + - n_epochs + title: TrainingConfig + description: "Comprehensive configuration for the training process.\n\n:param n_epochs: Number of training epochs to run\n:param max_steps_per_epoch: Maximum number of steps to run per epoch\n:param gradient_accumulation_steps: Number of steps to accumulate gradients before updating\n:param max_validation_steps: (Optional) Maximum number of validation steps per epoch\n:param data_config: (Optional) Configuration for data loading and formatting\n:param optimizer_config: (Optional) Configuration for the optimization algorithm\n:param efficiency_config: (Optional) Configuration for memory and compute optimizations\n:param dtype: (Optional) Data type for model parameters (bf16, fp16, fp32)" + Turn: + properties: + turn_id: + type: string + title: Turn Id + session_id: + type: string + title: Session Id + input_messages: + items: + anyOf: + - $ref: '#/components/schemas/UserMessage-Output' + - $ref: '#/components/schemas/ToolResponseMessage-Output' + type: array + title: Input Messages + steps: + items: + oneOf: + - $ref: '#/components/schemas/InferenceStep-Output' + - $ref: '#/components/schemas/ToolExecutionStep-Output' + - $ref: '#/components/schemas/ShieldCallStep-Output' + - $ref: '#/components/schemas/MemoryRetrievalStep-Output' + discriminator: + propertyName: step_type + mapping: + inference: '#/components/schemas/InferenceStep-Output' + memory_retrieval: '#/components/schemas/MemoryRetrievalStep-Output' + shield_call: '#/components/schemas/ShieldCallStep-Output' + tool_execution: '#/components/schemas/ToolExecutionStep-Output' + type: array + title: Steps + output_message: + $ref: '#/components/schemas/CompletionMessage-Output' + output_attachments: + title: Output Attachments + items: + $ref: '#/components/schemas/Attachment-Output' + type: array + started_at: + type: string + format: date-time + title: Started At + completed_at: + title: Completed At + type: string + format: date-time + type: object + required: + - turn_id + - session_id + - input_messages + - steps + - output_message + - started_at + title: Turn + description: "A single turn in an interaction with an Agentic System.\n\n:param turn_id: Unique identifier for the turn within a session\n:param session_id: Unique identifier for the conversation session\n:param input_messages: List of messages that initiated this turn\n:param steps: Ordered list of processing steps executed during this turn\n:param output_message: The model's generated response containing content and metadata\n:param output_attachments: (Optional) Files or media attached to the agent's response\n:param started_at: Timestamp when the turn began\n:param completed_at: (Optional) Timestamp when the turn finished, if completed" + URIDataSource: + properties: + type: + type: string + const: uri + title: Type + default: uri + uri: + type: string + title: Uri + type: object + required: + - uri + title: URIDataSource + description: "A dataset that can be obtained from a URI.\n:param uri: The dataset can be obtained from a URI. E.g.\n - \"https://mywebsite.com/mydata.jsonl\"\n - \"lsfs://mydata.jsonl\"\n - \"data:csv;base64,{base64_content}\"" + URL: + properties: + uri: + type: string + title: Uri + type: object + required: + - uri + title: URL + description: "A URL reference to external content.\n\n:param uri: The URL string pointing to the resource" + UnionType: + properties: + type: + type: string + const: union + title: Type + default: union + type: object + title: UnionType + description: "Parameter type for union values.\n\n:param type: Discriminator type. Always \"union\"" + UserMessage-Input: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + context: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Input' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Input' + text: '#/components/schemas/TextContentItem' + type: array + title: Context + type: object + required: + - content + title: UserMessage + description: "A message from the user in a chat conversation.\n\n:param role: Must be \"user\" to identify this as a user message\n:param content: The content of the message, which can include text and other media\n:param context: (Optional) This field is used internally by Llama Stack to pass RAG context. This field may be removed in the API in the future." + UserMessage-Output: + properties: + role: + type: string + const: user + title: Role + default: user + content: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Content + context: + anyOf: + - type: string + - oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + - items: + oneOf: + - $ref: '#/components/schemas/ImageContentItem-Output' + - $ref: '#/components/schemas/TextContentItem' + discriminator: + propertyName: type + mapping: + image: '#/components/schemas/ImageContentItem-Output' + text: '#/components/schemas/TextContentItem' + type: array + title: Context + type: object + required: + - content + title: UserMessage + description: "A message from the user in a chat conversation.\n\n:param role: Must be \"user\" to identify this as a user message\n:param content: The content of the message, which can include text and other media\n:param context: (Optional) This field is used internally by Llama Stack to pass RAG context. This field may be removed in the API in the future." + VectorStoreChunkingStrategyAuto: + properties: + type: + type: string + const: auto + title: Type + default: auto + type: object + title: VectorStoreChunkingStrategyAuto + description: "Automatic chunking strategy for vector store files.\n\n:param type: Strategy type, always \"auto\" for automatic chunking" + VectorStoreChunkingStrategyStatic: + properties: + type: + type: string + const: static + title: Type + default: static + static: + $ref: '#/components/schemas/VectorStoreChunkingStrategyStaticConfig' + type: object + required: + - static + title: VectorStoreChunkingStrategyStatic + description: "Static chunking strategy with configurable parameters.\n\n:param type: Strategy type, always \"static\" for static chunking\n:param static: Configuration parameters for the static chunking strategy" + VectorStoreChunkingStrategyStaticConfig: + properties: + chunk_overlap_tokens: + type: integer + title: Chunk Overlap Tokens + default: 400 + max_chunk_size_tokens: + type: integer + maximum: 4096.0 + minimum: 100.0 + title: Max Chunk Size Tokens + default: 800 + type: object + title: VectorStoreChunkingStrategyStaticConfig + description: "Configuration for static chunking strategy.\n\n:param chunk_overlap_tokens: Number of tokens to overlap between adjacent chunks\n:param max_chunk_size_tokens: Maximum number of tokens per chunk, must be between 100 and 4096" + VectorStoreContent: + properties: + type: + type: string + const: text + title: Type + text: + type: string + title: Text + type: object + required: + - type + - text + title: VectorStoreContent + description: "Content item from a vector store file or search result.\n\n:param type: Content type, currently only \"text\" is supported\n:param text: The actual text content" + VectorStoreFileBatchObject: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store.file_batch + created_at: + type: integer + title: Created At + vector_store_id: + type: string + title: Vector Store Id + status: + anyOf: + - type: string + const: completed + - type: string + const: in_progress + - type: string + const: cancelled + - type: string + const: failed + title: Status + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + type: object + required: + - id + - created_at + - vector_store_id + - status + - file_counts + title: VectorStoreFileBatchObject + description: "OpenAI Vector Store File Batch object.\n\n:param id: Unique identifier for the file batch\n:param object: Object type identifier, always \"vector_store.file_batch\"\n:param created_at: Timestamp when the file batch was created\n:param vector_store_id: ID of the vector store containing the file batch\n:param status: Current processing status of the file batch\n:param file_counts: File processing status counts for the batch" + VectorStoreFileCounts: + properties: + completed: + type: integer + title: Completed + cancelled: + type: integer + title: Cancelled + failed: + type: integer + title: Failed + in_progress: + type: integer + title: In Progress + total: + type: integer + title: Total + type: object + required: + - completed + - cancelled + - failed + - in_progress + - total + title: VectorStoreFileCounts + description: "File processing status counts for a vector store.\n\n:param completed: Number of files that have been successfully processed\n:param cancelled: Number of files that had their processing cancelled\n:param failed: Number of files that failed to process\n:param in_progress: Number of files currently being processed\n:param total: Total number of files in the vector store" + VectorStoreFileLastError: + properties: + code: + anyOf: + - type: string + const: server_error + - type: string + const: rate_limit_exceeded + title: Code + message: + type: string + title: Message + type: object + required: + - code + - message + title: VectorStoreFileLastError + description: "Error information for failed vector store file processing.\n\n:param code: Error code indicating the type of failure\n:param message: Human-readable error message describing the failure" + VectorStoreFileObject: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store.file + attributes: + additionalProperties: true + type: object + title: Attributes + chunking_strategy: + oneOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: Chunking Strategy + discriminator: + propertyName: type + mapping: + auto: '#/components/schemas/VectorStoreChunkingStrategyAuto' + static: '#/components/schemas/VectorStoreChunkingStrategyStatic' + created_at: + type: integer + title: Created At + last_error: + $ref: '#/components/schemas/VectorStoreFileLastError' + status: + anyOf: + - type: string + const: completed + - type: string + const: in_progress + - type: string + const: cancelled + - type: string + const: failed + title: Status + usage_bytes: + type: integer + title: Usage Bytes + default: 0 + vector_store_id: + type: string + title: Vector Store Id + type: object + required: + - id + - chunking_strategy + - created_at + - status + - vector_store_id + title: VectorStoreFileObject + description: "OpenAI Vector Store File object.\n\n:param id: Unique identifier for the file\n:param object: Object type identifier, always \"vector_store.file\"\n:param attributes: Key-value attributes associated with the file\n:param chunking_strategy: Strategy used for splitting the file into chunks\n:param created_at: Timestamp when the file was added to the vector store\n:param last_error: (Optional) Error information if file processing failed\n:param status: Current processing status of the file\n:param usage_bytes: Storage space used by this file in bytes\n:param vector_store_id: ID of the vector store containing this file" + VectorStoreObject: + properties: + id: + type: string + title: Id + object: + type: string + title: Object + default: vector_store + created_at: + type: integer + title: Created At + name: + title: Name + type: string + usage_bytes: + type: integer + title: Usage Bytes + default: 0 + file_counts: + $ref: '#/components/schemas/VectorStoreFileCounts' + status: + type: string + title: Status + default: completed + expires_after: + title: Expires After + additionalProperties: true + type: object + expires_at: + title: Expires At + type: integer + last_active_at: + title: Last Active At + type: integer + metadata: + additionalProperties: true + type: object + title: Metadata + type: object + required: + - id + - created_at + - file_counts + title: VectorStoreObject + description: "OpenAI Vector Store object.\n\n:param id: Unique identifier for the vector store\n:param object: Object type identifier, always \"vector_store\"\n:param created_at: Timestamp when the vector store was created\n:param name: (Optional) Name of the vector store\n:param usage_bytes: Storage space used by the vector store in bytes\n:param file_counts: File processing status counts for the vector store\n:param status: Current status of the vector store\n:param expires_after: (Optional) Expiration policy for the vector store\n:param expires_at: (Optional) Timestamp when the vector store will expire\n:param last_active_at: (Optional) Timestamp of last activity on the vector store\n:param metadata: Set of key-value pairs that can be attached to the vector store" + VectorStoreSearchResponse: + properties: + file_id: + type: string + title: File Id + filename: + type: string + title: Filename + score: + type: number + title: Score + attributes: + title: Attributes + additionalProperties: + anyOf: + - type: string + - type: number + - type: boolean + type: object + content: + items: + $ref: '#/components/schemas/VectorStoreContent' + type: array + title: Content + type: object + required: + - file_id + - filename + - score + - content + title: VectorStoreSearchResponse + description: "Response from searching a vector store.\n\n:param file_id: Unique identifier of the file containing the result\n:param filename: Name of the file containing the result\n:param score: Relevance score for this search result\n:param attributes: (Optional) Key-value attributes associated with the file\n:param content: List of content items matching the search query" + VectorStoreSearchResponsePage: + properties: + object: + type: string + title: Object + default: vector_store.search_results.page + search_query: + type: string + title: Search Query + data: + items: + $ref: '#/components/schemas/VectorStoreSearchResponse' + type: array + title: Data + has_more: + type: boolean + title: Has More + default: false + next_page: + title: Next Page + type: string + type: object + required: + - search_query + - data + title: VectorStoreSearchResponsePage + description: "Paginated response from searching a vector store.\n\n:param object: Object type identifier for the search results page\n:param search_query: The original search query that was executed\n:param data: List of search result objects\n:param has_more: Whether there are more results available beyond this page\n:param next_page: (Optional) Token for retrieving the next page of results" + VersionInfo: + properties: + version: + type: string + title: Version + type: object + required: + - version + title: VersionInfo + description: "Version information for the service.\n\n:param version: Version number of the service" + ViolationLevel: + type: string + enum: + - info + - warn + - error + title: ViolationLevel + description: "Severity level of a safety violation.\n\n:cvar INFO: Informational level violation that does not require action\n:cvar WARN: Warning level violation that suggests caution but allows continuation\n:cvar ERROR: Error level violation that requires blocking or intervention" + WeightedRanker: + properties: + type: + type: string + const: weighted + title: Type + default: weighted + alpha: + type: number + maximum: 1.0 + minimum: 0.0 + title: Alpha + description: Weight factor between 0 and 1. 0 means only keyword scores, 1 means only vector scores. + default: 0.5 + type: object + title: WeightedRanker + description: "Weighted ranker configuration that combines vector and keyword scores.\n\n:param type: The type of ranker, always \"weighted\"\n:param alpha: Weight factor between 0 and 1.\n 0 means only use keyword scores,\n 1 means only use vector scores,\n values in between blend both scores." + _URLOrData: + properties: + url: + $ref: '#/components/schemas/URL' + data: + contentEncoding: base64 + title: Data + type: string + type: object + title: _URLOrData + description: "A URL or a base64 encoded string\n\n:param url: A URL of the image or data URL in the format of data:image/{type};base64,{data}. Note that URL could have length limits.\n:param data: base64 encoded image data as string" + __main_____agents_agent_id_session_Request: + properties: + agent_id: + type: string + title: Agent Id + session_name: + type: string + title: Session Name + type: object + required: + - agent_id + - session_name + title: _agents_agent_id_session_Request + __main_____agents_agent_id_session_session_id_turn_Request: + properties: + agent_id: + type: string + title: Agent Id + session_id: + type: string + title: Session Id + messages: + $ref: '#/components/schemas/UserMessage-Input' + stream: + type: boolean + title: Stream + default: false + documents: + $ref: '#/components/schemas/Document' + toolgroups: + anyOf: + - type: string + - $ref: '#/components/schemas/AgentToolGroupWithArgs' + title: Toolgroups + tool_config: + $ref: '#/components/schemas/ToolConfig' + type: object + required: + - agent_id + - session_id + - messages + - documents + - toolgroups + - tool_config + title: _agents_agent_id_session_session_id_turn_Request + __main_____agents_agent_id_session_session_id_turn_turn_id_resume_Request: + properties: + agent_id: + type: string + title: Agent Id + session_id: + type: string + title: Session Id + turn_id: + type: string + title: Turn Id + tool_responses: + $ref: '#/components/schemas/ToolResponse-Input' + stream: + type: boolean + title: Stream + default: false + type: object + required: + - agent_id + - session_id + - turn_id + - tool_responses + title: _agents_agent_id_session_session_id_turn_turn_id_resume_Request + __main_____datasets_Request: + properties: + purpose: + $ref: '#/components/schemas/DatasetPurpose' + metadata: + type: string + title: Metadata + dataset_id: + type: string + title: Dataset Id + type: object + required: + - purpose + - metadata + - dataset_id + title: _datasets_Request + _batches_Request: + properties: + input_file_id: + type: string + title: Input File Id + endpoint: + type: string + title: Endpoint + completion_window: + type: string + title: Completion Window + metadata: + type: string + title: Metadata + idempotency_key: + type: string + title: Idempotency Key + type: object + required: + - input_file_id + - endpoint + - completion_window + - metadata + - idempotency_key + title: _batches_Request + _batches_batch_id_cancel_Request: + properties: + batch_id: + type: string + title: Batch Id + type: object + required: + - batch_id + title: _batches_batch_id_cancel_Request + _conversations_Request: + properties: + items: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: Items + discriminator: + propertyName: type + mapping: + file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + function_call_output: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + mcp_approval_response: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + message: '#/components/schemas/OpenAIResponseMessage-Input' + web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + metadata: + type: string + title: Metadata + type: object + required: + - items + - metadata + title: _conversations_Request + _conversations_conversation_id_Request: + properties: + conversation_id: + type: string + title: Conversation Id + metadata: + type: string + title: Metadata + type: object + required: + - conversation_id + - metadata + title: _conversations_conversation_id_Request + _conversations_conversation_id_items_Request: + properties: + conversation_id: + type: string + title: Conversation Id + items: + anyOf: + - $ref: '#/components/schemas/OpenAIResponseMessage-Input' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + title: Items + type: object + required: + - conversation_id + - items + title: _conversations_conversation_id_items_Request + _inference_rerank_Request: + properties: + model: + type: string + title: Model + query: + type: string + title: Query + items: + type: string + title: Items + max_num_results: + type: integer + title: Max Num Results + type: object + required: + - model + - query + - items + - max_num_results + title: _inference_rerank_Request + _models_Request: + properties: + model_id: + type: string + title: Model Id + provider_model_id: + type: string + title: Provider Model Id + provider_id: + type: string + title: Provider Id + metadata: + type: string + title: Metadata + model_type: + $ref: '#/components/schemas/ModelType' + type: object + required: + - model_id + - provider_model_id + - provider_id + - metadata + - model_type + title: _models_Request + _moderations_Request: + properties: + input: + type: string + title: Input + model: + type: string + title: Model + type: object + required: + - input + - model + title: _moderations_Request + _prompts_Request: + properties: + prompt: + type: string + title: Prompt + variables: + type: string + title: Variables + type: object + required: + - prompt + - variables + title: _prompts_Request + _prompts_prompt_id_Request: + properties: + prompt_id: + type: string + title: Prompt Id + prompt: + type: string + title: Prompt + version: + type: integer + title: Version + variables: + type: string + title: Variables + set_as_default: + type: boolean + title: Set As Default + default: true + type: object + required: + - prompt_id + - prompt + - version + - variables + title: _prompts_prompt_id_Request + _prompts_prompt_id_set_default_version_Request: + properties: + prompt_id: + type: string + title: Prompt Id + version: + type: integer + title: Version + type: object + required: + - prompt_id + - version + title: _prompts_prompt_id_set_default_version_Request + _responses_Request: + properties: + input: + type: string + title: Input + model: + type: string + title: Model + prompt: + $ref: '#/components/schemas/OpenAIResponsePrompt' + instructions: + type: string + title: Instructions + previous_response_id: + type: string + title: Previous Response Id + conversation: + type: string + title: Conversation + store: + type: boolean + title: Store + default: true + stream: + type: boolean + title: Stream + default: false + temperature: + type: number + title: Temperature + text: + $ref: '#/components/schemas/OpenAIResponseText' + tools: + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' + title: Tools + discriminator: + propertyName: type + mapping: + file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' + function: '#/components/schemas/OpenAIResponseInputToolFunction' + mcp: '#/components/schemas/OpenAIResponseInputToolMCP' + web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/components/schemas/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/components/schemas/OpenAIResponseInputToolWebSearch' + include: + type: string + title: Include + max_infer_iters: + type: integer + title: Max Infer Iters + default: 10 + type: object + required: + - input + - model + - prompt + - instructions + - previous_response_id + - conversation + - temperature + - text + - tools + - include + title: _responses_Request + _scoring_score_Request: + properties: + input_rows: + type: string + title: Input Rows + scoring_functions: + type: string + title: Scoring Functions + type: object + required: + - input_rows + - scoring_functions + title: _scoring_score_Request + _scoring_score_batch_Request: + properties: + dataset_id: + type: string + title: Dataset Id + scoring_functions: + type: string + title: Scoring Functions + save_results_dataset: + type: boolean + title: Save Results Dataset + default: false + type: object + required: + - dataset_id + - scoring_functions + title: _scoring_score_batch_Request + _shields_Request: + properties: + shield_id: + type: string + title: Shield Id + provider_shield_id: + type: string + title: Provider Shield Id + provider_id: + type: string + title: Provider Id + params: + type: string + title: Params + type: object + required: + - shield_id + - provider_shield_id + - provider_id + - params + title: _shields_Request + _tool_runtime_invoke_Request: + properties: + tool_name: + type: string + title: Tool Name + kwargs: + type: string + title: Kwargs + type: object + required: + - tool_name + - kwargs + title: _tool_runtime_invoke_Request + _tool_runtime_rag_tool_query_Request: + properties: + content: + type: string + title: Content + vector_store_ids: + type: string + title: Vector Store Ids + query_config: + $ref: '#/components/schemas/RAGQueryConfig' + type: object + required: + - content + - vector_store_ids + - query_config + title: _tool_runtime_rag_tool_query_Request + _vector_io_query_Request: + properties: + vector_store_id: + type: string + title: Vector Store Id + query: + type: string + title: Query + params: + type: string + title: Params + type: object + required: + - vector_store_id + - query + - params + title: _vector_io_query_Request + _vector_stores_vector_store_id_Request: + properties: + vector_store_id: + type: string + title: Vector Store Id + name: + type: string + title: Name + expires_after: + type: string + title: Expires After + metadata: + type: string + title: Metadata + type: object + required: + - vector_store_id + - name + - expires_after + - metadata + title: _vector_stores_vector_store_id_Request + _vector_stores_vector_store_id_file_batches_batch_id_cancel_Request: + properties: + batch_id: + type: string + title: Batch Id + vector_store_id: + type: string + title: Vector Store Id + type: object + required: + - batch_id + - vector_store_id + title: _vector_stores_vector_store_id_file_batches_batch_id_cancel_Request + _vector_stores_vector_store_id_files_Request: + properties: + vector_store_id: + type: string + title: Vector Store Id + file_id: + type: string + title: File Id + attributes: + type: string + title: Attributes + chunking_strategy: + anyOf: + - $ref: '#/components/schemas/VectorStoreChunkingStrategyAuto' + - $ref: '#/components/schemas/VectorStoreChunkingStrategyStatic' + title: Chunking Strategy + type: object + required: + - vector_store_id + - file_id + - attributes + - chunking_strategy + title: _vector_stores_vector_store_id_files_Request + _vector_stores_vector_store_id_files_file_id_Request: + properties: + vector_store_id: + type: string + title: Vector Store Id + file_id: + type: string + title: File Id + attributes: + type: string + title: Attributes + type: object + required: + - vector_store_id + - file_id + - attributes + title: _vector_stores_vector_store_id_files_file_id_Request + _vector_stores_vector_store_id_search_Request: + properties: + vector_store_id: + type: string + title: Vector Store Id + query: + type: string + title: Query + filters: + type: string + title: Filters + max_num_results: + type: integer + title: Max Num Results + default: 10 + ranking_options: + $ref: '#/components/schemas/SearchRankingOptions' + rewrite_query: + type: boolean + title: Rewrite Query + default: false + search_mode: + type: string + title: Search Mode + default: vector + type: object + required: + - vector_store_id + - query + - filters + - ranking_options + title: _vector_stores_vector_store_id_search_Request Error: - description: >- - Error response from the API. Roughly follows RFC 7807. - - - :param status: HTTP status code - - :param title: Error title, a short summary of the error which is invariant - for an error type - - :param detail: Error detail, a longer human-readable description of the error - - :param instance: (Optional) A URL which can be used to retrieve more information - about the specific occurrence of the error + description: "Error response from the API. Roughly follows RFC 7807.\n\n:param status: HTTP status code\n:param title: Error title, a short summary of the error which is invariant for an error type\n:param detail: Error detail, a longer human-readable description of the error\n:param instance: (Optional) A URL which can be used to retrieve more information about the specific occurrence of the error" properties: status: title: Status @@ -4954,982 +13198,172 @@ components: title: Detail type: string instance: - anyOf: - - type: string - - type: 'null' title: Instance + type: string + nullable: true required: - - status - - title - - detail + - status + - title + - detail title: Error - description: >- - Error response from the API. Roughly follows RFC 7807. - ListBatchesResponse: type: object + Agent: + description: "An agent instance with configuration and metadata.\n\n:param agent_id: Unique identifier for the agent\n:param agent_config: Configuration settings for the agent\n:param created_at: Timestamp when the agent was created" properties: - object: - type: string - const: list - default: list - data: - type: array - items: - type: object - properties: - id: - type: string - completion_window: - type: string - created_at: - type: integer - endpoint: - type: string - input_file_id: - type: string - object: - type: string - const: batch - status: - type: string - enum: - - validating - - failed - - in_progress - - finalizing - - completed - - expired - - cancelling - - cancelled - cancelled_at: - type: integer - cancelling_at: - type: integer - completed_at: - type: integer - error_file_id: - type: string - errors: - type: object - properties: - data: - type: array - items: - type: object - properties: - code: - type: string - line: - type: integer - message: - type: string - param: - type: string - additionalProperties: false - title: BatchError - object: - type: string - additionalProperties: false - title: Errors - expired_at: - type: integer - expires_at: - type: integer - failed_at: - type: integer - finalizing_at: - type: integer - in_progress_at: - type: integer - metadata: - type: object - additionalProperties: - type: string - model: - type: string - output_file_id: - type: string - request_counts: - type: object - properties: - completed: - type: integer - failed: - type: integer - total: - type: integer - additionalProperties: false - required: - - completed - - failed - - total - title: BatchRequestCounts - usage: - type: object - properties: - input_tokens: - type: integer - input_tokens_details: - type: object - properties: - cached_tokens: - type: integer - additionalProperties: false - required: - - cached_tokens - title: InputTokensDetails - output_tokens: - type: integer - output_tokens_details: - type: object - properties: - reasoning_tokens: - type: integer - additionalProperties: false - required: - - reasoning_tokens - title: OutputTokensDetails - total_tokens: - type: integer - additionalProperties: false - required: - - input_tokens - - input_tokens_details - - output_tokens - - output_tokens_details - - total_tokens - title: BatchUsage - additionalProperties: false - required: - - id - - completion_window - - created_at - - endpoint - - input_file_id - - object - - status - title: Batch - first_id: - type: string - last_id: - type: string - has_more: - type: boolean - default: false - additionalProperties: false - required: - - object - - data - - has_more - title: ListBatchesResponse - description: >- - Response containing a list of batch objects. - CreateBatchRequest: - type: object - properties: - input_file_id: - type: string - description: >- - The ID of an uploaded file containing requests for the batch. - endpoint: - type: string - description: >- - The endpoint to be used for all requests in the batch. - completion_window: - type: string - const: 24h - description: >- - The time window within which the batch should be processed. - metadata: - type: object - additionalProperties: - type: string - description: Optional metadata for the batch. - idempotency_key: - type: string - description: >- - Optional idempotency key. When provided, enables idempotent behavior. - additionalProperties: false - required: - - input_file_id - - endpoint - - completion_window - title: CreateBatchRequest - Batch: - type: object - properties: - id: - type: string - completion_window: + agent_id: + title: Agent Id type: string + agent_config: + $ref: '#/components/schemas/AgentConfig' created_at: - type: integer - endpoint: + format: date-time + title: Created At type: string - input_file_id: - type: string - object: - type: string - const: batch - status: - type: string - enum: - - validating - - failed - - in_progress - - finalizing - - completed - - expired - - cancelling - - cancelled - cancelled_at: - type: integer - cancelling_at: - type: integer - completed_at: - type: integer - error_file_id: - type: string - errors: - type: object - properties: - data: - type: array - items: - type: object - properties: - code: - type: string - line: - type: integer - message: - type: string - param: - type: string - additionalProperties: false - title: BatchError - object: - type: string - additionalProperties: false - title: Errors - expired_at: - type: integer - expires_at: - type: integer - failed_at: - type: integer - finalizing_at: - type: integer - in_progress_at: - type: integer - metadata: - type: object - additionalProperties: - type: string - model: - type: string - output_file_id: - type: string - request_counts: - type: object - properties: - completed: - type: integer - failed: - type: integer - total: - type: integer - additionalProperties: false - required: - - completed - - failed - - total - title: BatchRequestCounts - usage: - type: object - properties: - input_tokens: - type: integer - input_tokens_details: - type: object - properties: - cached_tokens: - type: integer - additionalProperties: false - required: - - cached_tokens - title: InputTokensDetails - output_tokens: - type: integer - output_tokens_details: - type: object - properties: - reasoning_tokens: - type: integer - additionalProperties: false - required: - - reasoning_tokens - title: OutputTokensDetails - total_tokens: - type: integer - additionalProperties: false - required: - - input_tokens - - input_tokens_details - - output_tokens - - output_tokens_details - - total_tokens - title: BatchUsage - additionalProperties: false required: - - id - - completion_window - - created_at - - endpoint - - input_file_id - - object - - status - title: Batch - Order: - type: string - enum: - - asc - - desc - title: Order - description: Sort order for paginated responses. - ListOpenAIChatCompletionResponse: + - agent_id + - agent_config + - created_at + title: Agent type: object - Order: + AgentStepResponse: + description: "Response containing details of a specific agent step.\n\n:param step: The complete step data and execution details" + properties: + step: + discriminator: + mapping: + inference: '#/$defs/InferenceStep' + memory_retrieval: '#/$defs/MemoryRetrievalStep' + shield_call: '#/$defs/ShieldCallStep' + tool_execution: '#/$defs/ToolExecutionStep' + propertyName: step_type + oneOf: + - $ref: '#/components/schemas/InferenceStep' + - $ref: '#/components/schemas/ToolExecutionStep' + - $ref: '#/components/schemas/ShieldCallStep' + - $ref: '#/components/schemas/MemoryRetrievalStep' + title: Step + required: + - step + title: AgentStepResponse type: object - ListOpenAIChatCompletionResponse: - $defs: - OpenAIAssistantMessageParam: - description: >- - A message containing the model's (assistant) response in an OpenAI-compatible - chat completion request. - - - :param role: Must be "assistant" to identify this as the model's response - - :param content: The content of the model's response - - :param name: (Optional) The name of the assistant message participant. - - :param tool_calls: List of tool calls. Each tool call is an OpenAIChatCompletionToolCall - object. - properties: - role: - const: assistant - default: assistant - title: Role - type: string - content: - anyOf: - - type: string - - items: - $ref: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - type: array - - type: 'null' - title: Content - name: - anyOf: - - type: string - - type: 'null' - title: Name - tool_calls: - anyOf: - - items: - $ref: '#/$defs/OpenAIChatCompletionToolCall' - type: array - - type: 'null' - title: Tool Calls - title: OpenAIAssistantMessageParam - type: object - "OpenAIChatCompletionContentPartImageParam": - description: >- - Image content part for OpenAI-compatible chat completion messages. - - - :param type: Must be "image_url" to identify this as image content - - :param image_url: Image URL specification and processing details - properties: - type: - const: image_url - default: image_url - title: Type - type: string - image_url: - $ref: '#/$defs/OpenAIImageURL' - required: - - image_url - title: >- - OpenAIChatCompletionContentPartImageParam - type: object - OpenAIChatCompletionContentPartTextParam: - description: >- - Text content part for OpenAI-compatible chat completion messages. - - - :param type: Must be "text" to identify this as text content - - :param text: The text content of the message - properties: - type: - const: text - default: text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: OpenAIChatCompletionContentPartTextParam - type: object - OpenAIChatCompletionToolCall: - description: >- - Tool call specification for OpenAI-compatible chat completion responses. - - - :param index: (Optional) Index of the tool call in the list - - :param id: (Optional) Unique identifier for the tool call - - :param type: Must be "function" to identify this as a function call - - :param function: (Optional) Function call details - properties: - index: - anyOf: - - type: integer - - type: 'null' - title: Index - id: - anyOf: - - type: string - - type: 'null' - title: Id - type: - const: function - default: function - title: Type - type: string - function: - anyOf: - - $ref: >- - #/$defs/OpenAIChatCompletionToolCallFunction - - type: 'null' - title: OpenAIChatCompletionToolCall - type: object - OpenAIChatCompletionToolCallFunction: - description: >- - Function call details for OpenAI-compatible tool calls. - - - :param name: (Optional) Name of the function to call - - :param arguments: (Optional) Arguments to pass to the function as a JSON - string - properties: - name: - anyOf: - - type: string - - type: 'null' - title: Name - arguments: - anyOf: - - type: string - - type: 'null' - title: Arguments - title: OpenAIChatCompletionToolCallFunction - type: object - OpenAIChatCompletionUsage: - description: >- - Usage information for OpenAI chat completion. - - - :param prompt_tokens: Number of tokens in the prompt - - :param completion_tokens: Number of tokens in the completion - - :param total_tokens: Total tokens used (prompt + completion) - - :param input_tokens_details: Detailed breakdown of input token usage - - :param output_tokens_details: Detailed breakdown of output token usage - properties: - prompt_tokens: - title: Prompt Tokens - type: integer - completion_tokens: - title: Completion Tokens - type: integer - total_tokens: - title: Total Tokens - type: integer - prompt_tokens_details: - anyOf: - - $ref: >- - #/$defs/OpenAIChatCompletionUsagePromptTokensDetails - - type: 'null' - completion_tokens_details: - anyOf: - - $ref: >- - #/$defs/OpenAIChatCompletionUsageCompletionTokensDetails - - type: 'null' - required: - - prompt_tokens - - completion_tokens - - total_tokens - title: OpenAIChatCompletionUsage - type: object - "OpenAIChatCompletionUsageCompletionTokensDetails": - description: >- - Token details for output tokens in OpenAI chat completion usage. - - - :param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models) - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - title: Reasoning Tokens - title: >- - OpenAIChatCompletionUsageCompletionTokensDetails - type: object - "OpenAIChatCompletionUsagePromptTokensDetails": - description: >- - Token details for prompt tokens in OpenAI chat completion usage. - - - :param cached_tokens: Number of tokens retrieved from cache - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - title: Cached Tokens - title: >- - OpenAIChatCompletionUsagePromptTokensDetails - type: object - OpenAIChoice: - description: >- - A choice from an OpenAI-compatible chat completion response. - - - :param message: The message from the model - - :param finish_reason: The reason the model stopped generating - - :param index: The index of the choice - - :param logprobs: (Optional) The log probabilities for the tokens in the - message - properties: - message: + CompletionMessage: + description: "A message containing the model's (assistant) response in a chat conversation.\n\n:param role: Must be \"assistant\" to identify this as the model's response\n:param content: The content of the model's response\n:param stop_reason: Reason why the model stopped generating. Options are:\n - `StopReason.end_of_turn`: The model finished generating the entire response.\n - `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response.\n - `StopReason.out_of_tokens`: The model ran out of token budget.\n:param tool_calls: List of tool calls. Each tool call is a ToolCall object." + properties: + role: + const: assistant + default: assistant + title: Role + type: string + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/$defs/ImageContentItem' + text: '#/$defs/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: discriminator: mapping: - assistant: '#/$defs/OpenAIAssistantMessageParam' - developer: '#/$defs/OpenAIDeveloperMessageParam' - system: '#/$defs/OpenAISystemMessageParam' - tool: '#/$defs/OpenAIToolMessageParam' - user: '#/$defs/OpenAIUserMessageParam' - propertyName: role + image: '#/$defs/ImageContentItem' + text: '#/$defs/TextContentItem' + propertyName: type oneOf: - - $ref: '#/$defs/OpenAIUserMessageParam' - - $ref: '#/$defs/OpenAISystemMessageParam' - - $ref: '#/$defs/OpenAIAssistantMessageParam' - - $ref: '#/$defs/OpenAIToolMessageParam' - - $ref: '#/$defs/OpenAIDeveloperMessageParam' - title: Message - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: - anyOf: - - $ref: '#/$defs/OpenAIChoiceLogprobs' - - type: 'null' - required: - - message - - finish_reason - - index - title: OpenAIChoice - type: object - OpenAIChoiceLogprobs: - description: >- - The log probabilities for the tokens in the message from an OpenAI-compatible - chat completion response. - - - :param content: (Optional) The log probabilities for the tokens in the - message - - :param refusal: (Optional) The log probabilities for the tokens in the - message - properties: - content: - anyOf: - - items: - $ref: '#/$defs/OpenAITokenLogProb' - type: array - - type: 'null' - title: Content - refusal: - anyOf: - - items: - $ref: '#/$defs/OpenAITokenLogProb' - type: array - - type: 'null' - title: Refusal - title: OpenAIChoiceLogprobs - type: object - OpenAICompletionWithInputMessages: - properties: - id: - title: Id - type: string - choices: - items: - $ref: '#/$defs/OpenAIChoice' - title: Choices - type: array - object: - const: chat.completion - default: chat.completion - title: Object - type: string - created: - title: Created - type: integer - model: - title: Model - type: string - usage: - anyOf: - - $ref: '#/$defs/OpenAIChatCompletionUsage' - - type: 'null' - input_messages: - items: - discriminator: - mapping: - assistant: '#/$defs/OpenAIAssistantMessageParam' - developer: '#/$defs/OpenAIDeveloperMessageParam' - system: '#/$defs/OpenAISystemMessageParam' - tool: '#/$defs/OpenAIToolMessageParam' - user: '#/$defs/OpenAIUserMessageParam' - propertyName: role - oneOf: - - $ref: '#/$defs/OpenAIUserMessageParam' - - $ref: '#/$defs/OpenAISystemMessageParam' - - $ref: '#/$defs/OpenAIAssistantMessageParam' - - $ref: '#/$defs/OpenAIToolMessageParam' - - $ref: '#/$defs/OpenAIDeveloperMessageParam' - title: Input Messages - type: array - required: - - id - - choices - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages - type: object - OpenAIDeveloperMessageParam: - description: >- - A message from the developer in an OpenAI-compatible chat completion request. - - - :param role: Must be "developer" to identify this as a developer message - - :param content: The content of the developer message - - :param name: (Optional) The name of the developer message participant. - properties: - role: - const: developer - default: developer - title: Role - type: string - content: - anyOf: - - type: string - - items: - $ref: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - type: array - title: Content - name: - anyOf: - - type: string - - type: 'null' - title: Name - required: - - content - title: OpenAIDeveloperMessageParam - type: object - OpenAIFile: - properties: - type: - const: file - default: file - title: Type - type: string - file: - $ref: '#/$defs/OpenAIFileFile' - required: - - file - title: OpenAIFile - type: object - OpenAIFileFile: - properties: - file_data: - anyOf: - - type: string - - type: 'null' - title: File Data - file_id: - anyOf: - - type: string - - type: 'null' - title: File Id - filename: - anyOf: - - type: string - - type: 'null' - title: Filename - title: OpenAIFileFile - type: object - OpenAIImageURL: - description: >- - Image URL specification for OpenAI-compatible chat completion messages. - - - :param url: URL of the image to include in the message - - :param detail: (Optional) Level of detail for image processing. Can be - "low", "high", or "auto" - properties: - url: - title: Url - type: string - detail: - anyOf: - - type: string - - type: 'null' - title: Detail - required: - - url - title: OpenAIImageURL - type: object - OpenAISystemMessageParam: - description: >- - A system message providing instructions or context to the model. - - - :param role: Must be "system" to identify this as a system message - - :param content: The content of the "system prompt". If multiple system - messages are provided, they are concatenated. The underlying Llama Stack - code may also add other system messages (for example, for formatting tool - definitions). - - :param name: (Optional) The name of the system message participant. - properties: - role: - const: system - default: system - title: Role - type: string - content: - anyOf: - - type: string - - items: - $ref: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - type: array - title: Content - name: - anyOf: - - type: string - - type: 'null' - title: Name - required: - - content - title: OpenAISystemMessageParam - type: object - OpenAITokenLogProb: - description: >- - The log probability for a token from an OpenAI-compatible chat completion - response. - - - :token: The token - - :bytes: (Optional) The bytes for the token - - :logprob: The log probability of the token - - :top_logprobs: The top log probabilities for the token - properties: - token: - title: Token - type: string - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - title: Bytes - logprob: - title: Logprob - type: number - top_logprobs: - items: - $ref: '#/$defs/OpenAITopLogProb' - title: Top Logprobs - type: array - required: - - token - - logprob - - top_logprobs - title: OpenAITokenLogProb - type: object - OpenAIToolMessageParam: - description: >- - A message representing the result of a tool invocation in an OpenAI-compatible - chat completion request. - - - :param role: Must be "tool" to identify this as a tool response - - :param tool_call_id: Unique identifier for the tool call this response - is for - - :param content: The response content from the tool - properties: - role: - const: tool - default: tool - title: Role - type: string - tool_call_id: - title: Tool Call Id - type: string - content: - anyOf: - - type: string - - items: - $ref: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - type: array - title: Content - required: - - tool_call_id - - content - title: OpenAIToolMessageParam - type: object - OpenAITopLogProb: - description: >- - The top log probability for a token from an OpenAI-compatible chat completion - response. - - - :token: The token - - :bytes: (Optional) The bytes for the token - - :logprob: The log probability of the token - properties: - token: - title: Token - type: string - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - title: Bytes - logprob: - title: Logprob - type: number - required: - - token - - logprob - title: OpenAITopLogProb - type: object - OpenAIUserMessageParam: - description: >- - A message from the user in an OpenAI-compatible chat completion request. - - - :param role: Must be "user" to identify this as a user message - - :param content: The content of the message, which can include text and - other media - - :param name: (Optional) The name of the user message participant. - properties: - role: - const: user - default: user - title: Role - type: string - content: - anyOf: - - type: string - - items: - discriminator: - mapping: - file: '#/$defs/OpenAIFile' - image_url: >- - #/$defs/OpenAIChatCompletionContentPartImageParam - text: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - - $ref: >- - #/$defs/OpenAIChatCompletionContentPartImageParam - - $ref: '#/$defs/OpenAIFile' - type: array - title: Content - name: - anyOf: - - type: string - - type: 'null' - title: Name - required: - - content - title: OpenAIUserMessageParam - type: object - description: >- - Response from listing OpenAI-compatible chat completions. - - - :param data: List of chat completion objects with their input messages - - :param has_more: Whether there are more completions available beyond this - list - - :param first_id: ID of the first completion in this list - - :param last_id: ID of the last completion in this list - - :param object: Must be "list" to identify this as a list response + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + stop_reason: + $ref: '#/components/schemas/StopReason' + tool_calls: + title: Tool Calls + items: + $ref: '#/components/schemas/ToolCall' + type: array + required: + - content + - stop_reason + title: CompletionMessage + type: object + InferenceStep: + description: "An inference step in an agent turn.\n\n:param model_response: The response from the LLM." + properties: + turn_id: + title: Turn Id + type: string + step_id: + title: Step Id + type: string + started_at: + title: Started At + format: date-time + type: string + nullable: true + completed_at: + title: Completed At + format: date-time + type: string + nullable: true + step_type: + const: inference + default: inference + title: Step Type + type: string + model_response: + $ref: '#/components/schemas/CompletionMessage' + required: + - turn_id + - step_id + - model_response + title: InferenceStep + type: object + ListOpenAIResponseInputItem: + description: "List container for OpenAI response input items.\n\n:param data: List of input items\n:param object: Object type identifier, always \"list\"" properties: data: items: - $ref: >- - #/$defs/OpenAICompletionWithInputMessages + anyOf: + - discriminator: + mapping: + file_search_call: '#/$defs/OpenAIResponseOutputMessageFileSearchToolCall' + function_call: '#/$defs/OpenAIResponseOutputMessageFunctionToolCall' + mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest' + mcp_call: '#/$defs/OpenAIResponseOutputMessageMCPCall' + mcp_list_tools: '#/$defs/OpenAIResponseOutputMessageMCPListTools' + message: '#/$defs/OpenAIResponseMessage' + web_search_call: '#/$defs/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: Data + type: array + object: + const: list + default: list + title: Object + type: string + required: + - data + title: ListOpenAIResponseInputItem + type: object + ListOpenAIResponseObject: + description: "Paginated list of OpenAI response objects with navigation metadata.\n\n:param data: List of response objects with their input context\n:param has_more: Whether there are more results available beyond this page\n:param first_id: Identifier of the first item in this page\n:param last_id: Identifier of the last item in this page\n:param object: Object type identifier, always \"list\"" + properties: + data: + items: + $ref: '#/components/schemas/OpenAIResponseObjectWithInput' title: Data type: array has_more: @@ -5947,1496 +13381,282 @@ components: title: Object type: string required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIChatCompletionResponse + - data + - has_more + - first_id + - last_id + title: ListOpenAIResponseObject type: object - Annotated: - type: object - ? >- - llama_stack.apis.inference.inference.OpenAIChatCompletion | collections.abc.AsyncIterator[llama_stack.apis.inference.inference.OpenAIChatCompletionChunk] - : type: object - OpenAICompletionWithInputMessages: - $defs: - OpenAIAssistantMessageParam: - description: >- - A message containing the model's (assistant) response in an OpenAI-compatible - chat completion request. - - - :param role: Must be "assistant" to identify this as the model's response - - :param content: The content of the model's response - - :param name: (Optional) The name of the assistant message participant. - - :param tool_calls: List of tool calls. Each tool call is an OpenAIChatCompletionToolCall - object. - properties: - role: - const: assistant - default: assistant - title: Role - type: string - content: - anyOf: - - type: string - - items: - $ref: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - type: array - - type: 'null' - title: Content - name: - anyOf: - - type: string - - type: 'null' - title: Name - tool_calls: - anyOf: - - items: - $ref: '#/$defs/OpenAIChatCompletionToolCall' - type: array - - type: 'null' - title: Tool Calls - title: OpenAIAssistantMessageParam - type: object - "OpenAIChatCompletionContentPartImageParam": - description: >- - Image content part for OpenAI-compatible chat completion messages. - - - :param type: Must be "image_url" to identify this as image content - - :param image_url: Image URL specification and processing details - properties: - type: - const: image_url - default: image_url - title: Type - type: string - image_url: - $ref: '#/$defs/OpenAIImageURL' - required: - - image_url - title: >- - OpenAIChatCompletionContentPartImageParam - type: object - OpenAIChatCompletionContentPartTextParam: - description: >- - Text content part for OpenAI-compatible chat completion messages. - - - :param type: Must be "text" to identify this as text content - - :param text: The text content of the message - properties: - type: - const: text - default: text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: OpenAIChatCompletionContentPartTextParam - type: object - OpenAIChatCompletionToolCall: - description: >- - Tool call specification for OpenAI-compatible chat completion responses. - - - :param index: (Optional) Index of the tool call in the list - - :param id: (Optional) Unique identifier for the tool call - - :param type: Must be "function" to identify this as a function call - - :param function: (Optional) Function call details - properties: - index: - anyOf: - - type: integer - - type: 'null' - title: Index - id: - anyOf: - - type: string - - type: 'null' - title: Id - type: - const: function - default: function - title: Type - type: string - function: - anyOf: - - $ref: >- - #/$defs/OpenAIChatCompletionToolCallFunction - - type: 'null' - title: OpenAIChatCompletionToolCall - type: object - OpenAIChatCompletionToolCallFunction: - description: >- - Function call details for OpenAI-compatible tool calls. - - - :param name: (Optional) Name of the function to call - - :param arguments: (Optional) Arguments to pass to the function as a JSON - string - properties: - name: - anyOf: - - type: string - - type: 'null' - title: Name - arguments: - anyOf: - - type: string - - type: 'null' - title: Arguments - title: OpenAIChatCompletionToolCallFunction - type: object - OpenAIChatCompletionUsage: - description: >- - Usage information for OpenAI chat completion. - - - :param prompt_tokens: Number of tokens in the prompt - - :param completion_tokens: Number of tokens in the completion - - :param total_tokens: Total tokens used (prompt + completion) - - :param input_tokens_details: Detailed breakdown of input token usage - - :param output_tokens_details: Detailed breakdown of output token usage - properties: - prompt_tokens: - title: Prompt Tokens - type: integer - completion_tokens: - title: Completion Tokens - type: integer - total_tokens: - title: Total Tokens - type: integer - prompt_tokens_details: - anyOf: - - $ref: >- - #/$defs/OpenAIChatCompletionUsagePromptTokensDetails - - type: 'null' - completion_tokens_details: - anyOf: - - $ref: >- - #/$defs/OpenAIChatCompletionUsageCompletionTokensDetails - - type: 'null' - required: - - prompt_tokens - - completion_tokens - - total_tokens - title: OpenAIChatCompletionUsage - type: object - "OpenAIChatCompletionUsageCompletionTokensDetails": - description: >- - Token details for output tokens in OpenAI chat completion usage. - - - :param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models) - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - title: Reasoning Tokens - title: >- - OpenAIChatCompletionUsageCompletionTokensDetails - type: object - "OpenAIChatCompletionUsagePromptTokensDetails": - description: >- - Token details for prompt tokens in OpenAI chat completion usage. - - - :param cached_tokens: Number of tokens retrieved from cache - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - title: Cached Tokens - title: >- - OpenAIChatCompletionUsagePromptTokensDetails - type: object - OpenAIChoice: - description: >- - A choice from an OpenAI-compatible chat completion response. - - - :param message: The message from the model - - :param finish_reason: The reason the model stopped generating - - :param index: The index of the choice - - :param logprobs: (Optional) The log probabilities for the tokens in the - message - properties: - message: + MemoryRetrievalStep: + description: "A memory retrieval step in an agent turn.\n\n:param vector_store_ids: The IDs of the vector databases to retrieve context from.\n:param inserted_context: The context retrieved from the vector databases." + properties: + turn_id: + title: Turn Id + type: string + step_id: + title: Step Id + type: string + started_at: + title: Started At + format: date-time + type: string + nullable: true + completed_at: + title: Completed At + format: date-time + type: string + nullable: true + step_type: + const: memory_retrieval + default: memory_retrieval + title: Step Type + type: string + vector_store_ids: + title: Vector Store Ids + type: string + inserted_context: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/$defs/ImageContentItem' + text: '#/$defs/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: discriminator: mapping: - assistant: '#/$defs/OpenAIAssistantMessageParam' - developer: '#/$defs/OpenAIDeveloperMessageParam' - system: '#/$defs/OpenAISystemMessageParam' - tool: '#/$defs/OpenAIToolMessageParam' - user: '#/$defs/OpenAIUserMessageParam' - propertyName: role + image: '#/$defs/ImageContentItem' + text: '#/$defs/TextContentItem' + propertyName: type oneOf: - - $ref: '#/$defs/OpenAIUserMessageParam' - - $ref: '#/$defs/OpenAISystemMessageParam' - - $ref: '#/$defs/OpenAIAssistantMessageParam' - - $ref: '#/$defs/OpenAIToolMessageParam' - - $ref: '#/$defs/OpenAIDeveloperMessageParam' - title: Message - finish_reason: - title: Finish Reason - type: string - index: - title: Index - type: integer - logprobs: - anyOf: - - $ref: '#/$defs/OpenAIChoiceLogprobs' - - type: 'null' - required: - - message - - finish_reason - - index - title: OpenAIChoice - type: object - OpenAIChoiceLogprobs: - description: >- - The log probabilities for the tokens in the message from an OpenAI-compatible - chat completion response. - - - :param content: (Optional) The log probabilities for the tokens in the - message - - :param refusal: (Optional) The log probabilities for the tokens in the - message - properties: - content: - anyOf: - - items: - $ref: '#/$defs/OpenAITokenLogProb' - type: array - - type: 'null' - title: Content - refusal: - anyOf: - - items: - $ref: '#/$defs/OpenAITokenLogProb' - type: array - - type: 'null' - title: Refusal - title: OpenAIChoiceLogprobs - type: object - OpenAIDeveloperMessageParam: - description: >- - A message from the developer in an OpenAI-compatible chat completion request. - - - :param role: Must be "developer" to identify this as a developer message - - :param content: The content of the developer message - - :param name: (Optional) The name of the developer message participant. - properties: - role: - const: developer - default: developer - title: Role - type: string - content: - anyOf: - - type: string - - items: - $ref: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - type: array - title: Content - name: - anyOf: - - type: string - - type: 'null' - title: Name - required: - - content - title: OpenAIDeveloperMessageParam - type: object - OpenAIFile: - properties: - type: - const: file - default: file - title: Type - type: string - file: - $ref: '#/$defs/OpenAIFileFile' - required: - - file - title: OpenAIFile - type: object - OpenAIFileFile: - properties: - file_data: - anyOf: - - type: string - - type: 'null' - title: File Data - file_id: - anyOf: - - type: string - - type: 'null' - title: File Id - filename: - anyOf: - - type: string - - type: 'null' - title: Filename - title: OpenAIFileFile - type: object - OpenAIImageURL: - description: >- - Image URL specification for OpenAI-compatible chat completion messages. - - - :param url: URL of the image to include in the message - - :param detail: (Optional) Level of detail for image processing. Can be - "low", "high", or "auto" - properties: - url: - title: Url - type: string - detail: - anyOf: - - type: string - - type: 'null' - title: Detail - required: - - url - title: OpenAIImageURL - type: object - OpenAISystemMessageParam: - description: >- - A system message providing instructions or context to the model. - - - :param role: Must be "system" to identify this as a system message - - :param content: The content of the "system prompt". If multiple system - messages are provided, they are concatenated. The underlying Llama Stack - code may also add other system messages (for example, for formatting tool - definitions). - - :param name: (Optional) The name of the system message participant. - properties: - role: - const: system - default: system - title: Role - type: string - content: - anyOf: - - type: string - - items: - $ref: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - type: array - title: Content - name: - anyOf: - - type: string - - type: 'null' - title: Name - required: - - content - title: OpenAISystemMessageParam - type: object - OpenAITokenLogProb: - description: >- - The log probability for a token from an OpenAI-compatible chat completion - response. - - - :token: The token - - :bytes: (Optional) The bytes for the token - - :logprob: The log probability of the token - - :top_logprobs: The top log probabilities for the token - properties: - token: - title: Token - type: string - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - title: Bytes - logprob: - title: Logprob - type: number - top_logprobs: - items: - $ref: '#/$defs/OpenAITopLogProb' - title: Top Logprobs - type: array - required: - - token - - logprob - - top_logprobs - title: OpenAITokenLogProb - type: object - OpenAIToolMessageParam: - description: >- - A message representing the result of a tool invocation in an OpenAI-compatible - chat completion request. - - - :param role: Must be "tool" to identify this as a tool response - - :param tool_call_id: Unique identifier for the tool call this response - is for - - :param content: The response content from the tool - properties: - role: - const: tool - default: tool - title: Role - type: string - tool_call_id: - title: Tool Call Id - type: string - content: - anyOf: - - type: string - - items: - $ref: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - type: array - title: Content - required: - - tool_call_id - - content - title: OpenAIToolMessageParam - type: object - OpenAITopLogProb: - description: >- - The top log probability for a token from an OpenAI-compatible chat completion - response. - - - :token: The token - - :bytes: (Optional) The bytes for the token - - :logprob: The log probability of the token - properties: - token: - title: Token - type: string - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - title: Bytes - logprob: - title: Logprob - type: number - required: - - token - - logprob - title: OpenAITopLogProb - type: object - OpenAIUserMessageParam: - description: >- - A message from the user in an OpenAI-compatible chat completion request. - - - :param role: Must be "user" to identify this as a user message - - :param content: The content of the message, which can include text and - other media - - :param name: (Optional) The name of the user message participant. - properties: - role: - const: user - default: user - title: Role - type: string - content: - anyOf: - - type: string - - items: - discriminator: - mapping: - file: '#/$defs/OpenAIFile' - image_url: >- - #/$defs/OpenAIChatCompletionContentPartImageParam - text: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIChatCompletionContentPartTextParam - - $ref: >- - #/$defs/OpenAIChatCompletionContentPartImageParam - - $ref: '#/$defs/OpenAIFile' - type: array - title: Content - name: - anyOf: - - type: string - - type: 'null' - title: Name - required: - - content - title: OpenAIUserMessageParam - type: object + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Inserted Context + required: + - turn_id + - step_id + - vector_store_ids + - inserted_context + title: MemoryRetrievalStep + type: object + OpenAIDeleteResponseObject: + description: "Response object confirming deletion of an OpenAI response.\n\n:param id: Unique identifier of the deleted response\n:param object: Object type identifier, always \"response\"\n:param deleted: Deletion confirmation flag, always True" properties: id: title: Id type: string - choices: - items: - $ref: '#/$defs/OpenAIChoice' - title: Choices - type: array object: - const: chat.completion - default: chat.completion + const: response + default: response title: Object type: string - created: - title: Created - type: integer - model: - title: Model - type: string - usage: - anyOf: - - $ref: '#/$defs/OpenAIChatCompletionUsage' - - type: 'null' - input_messages: - items: - discriminator: - mapping: - assistant: '#/$defs/OpenAIAssistantMessageParam' - developer: '#/$defs/OpenAIDeveloperMessageParam' - system: '#/$defs/OpenAISystemMessageParam' - tool: '#/$defs/OpenAIToolMessageParam' - user: '#/$defs/OpenAIUserMessageParam' - propertyName: role - oneOf: - - $ref: '#/$defs/OpenAIUserMessageParam' - - $ref: '#/$defs/OpenAISystemMessageParam' - - $ref: '#/$defs/OpenAIAssistantMessageParam' - - $ref: '#/$defs/OpenAIToolMessageParam' - - $ref: '#/$defs/OpenAIDeveloperMessageParam' - title: Input Messages - type: array - required: - - id - - choices - - created - - model - - input_messages - title: OpenAICompletionWithInputMessages - type: object - OpenAICompletion: - $defs: - OpenAIChoiceLogprobs: - description: >- - The log probabilities for the tokens in the message from an OpenAI-compatible - chat completion response. - - - :param content: (Optional) The log probabilities for the tokens in the - message - - :param refusal: (Optional) The log probabilities for the tokens in the - message - properties: - content: - anyOf: - - items: - $ref: '#/$defs/OpenAITokenLogProb' - type: array - - type: 'null' - title: Content - refusal: - anyOf: - - items: - $ref: '#/$defs/OpenAITokenLogProb' - type: array - - type: 'null' - title: Refusal - title: OpenAIChoiceLogprobs - type: object - OpenAICompletionChoice: - description: >- - A choice from an OpenAI-compatible completion response. - - - :finish_reason: The reason the model stopped generating - - :text: The text of the choice - - :index: The index of the choice - - :logprobs: (Optional) The log probabilities for the tokens in the choice - properties: - finish_reason: - title: Finish Reason - type: string - text: - title: Text - type: string - index: - title: Index - type: integer - logprobs: - anyOf: - - $ref: '#/$defs/OpenAIChoiceLogprobs' - - type: 'null' - required: - - finish_reason - - text - - index - title: OpenAICompletionChoice - type: object - OpenAITokenLogProb: - description: >- - The log probability for a token from an OpenAI-compatible chat completion - response. - - - :token: The token - - :bytes: (Optional) The bytes for the token - - :logprob: The log probability of the token - - :top_logprobs: The top log probabilities for the token - properties: - token: - title: Token - type: string - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - title: Bytes - logprob: - title: Logprob - type: number - top_logprobs: - items: - $ref: '#/$defs/OpenAITopLogProb' - title: Top Logprobs - type: array - required: - - token - - logprob - - top_logprobs - title: OpenAITokenLogProb - type: object - OpenAITopLogProb: - description: >- - The top log probability for a token from an OpenAI-compatible chat completion - response. - - - :token: The token - - :bytes: (Optional) The bytes for the token - - :logprob: The log probability of the token - properties: - token: - title: Token - type: string - bytes: - anyOf: - - items: - type: integer - type: array - - type: 'null' - title: Bytes - logprob: - title: Logprob - type: number - required: - - token - - logprob - title: OpenAITopLogProb - type: object - description: >- - Response from an OpenAI-compatible completion request. - - - :id: The ID of the completion - - :choices: List of choices - - :created: The Unix timestamp in seconds when the completion was created - - :model: The model that was used to generate the completion - - :object: The object type, which will be "text_completion" - properties: - id: - title: Id - type: string - choices: - items: - $ref: '#/$defs/OpenAICompletionChoice' - title: Choices - type: array - created: - title: Created - type: integer - model: - title: Model - type: string - object: - const: text_completion - default: text_completion - title: Object - type: string - required: - - id - - choices - - created - - model - title: OpenAICompletion - type: object - properties: - finish_reason: - type: string - text: - type: string - index: - type: integer - logprobs: - $ref: '#/components/schemas/OpenAIChoiceLogprobs' - additionalProperties: false - required: - - finish_reason - - text - - index - title: OpenAICompletionChoice - description: >- - A choice from an OpenAI-compatible completion response. - ConversationItem: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - discriminator: - propertyName: type - mapping: - message: '#/components/schemas/OpenAIResponseMessage' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - function_call_output: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - mcp_approval_response: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - OpenAIResponseAnnotationCitation: - type: object - properties: - type: - type: string - const: url_citation - default: url_citation - description: >- - Annotation type identifier, always "url_citation" - end_index: - type: integer - description: >- - End position of the citation span in the content - start_index: - type: integer - description: >- - Start position of the citation span in the content - title: - type: string - description: Title of the referenced web resource - url: - type: string - description: URL of the referenced web resource - additionalProperties: false - required: - - type - - end_index - - start_index - - title - - url - title: OpenAIResponseAnnotationCitation - description: >- - URL citation annotation for referencing external web resources. - "OpenAIResponseAnnotationContainerFileCitation": - type: object - properties: - type: - type: string - const: container_file_citation - default: container_file_citation - container_id: - type: string - end_index: - type: integer - file_id: - type: string - filename: - type: string - start_index: - type: integer - additionalProperties: false - required: - - type - - container_id - - end_index - - file_id - - filename - - start_index - title: >- - OpenAIResponseAnnotationContainerFileCitation - OpenAIResponseAnnotationFileCitation: - type: object - properties: - type: - type: string - const: file_citation - default: file_citation - description: >- - Annotation type identifier, always "file_citation" - file_id: - type: string - description: Unique identifier of the referenced file - filename: - type: string - description: Name of the referenced file - index: - type: integer - description: >- - Position index of the citation within the content - additionalProperties: false - required: - - type - - file_id - - filename - - index - title: OpenAIResponseAnnotationFileCitation - description: >- - File citation annotation for referencing specific files in response content. - OpenAIResponseAnnotationFilePath: - type: object - properties: - type: - type: string - const: file_path - default: file_path - file_id: - type: string - index: - type: integer - additionalProperties: false - required: - - type - - file_id - - index - title: OpenAIResponseAnnotationFilePath - OpenAIResponseAnnotations: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - - $ref: '#/components/schemas/OpenAIResponseAnnotationFilePath' - discriminator: - propertyName: type - mapping: - file_citation: '#/components/schemas/OpenAIResponseAnnotationFileCitation' - url_citation: '#/components/schemas/OpenAIResponseAnnotationCitation' - container_file_citation: '#/components/schemas/OpenAIResponseAnnotationContainerFileCitation' - file_path: '#/components/schemas/OpenAIResponseAnnotationFilePath' - OpenAIResponseContentPartRefusal: - type: object - properties: - type: - type: string - const: refusal - default: refusal - description: >- - Content part type identifier, always "refusal" - refusal: - type: string - description: Refusal text supplied by the model - additionalProperties: false - required: - - type - - refusal - title: OpenAIResponseContentPartRefusal - description: >- - Refusal content within a streamed response part. - "OpenAIResponseInputFunctionToolCallOutput": - type: object - properties: - call_id: - type: string - output: - type: string - type: - type: string - const: function_call_output - default: function_call_output - id: - type: string - status: - type: string - additionalProperties: false - required: - - call_id - - output - - type - title: >- - OpenAIResponseInputFunctionToolCallOutput - description: >- - This represents the output of a function call that gets passed back to the - model. - OpenAIResponseInputMessageContent: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' - - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' - discriminator: - propertyName: type - mapping: - input_text: '#/components/schemas/OpenAIResponseInputMessageContentText' - input_image: '#/components/schemas/OpenAIResponseInputMessageContentImage' - input_file: '#/components/schemas/OpenAIResponseInputMessageContentFile' - OpenAIResponseInputMessageContentFile: - type: object - properties: - type: - type: string - const: input_file - default: input_file - description: >- - The type of the input item. Always `input_file`. - file_data: - type: string - description: >- - The data of the file to be sent to the model. - file_id: - type: string - description: >- - (Optional) The ID of the file to be sent to the model. - file_url: - type: string - description: >- - The URL of the file to be sent to the model. - filename: - type: string - description: >- - The name of the file to be sent to the model. - additionalProperties: false - required: - - type - title: OpenAIResponseInputMessageContentFile - description: >- - File content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentImage: - type: object - properties: - detail: - oneOf: - - type: string - const: low - - type: string - const: high - - type: string - const: auto - default: auto - description: >- - Level of detail for image processing, can be "low", "high", or "auto" - type: - type: string - const: input_image - default: input_image - description: >- - Content type identifier, always "input_image" - file_id: - type: string - description: >- - (Optional) The ID of the file to be sent to the model. - image_url: - type: string - description: (Optional) URL of the image content - additionalProperties: false - required: - - detail - - type - title: OpenAIResponseInputMessageContentImage - description: >- - Image content for input messages in OpenAI response format. - OpenAIResponseInputMessageContentText: - type: object - properties: - text: - type: string - description: The text content of the input message - type: - type: string - const: input_text - default: input_text - description: >- - Content type identifier, always "input_text" - additionalProperties: false - required: - - text - - type - title: OpenAIResponseInputMessageContentText - description: >- - Text content for input messages in OpenAI response format. - OpenAIResponseMCPApprovalRequest: - type: object - properties: - arguments: - type: string - id: - type: string - name: - type: string - server_label: - type: string - type: - type: string - const: mcp_approval_request - default: mcp_approval_request - additionalProperties: false - required: - - arguments - - id - - name - - server_label - - type - title: OpenAIResponseMCPApprovalRequest - description: >- - A request for human approval of a tool invocation. - OpenAIResponseMCPApprovalResponse: - type: object - properties: - approval_request_id: - type: string - approve: + deleted: + default: true + title: Deleted type: boolean - type: - type: string - const: mcp_approval_response - default: mcp_approval_response - id: - type: string - reason: - type: string - additionalProperties: false required: - - approval_request_id - - approve - - type - title: OpenAIResponseMCPApprovalResponse - description: A response to an MCP approval request. - OpenAIResponseMessage: + - id + title: OpenAIDeleteResponseObject type: object + PaginatedResponse: + description: "A generic paginated response that follows a simple format.\n\n:param data: The list of items for the current page\n:param has_more: Whether there are more items available after this set\n:param url: The URL for accessing this list" properties: - content: - oneOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInputMessageContent' - - type: array - items: - $ref: '#/components/schemas/OpenAIResponseOutputMessageContent' - role: - oneOf: - - type: string - const: system - - type: string - const: developer - - type: string - const: user - - type: string - const: assistant - type: - type: string - const: message - default: message - id: - type: string - status: - type: string - additionalProperties: false - required: - - content - - role - - type - title: OpenAIResponseMessage - description: >- - Corresponds to the various Message types in the Responses API. They are all - under one type because the Responses API gives them all the same "type" value, - and there is no way to tell them apart in certain scenarios. - OpenAIResponseOutputMessageContent: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' - discriminator: - propertyName: type - mapping: - output_text: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' - refusal: '#/components/schemas/OpenAIResponseContentPartRefusal' - "OpenAIResponseOutputMessageContentOutputText": - type: object - properties: - text: - type: string - type: - type: string - const: output_text - default: output_text - annotations: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseAnnotations' - additionalProperties: false - required: - - text - - type - - annotations - title: >- - OpenAIResponseOutputMessageContentOutputText - "OpenAIResponseOutputMessageFileSearchToolCall": - type: object - properties: - id: - type: string - description: Unique identifier for this tool call - queries: - type: array - items: - type: string - description: List of search queries executed - status: - type: string - description: >- - Current status of the file search operation - type: - type: string - const: file_search_call - default: file_search_call - description: >- - Tool call type identifier, always "file_search_call" - results: - type: array + data: items: + additionalProperties: true type: object - properties: - attributes: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Key-value attributes associated with the file - file_id: - type: string - description: >- - Unique identifier of the file containing the result - filename: - type: string - description: Name of the file containing the result - score: - type: number - description: >- - Relevance score for this search result (between 0 and 1) - text: - type: string - description: Text content of the search result - additionalProperties: false - required: - - attributes - - file_id - - filename - - score - - text - title: >- - OpenAIResponseOutputMessageFileSearchToolCallResults - description: >- - Search results returned by the file search operation. - description: >- - (Optional) Search results returned by the file search operation - additionalProperties: false + title: Data + type: array + has_more: + title: Has More + type: boolean + url: + title: Url + type: string + nullable: true required: - - id - - queries - - status - - type - title: >- - OpenAIResponseOutputMessageFileSearchToolCall - description: >- - File search tool call output message for OpenAI responses. - "OpenAIResponseOutputMessageFunctionToolCall": + - data + - has_more + title: PaginatedResponse type: object + Session: + description: "A single session of an interaction with an Agentic System.\n\n:param session_id: Unique identifier for the conversation session\n:param session_name: Human-readable name for the session\n:param turns: List of all turns that have occurred in this session\n:param started_at: Timestamp when the session was created" + properties: + session_id: + title: Session Id + type: string + session_name: + title: Session Name + type: string + turns: + items: + $ref: '#/components/schemas/Turn' + title: Turns + type: array + started_at: + format: date-time + title: Started At + type: string + required: + - session_id + - session_name + - turns + - started_at + title: Session + type: object + ShieldCallStep: + description: "A shield call step in an agent turn.\n\n:param violation: The violation from the shield call." + properties: + turn_id: + title: Turn Id + type: string + step_id: + title: Step Id + type: string + started_at: + title: Started At + format: date-time + type: string + nullable: true + completed_at: + title: Completed At + format: date-time + type: string + nullable: true + step_type: + const: shield_call + default: shield_call + title: Step Type + type: string + violation: + $ref: '#/components/schemas/SafetyViolation' + required: + - turn_id + - step_id + - violation + title: ShieldCallStep + type: object + ToolExecutionStep: + description: "A tool execution step in an agent turn.\n\n:param tool_calls: The tool calls to execute.\n:param tool_responses: The tool responses from the tool calls." + properties: + turn_id: + title: Turn Id + type: string + step_id: + title: Step Id + type: string + started_at: + title: Started At + format: date-time + type: string + nullable: true + completed_at: + title: Completed At + format: date-time + type: string + nullable: true + step_type: + const: tool_execution + default: tool_execution + title: Step Type + type: string + tool_calls: + items: + $ref: '#/components/schemas/ToolCall' + title: Tool Calls + type: array + tool_responses: + items: + $ref: '#/components/schemas/ToolResponse' + title: Tool Responses + type: array + required: + - turn_id + - step_id + - tool_calls + - tool_responses + title: ToolExecutionStep + type: object + ToolResponse: + description: "Response from a tool invocation.\n\n:param call_id: Unique identifier for the tool call this response is for\n:param tool_name: Name of the tool that was invoked\n:param content: The response content from the tool\n:param metadata: (Optional) Additional metadata about the tool response" properties: call_id: + title: Call Id type: string - description: Unique identifier for the function call - name: - type: string - description: Name of the function being called - arguments: - type: string - description: >- - JSON string containing the function arguments - type: - type: string - const: function_call - default: function_call - description: >- - Tool call type identifier, always "function_call" - id: - type: string - description: >- - (Optional) Additional identifier for the tool call - status: - type: string - description: >- - (Optional) Current status of the function call execution - additionalProperties: false + tool_name: + anyOf: + - $ref: '#/components/schemas/BuiltinTool' + - type: string + title: Tool Name + content: + anyOf: + - type: string + - discriminator: + mapping: + image: '#/$defs/ImageContentItem' + text: '#/$defs/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + - items: + discriminator: + mapping: + image: '#/$defs/ImageContentItem' + text: '#/$defs/TextContentItem' + propertyName: type + oneOf: + - $ref: '#/components/schemas/ImageContentItem' + - $ref: '#/components/schemas/TextContentItem' + type: array + title: Content + metadata: + title: Metadata + additionalProperties: true + type: object + nullable: true required: - - call_id - - name - - arguments - - type - title: >- - OpenAIResponseOutputMessageFunctionToolCall - description: >- - Function tool call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPCall: + - call_id + - tool_name + - content + title: ToolResponse type: object + ListBatchesResponse: + description: Response containing a list of batch objects. properties: - id: - type: string - description: Unique identifier for this MCP call - type: - type: string - const: mcp_call - default: mcp_call - description: >- - Tool call type identifier, always "mcp_call" - arguments: - type: string - description: >- - JSON string containing the MCP call arguments - name: - type: string - description: Name of the MCP method being called - server_label: - type: string - description: >- - Label identifying the MCP server handling the call - error: - type: string - description: >- - (Optional) Error message if the MCP call failed - output: - type: string - description: >- - (Optional) Output result from the successful MCP call - additionalProperties: false - required: - - id - - type - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall - description: >- - Model Context Protocol (MCP) call output message for OpenAI responses. - OpenAIResponseOutputMessageMCPListTools: - type: object - properties: - id: - type: string - description: >- - Unique identifier for this MCP list tools operation - type: - type: string - const: mcp_list_tools - default: mcp_list_tools - description: >- - Tool call type identifier, always "mcp_list_tools" - server_label: - type: string - description: >- - Label identifying the MCP server providing the tools - tools: - type: array - items: - type: object - properties: - input_schema: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - JSON schema defining the tool's input parameters - name: - type: string - description: Name of the tool - description: - type: string - description: >- - (Optional) Description of what the tool does - additionalProperties: false - required: - - input_schema - - name - title: MCPListToolsTool - description: >- - Tool definition returned by MCP list tools operation. - description: >- - List of available tools provided by the MCP server - additionalProperties: false - required: - - id - - type - - server_label - - tools - title: OpenAIResponseOutputMessageMCPListTools - description: >- - MCP list tools output message containing available tools from an MCP server. - "OpenAIResponseOutputMessageWebSearchToolCall": - type: object - properties: - id: - type: string - description: Unique identifier for this tool call - status: - type: string - description: >- - Current status of the web search operation - type: - type: string - const: web_search_call - default: web_search_call - description: >- - Tool call type identifier, always "web_search_call" - additionalProperties: false - required: - - id - - status - - type - title: >- - OpenAIResponseOutputMessageWebSearchToolCall - description: >- - Web search tool call output message for OpenAI responses. - CreateConversationRequest: - type: object - Conversation: - description: OpenAI-compatible conversation object. - properties: - id: - description: The unique ID of the conversation. - title: Id - type: string object: - const: conversation - default: conversation - description: >- - The object type, which is always conversation. + const: list + default: list title: Object type: string - created_at: - description: >- - The time at which the conversation was created, measured in seconds since - the Unix epoch. - title: Created At - type: integer - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - type: 'null' - description: >- - Set of 16 key-value pairs that can be attached to an object. This can - be useful for storing additional information about the object in a structured - format, and querying for objects via API or the dashboard. - title: Metadata - items: - anyOf: - - items: - additionalProperties: true - type: object - type: array - - type: 'null' - description: >- - Initial items to include in the conversation context. You may add up to - 20 items at a time. - title: Items + data: + description: List of batch objects + items: + $ref: '#/components/schemas/Batch' + title: Data + type: array + first_id: + description: ID of the first batch in the list + title: First Id + type: string + nullable: true + last_id: + description: ID of the last batch in the list + title: Last Id + type: string + nullable: true + has_more: + default: false + description: Whether there are more batches available + title: Has More + type: boolean required: - - id - - created_at - title: Conversation - type: object - UpdateConversationRequest: + - data + title: ListBatchesResponse type: object ConversationDeletedResource: description: Response for deleted conversation. @@ -7456,759 +13676,9 @@ components: title: Deleted type: boolean required: - - id + - id title: ConversationDeletedResource type: object - list: - type: object - Literal: - type: object - ConversationItemList: - $defs: - MCPListToolsTool: - description: >- - Tool definition returned by MCP list tools operation. - - - :param input_schema: JSON schema defining the tool's input parameters - - :param name: Name of the tool - - :param description: (Optional) Description of what the tool does - properties: - input_schema: - additionalProperties: true - title: Input Schema - type: object - name: - title: Name - type: string - description: - anyOf: - - type: string - - type: 'null' - title: Description - required: - - input_schema - - name - title: MCPListToolsTool - type: object - OpenAIResponseAnnotationCitation: - description: >- - URL citation annotation for referencing external web resources. - - - :param type: Annotation type identifier, always "url_citation" - - :param end_index: End position of the citation span in the content - - :param start_index: Start position of the citation span in the content - - :param title: Title of the referenced web resource - - :param url: URL of the referenced web resource - properties: - type: - const: url_citation - default: url_citation - title: Type - type: string - end_index: - title: End Index - type: integer - start_index: - title: Start Index - type: integer - title: - title: Title - type: string - url: - title: Url - type: string - required: - - end_index - - start_index - - title - - url - title: OpenAIResponseAnnotationCitation - type: object - "OpenAIResponseAnnotationContainerFileCitation": - properties: - type: - const: container_file_citation - default: container_file_citation - title: Type - type: string - container_id: - title: Container Id - type: string - end_index: - title: End Index - type: integer - file_id: - title: File Id - type: string - filename: - title: Filename - type: string - start_index: - title: Start Index - type: integer - required: - - container_id - - end_index - - file_id - - filename - - start_index - title: >- - OpenAIResponseAnnotationContainerFileCitation - type: object - OpenAIResponseAnnotationFileCitation: - description: >- - File citation annotation for referencing specific files in response content. - - - :param type: Annotation type identifier, always "file_citation" - - :param file_id: Unique identifier of the referenced file - - :param filename: Name of the referenced file - - :param index: Position index of the citation within the content - properties: - type: - const: file_citation - default: file_citation - title: Type - type: string - file_id: - title: File Id - type: string - filename: - title: Filename - type: string - index: - title: Index - type: integer - required: - - file_id - - filename - - index - title: OpenAIResponseAnnotationFileCitation - type: object - OpenAIResponseAnnotationFilePath: - properties: - type: - const: file_path - default: file_path - title: Type - type: string - file_id: - title: File Id - type: string - index: - title: Index - type: integer - required: - - file_id - - index - title: OpenAIResponseAnnotationFilePath - type: object - OpenAIResponseContentPartRefusal: - description: >- - Refusal content within a streamed response part. - - - :param type: Content part type identifier, always "refusal" - - :param refusal: Refusal text supplied by the model - properties: - type: - const: refusal - default: refusal - title: Type - type: string - refusal: - title: Refusal - type: string - required: - - refusal - title: OpenAIResponseContentPartRefusal - type: object - "OpenAIResponseInputFunctionToolCallOutput": - description: >- - This represents the output of a function call that gets passed back to - the model. - properties: - call_id: - title: Call Id - type: string - output: - title: Output - type: string - type: - const: function_call_output - default: function_call_output - title: Type - type: string - id: - anyOf: - - type: string - - type: 'null' - title: Id - status: - anyOf: - - type: string - - type: 'null' - title: Status - required: - - call_id - - output - title: >- - OpenAIResponseInputFunctionToolCallOutput - type: object - OpenAIResponseInputMessageContentImage: - description: >- - Image content for input messages in OpenAI response format. - - - :param detail: Level of detail for image processing, can be "low", "high", - or "auto" - - :param type: Content type identifier, always "input_image" - - :param image_url: (Optional) URL of the image content - properties: - detail: - anyOf: - - const: low - type: string - - const: high - type: string - - const: auto - type: string - default: auto - title: Detail - type: - const: input_image - default: input_image - title: Type - type: string - image_url: - anyOf: - - type: string - - type: 'null' - title: Image Url - title: OpenAIResponseInputMessageContentImage - type: object - OpenAIResponseInputMessageContentText: - description: >- - Text content for input messages in OpenAI response format. - - - :param text: The text content of the input message - - :param type: Content type identifier, always "input_text" - properties: - text: - title: Text - type: string - type: - const: input_text - default: input_text - title: Type - type: string - required: - - text - title: OpenAIResponseInputMessageContentText - type: object - OpenAIResponseMCPApprovalRequest: - description: >- - A request for human approval of a tool invocation. - properties: - arguments: - title: Arguments - type: string - id: - title: Id - type: string - name: - title: Name - type: string - server_label: - title: Server Label - type: string - type: - const: mcp_approval_request - default: mcp_approval_request - title: Type - type: string - required: - - arguments - - id - - name - - server_label - title: OpenAIResponseMCPApprovalRequest - type: object - OpenAIResponseMCPApprovalResponse: - description: A response to an MCP approval request. - properties: - approval_request_id: - title: Approval Request Id - type: string - approve: - title: Approve - type: boolean - type: - const: mcp_approval_response - default: mcp_approval_response - title: Type - type: string - id: - anyOf: - - type: string - - type: 'null' - title: Id - reason: - anyOf: - - type: string - - type: 'null' - title: Reason - required: - - approval_request_id - - approve - title: OpenAIResponseMCPApprovalResponse - type: object - OpenAIResponseMessage: - description: >- - Corresponds to the various Message types in the Responses API. - - They are all under one type because the Responses API gives them all - - the same "type" value, and there is no way to tell them apart in certain - - scenarios. - properties: - content: - anyOf: - - type: string - - items: - discriminator: - mapping: - input_image: >- - #/$defs/OpenAIResponseInputMessageContentImage - input_text: >- - #/$defs/OpenAIResponseInputMessageContentText - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIResponseInputMessageContentText - - $ref: >- - #/$defs/OpenAIResponseInputMessageContentImage - type: array - - items: - discriminator: - mapping: - output_text: >- - #/$defs/OpenAIResponseOutputMessageContentOutputText - refusal: '#/$defs/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIResponseOutputMessageContentOutputText - - $ref: '#/$defs/OpenAIResponseContentPartRefusal' - type: array - title: Content - role: - anyOf: - - const: system - type: string - - const: developer - type: string - - const: user - type: string - - const: assistant - type: string - title: Role - type: - const: message - default: message - title: Type - type: string - id: - anyOf: - - type: string - - type: 'null' - title: Id - status: - anyOf: - - type: string - - type: 'null' - title: Status - required: - - content - - role - title: OpenAIResponseMessage - type: object - "OpenAIResponseOutputMessageContentOutputText": - properties: - text: - title: Text - type: string - type: - const: output_text - default: output_text - title: Type - type: string - annotations: - items: - discriminator: - mapping: - container_file_citation: >- - #/$defs/OpenAIResponseAnnotationContainerFileCitation - file_citation: >- - #/$defs/OpenAIResponseAnnotationFileCitation - file_path: '#/$defs/OpenAIResponseAnnotationFilePath' - url_citation: '#/$defs/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIResponseAnnotationFileCitation - - $ref: '#/$defs/OpenAIResponseAnnotationCitation' - - $ref: >- - #/$defs/OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/$defs/OpenAIResponseAnnotationFilePath' - title: Annotations - type: array - required: - - text - title: >- - OpenAIResponseOutputMessageContentOutputText - type: object - "OpenAIResponseOutputMessageFileSearchToolCall": - description: >- - File search tool call output message for OpenAI responses. - - - :param id: Unique identifier for this tool call - - :param queries: List of search queries executed - - :param status: Current status of the file search operation - - :param type: Tool call type identifier, always "file_search_call" - - :param results: (Optional) Search results returned by the file search - operation - properties: - id: - title: Id - type: string - queries: - items: - type: string - title: Queries - type: array - status: - title: Status - type: string - type: - const: file_search_call - default: file_search_call - title: Type - type: string - results: - anyOf: - - items: - $ref: >- - #/$defs/OpenAIResponseOutputMessageFileSearchToolCallResults - type: array - - type: 'null' - title: Results - required: - - id - - queries - - status - title: >- - OpenAIResponseOutputMessageFileSearchToolCall - type: object - "OpenAIResponseOutputMessageFileSearchToolCallResults": - description: >- - Search results returned by the file search operation. - - - :param attributes: (Optional) Key-value attributes associated with the - file - - :param file_id: Unique identifier of the file containing the result - - :param filename: Name of the file containing the result - - :param score: Relevance score for this search result (between 0 and 1) - - :param text: Text content of the search result - properties: - attributes: - additionalProperties: true - title: Attributes - type: object - file_id: - title: File Id - type: string - filename: - title: Filename - type: string - score: - title: Score - type: number - text: - title: Text - type: string - required: - - attributes - - file_id - - filename - - score - - text - title: >- - OpenAIResponseOutputMessageFileSearchToolCallResults - type: object - "OpenAIResponseOutputMessageFunctionToolCall": - description: >- - Function tool call output message for OpenAI responses. - - - :param call_id: Unique identifier for the function call - - :param name: Name of the function being called - - :param arguments: JSON string containing the function arguments - - :param type: Tool call type identifier, always "function_call" - - :param id: (Optional) Additional identifier for the tool call - - :param status: (Optional) Current status of the function call execution - properties: - call_id: - title: Call Id - type: string - name: - title: Name - type: string - arguments: - title: Arguments - type: string - type: - const: function_call - default: function_call - title: Type - type: string - id: - anyOf: - - type: string - - type: 'null' - title: Id - status: - anyOf: - - type: string - - type: 'null' - title: Status - required: - - call_id - - name - - arguments - title: >- - OpenAIResponseOutputMessageFunctionToolCall - type: object - OpenAIResponseOutputMessageMCPCall: - description: >- - Model Context Protocol (MCP) call output message for OpenAI responses. - - - :param id: Unique identifier for this MCP call - - :param type: Tool call type identifier, always "mcp_call" - - :param arguments: JSON string containing the MCP call arguments - - :param name: Name of the MCP method being called - - :param server_label: Label identifying the MCP server handling the call - - :param error: (Optional) Error message if the MCP call failed - - :param output: (Optional) Output result from the successful MCP call - properties: - id: - title: Id - type: string - type: - const: mcp_call - default: mcp_call - title: Type - type: string - arguments: - title: Arguments - type: string - name: - title: Name - type: string - server_label: - title: Server Label - type: string - error: - anyOf: - - type: string - - type: 'null' - title: Error - output: - anyOf: - - type: string - - type: 'null' - title: Output - required: - - id - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall - type: object - OpenAIResponseOutputMessageMCPListTools: - description: >- - MCP list tools output message containing available tools from an MCP server. - - - :param id: Unique identifier for this MCP list tools operation - - :param type: Tool call type identifier, always "mcp_list_tools" - - :param server_label: Label identifying the MCP server providing the tools - - :param tools: List of available tools provided by the MCP server - properties: - id: - title: Id - type: string - type: - const: mcp_list_tools - default: mcp_list_tools - title: Type - type: string - server_label: - title: Server Label - type: string - tools: - items: - $ref: '#/$defs/MCPListToolsTool' - title: Tools - type: array - required: - - id - - server_label - - tools - title: OpenAIResponseOutputMessageMCPListTools - type: object - "OpenAIResponseOutputMessageWebSearchToolCall": - description: >- - Web search tool call output message for OpenAI responses. - - - :param id: Unique identifier for this tool call - - :param status: Current status of the web search operation - - :param type: Tool call type identifier, always "web_search_call" - properties: - id: - title: Id - type: string - status: - title: Status - type: string - type: - const: web_search_call - default: web_search_call - title: Type - type: string - required: - - id - - status - title: >- - OpenAIResponseOutputMessageWebSearchToolCall - type: object - description: >- - List of conversation items with pagination. - properties: - object: - default: list - description: Object type - title: Object - type: string - data: - description: List of conversation items - items: - discriminator: - mapping: - file_search_call: >- - #/$defs/OpenAIResponseOutputMessageFileSearchToolCall - function_call: >- - #/$defs/OpenAIResponseOutputMessageFunctionToolCall - function_call_output: >- - #/$defs/OpenAIResponseInputFunctionToolCallOutput - mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest' - mcp_approval_response: >- - #/$defs/OpenAIResponseMCPApprovalResponse - mcp_call: >- - #/$defs/OpenAIResponseOutputMessageMCPCall - mcp_list_tools: >- - #/$defs/OpenAIResponseOutputMessageMCPListTools - message: '#/$defs/OpenAIResponseMessage' - web_search_call: >- - #/$defs/OpenAIResponseOutputMessageWebSearchToolCall - propertyName: type - oneOf: - - $ref: '#/$defs/OpenAIResponseMessage' - - $ref: >- - #/$defs/OpenAIResponseOutputMessageWebSearchToolCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageFileSearchToolCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageFunctionToolCall - - $ref: >- - #/$defs/OpenAIResponseInputFunctionToolCallOutput - - $ref: '#/$defs/OpenAIResponseMCPApprovalRequest' - - $ref: >- - #/$defs/OpenAIResponseMCPApprovalResponse - - $ref: >- - #/$defs/OpenAIResponseOutputMessageMCPCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageMCPListTools - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - description: The ID of the first item in the list - title: First Id - last_id: - anyOf: - - type: string - - type: 'null' - description: The ID of the last item in the list - title: Last Id - has_more: - default: false - description: Whether there are more items available - title: Has More - type: boolean - required: - - data - title: ConversationItemList - type: object - AddItemsRequest: - type: object ConversationItemDeletedResource: description: Response for deleted conversation item. properties: @@ -8227,176 +13697,15 @@ components: title: Deleted type: boolean required: - - id + - id title: ConversationItemDeletedResource type: object - OpenAIEmbeddingsResponse: - $defs: - OpenAIEmbeddingData: - description: >- - A single embedding data object from an OpenAI-compatible embeddings response. - - - :param object: The object type, which will be "embedding" - - :param embedding: The embedding vector as a list of floats (when encoding_format="float") - or as a base64-encoded string (when encoding_format="base64") - - :param index: The index of the embedding in the input list - properties: - object: - const: embedding - default: embedding - title: Object - type: string - embedding: - anyOf: - - items: - type: number - type: array - - type: string - title: Embedding - index: - title: Index - type: integer - required: - - embedding - - index - title: OpenAIEmbeddingData - type: object - OpenAIEmbeddingUsage: - description: >- - Usage information for an OpenAI-compatible embeddings response. - - - :param prompt_tokens: The number of tokens in the input - - :param total_tokens: The total number of tokens used - properties: - prompt_tokens: - title: Prompt Tokens - type: integer - total_tokens: - title: Total Tokens - type: integer - required: - - prompt_tokens - - total_tokens - title: OpenAIEmbeddingUsage - type: object - description: >- - Response from an OpenAI-compatible embeddings request. - - - :param object: The object type, which will be "list" - - :param data: List of embedding data objects - - :param model: The model that was used to generate the embeddings - - :param usage: Usage information - properties: - object: - const: list - default: list - title: Object - type: string - data: - items: - $ref: '#/$defs/OpenAIEmbeddingData' - title: Data - type: array - model: - title: Model - type: string - usage: - $ref: '#/$defs/OpenAIEmbeddingUsage' - required: - - data - - model - - usage - title: OpenAIEmbeddingsResponse - type: object - OpenAIFilePurpose: - type: object ListOpenAIFileResponse: - $defs: - OpenAIFileObject: - description: >- - OpenAI File object as defined in the OpenAI Files API. - - - :param object: The object type, which is always "file" - - :param id: The file identifier, which can be referenced in the API endpoints - - :param bytes: The size of the file, in bytes - - :param created_at: The Unix timestamp (in seconds) for when the file was - created - - :param expires_at: The Unix timestamp (in seconds) for when the file expires - - :param filename: The name of the file - - :param purpose: The intended purpose of the file - properties: - object: - const: file - default: file - title: Object - type: string - id: - title: Id - type: string - bytes: - title: Bytes - type: integer - created_at: - title: Created At - type: integer - expires_at: - title: Expires At - type: integer - filename: - title: Filename - type: string - purpose: - $ref: '#/$defs/OpenAIFilePurpose' - required: - - id - - bytes - - created_at - - expires_at - - filename - - purpose - title: OpenAIFileObject - type: object - OpenAIFilePurpose: - description: >- - Valid purpose values for OpenAI Files API. - enum: - - assistants - - batch - title: OpenAIFilePurpose - type: string - description: >- - Response for listing files in OpenAI Files API. - - - :param data: List of file objects - - :param has_more: Whether there are more files available beyond this page - - :param first_id: ID of the first file in the list for pagination - - :param last_id: ID of the last file in the list for pagination - - :param object: The object type, which is always "list" + description: "Response for listing files in OpenAI Files API.\n\n:param data: List of file objects\n:param has_more: Whether there are more files available beyond this page\n:param first_id: ID of the first file in the list for pagination\n:param last_id: ID of the last file in the list for pagination\n:param object: The object type, which is always \"list\"" properties: data: items: - $ref: '#/$defs/OpenAIFileObject' + $ref: '#/components/schemas/OpenAIFileObject' title: Data type: array has_more: @@ -8414,104 +13723,14 @@ components: title: Object type: string required: - - data - - has_more - - first_id - - last_id + - data + - has_more + - first_id + - last_id title: ListOpenAIFileResponse type: object - ExpiresAfter: - description: >- - Control expiration of uploaded files. - - - Params: - - anchor, must be "created_at" - - seconds, must be int between 3600 and 2592000 (1 hour to 30 days) - properties: - anchor: - const: created_at - title: Anchor - type: string - seconds: - maximum: 2592000 - minimum: 3600 - title: Seconds - type: integer - required: - - anchor - - seconds - title: ExpiresAfter - type: object - OpenAIFileObject: - $defs: - OpenAIFilePurpose: - description: >- - Valid purpose values for OpenAI Files API. - enum: - - assistants - - batch - title: OpenAIFilePurpose - type: string - description: >- - OpenAI File object as defined in the OpenAI Files API. - - - :param object: The object type, which is always "file" - - :param id: The file identifier, which can be referenced in the API endpoints - - :param bytes: The size of the file, in bytes - - :param created_at: The Unix timestamp (in seconds) for when the file was created - - :param expires_at: The Unix timestamp (in seconds) for when the file expires - - :param filename: The name of the file - - :param purpose: The intended purpose of the file - properties: - object: - const: file - default: file - title: Object - type: string - id: - title: Id - type: string - bytes: - title: Bytes - type: integer - created_at: - title: Created At - type: integer - expires_at: - title: Expires At - type: integer - filename: - title: Filename - type: string - purpose: - $ref: '#/$defs/OpenAIFilePurpose' - required: - - id - - bytes - - created_at - - expires_at - - filename - - purpose - title: OpenAIFileObject - type: object OpenAIFileDeleteResponse: - description: >- - Response for deleting a file in OpenAI Files API. - - - :param id: The file identifier that was deleted - - :param object: The object type, which is always "file" - - :param deleted: Whether the file was successfully deleted + description: "Response for deleting a file in OpenAI Files API.\n\n:param id: The file identifier that was deleted\n:param object: The object type, which is always \"file\"\n:param deleted: Whether the file was successfully deleted" properties: id: title: Id @@ -8525,69 +13744,12 @@ components: title: Deleted type: boolean required: - - id - - deleted + - id + - deleted title: OpenAIFileDeleteResponse type: object - Response: - type: object - HealthInfo: - $defs: - HealthStatus: - enum: - - OK - - Error - - Not Implemented - title: HealthStatus - type: string - description: >- - Health status information for the service. - - - :param status: Current health status of the service - properties: - status: - $ref: '#/$defs/HealthStatus' - required: - - status - title: HealthInfo - type: object - ListRoutesResponse: - $defs: - RouteInfo: - description: >- - Information about an API route including its path, method, and implementing - providers. - - - :param route: The API endpoint path - - :param method: HTTP method for the route - - :param provider_types: List of provider types that implement this route - properties: - route: - title: Route - type: string - method: - title: Method - type: string - provider_types: - items: - type: string - title: Provider Types - type: array - required: - - route - - method - - provider_types - title: RouteInfo - type: object - description: >- - Response containing a list of all available API routes. - - - :param data: List of available route information objects + ListOpenAIChatCompletionResponse: + description: "Response from listing OpenAI-compatible chat completions.\n\n:param data: List of chat completion objects with their input messages\n:param has_more: Whether there are more completions available beyond this list\n:param first_id: ID of the first completion in this list\n:param last_id: ID of the last completion in this list\n:param object: Must be \"list\" to identify this as a list response" properties: data: items: @@ -10271,3183 +15433,270 @@ components: title: Object type: string required: - - data - - has_more - - first_id - - last_id - title: ListOpenAIResponseObject + - data + - has_more + - first_id + - last_id + title: ListOpenAIChatCompletionResponse type: object + OpenAIAssistantMessageParam: + description: "A message containing the model's (assistant) response in an OpenAI-compatible chat completion request.\n\n:param role: Must be \"assistant\" to identify this as the model's response\n:param content: The content of the model's response\n:param name: (Optional) The name of the assistant message participant.\n:param tool_calls: List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object." properties: - code: + role: + const: assistant + default: assistant + title: Role type: string - description: >- - Error code identifying the type of failure - message: - type: string - description: >- - Human-readable error message describing the failure - additionalProperties: false - required: - - code - - message - title: OpenAIResponseError - description: >- - Error details for failed OpenAI response requests. - OpenAIResponseInput: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseOutput' - - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' - - $ref: '#/components/schemas/OpenAIResponseMessage' - OpenAIResponseInputToolFileSearch: - type: object - properties: - type: - type: string - const: file_search - default: file_search - description: >- - Tool type identifier, always "file_search" - vector_store_ids: - type: array - items: - type: string - description: >- - List of vector store identifiers to search within - filters: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) Additional filters to apply to the search - max_num_results: - type: integer - default: 10 - description: >- - (Optional) Maximum number of search results to return (1-50) - ranking_options: - type: object - properties: - ranker: - type: string - description: >- - (Optional) Name of the ranking algorithm to use - score_threshold: - type: number - default: 0.0 - description: >- - (Optional) Minimum relevance score threshold for results - additionalProperties: false - description: >- - (Optional) Options for ranking and scoring search results - additionalProperties: false - required: - - type - - vector_store_ids - title: OpenAIResponseInputToolFileSearch - description: >- - File search tool configuration for OpenAI response inputs. - OpenAIResponseInputToolFunction: - type: object - properties: - type: - type: string - const: function - default: function - description: Tool type identifier, always "function" - name: - type: string - description: Name of the function that can be called - description: - type: string - description: >- - (Optional) Description of what the function does - parameters: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) JSON schema defining the function's parameters - strict: - type: boolean - description: >- - (Optional) Whether to enforce strict parameter validation - additionalProperties: false - required: - - type - - name - title: OpenAIResponseInputToolFunction - description: >- - Function tool configuration for OpenAI response inputs. - OpenAIResponseInputToolWebSearch: - type: object - properties: - type: - oneOf: - - type: string - const: web_search - - type: string - const: web_search_preview - - type: string - const: web_search_preview_2025_03_11 - default: web_search - description: Web search tool type variant to use - search_context_size: - type: string - default: medium - description: >- - (Optional) Size of search context, must be "low", "medium", or "high" - additionalProperties: false - required: - - type - title: OpenAIResponseInputToolWebSearch - description: >- - Web search tool configuration for OpenAI response inputs. - OpenAIResponseObjectWithInput: - type: object - properties: - created_at: - type: integer - description: >- - Unix timestamp when the response was created - error: - $ref: '#/components/schemas/OpenAIResponseError' - description: >- - (Optional) Error details if the response generation failed - id: - type: string - description: Unique identifier for this response - model: - type: string - description: Model identifier used for generation - object: - type: string - const: response - default: response - description: >- - Object type identifier, always "response" - output: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseOutput' - description: >- - List of generated output items (messages, tool calls, etc.) - parallel_tool_calls: - type: boolean - default: false - description: >- - Whether tool calls can be executed in parallel - previous_response_id: - type: string - description: >- - (Optional) ID of the previous response in a conversation - prompt: - $ref: '#/components/schemas/OpenAIResponsePrompt' - description: >- - (Optional) Reference to a prompt template and its variables. - status: - type: string - description: >- - Current status of the response generation - temperature: - type: number - description: >- - (Optional) Sampling temperature used for generation - text: - $ref: '#/components/schemas/OpenAIResponseText' - description: >- - Text formatting configuration for the response - top_p: - type: number - description: >- - (Optional) Nucleus sampling parameter used for generation - tools: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseTool' - description: >- - (Optional) An array of tools the model may call while generating a response. - truncation: - type: string - description: >- - (Optional) Truncation strategy applied to the response - usage: - $ref: '#/components/schemas/OpenAIResponseUsage' - description: >- - (Optional) Token usage information for the response - instructions: - type: string - description: >- - (Optional) System message inserted into the model's context - input: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInput' - description: >- - List of input items that led to this response - additionalProperties: false - required: - - created_at - - id - - model - - object - - output - - parallel_tool_calls - - status - - text - - input - title: OpenAIResponseObjectWithInput - description: >- - OpenAI response object extended with input context information. - OpenAIResponseOutput: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseMessage' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - discriminator: - propertyName: type - mapping: - message: '#/components/schemas/OpenAIResponseMessage' - web_search_call: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' - file_search_call: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' - function_call: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' - mcp_call: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' - mcp_list_tools: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' - mcp_approval_request: '#/components/schemas/OpenAIResponseMCPApprovalRequest' - OpenAIResponsePrompt: - type: object - properties: - id: - type: string - description: Unique identifier of the prompt template - variables: - type: object - additionalProperties: - $ref: '#/components/schemas/OpenAIResponseInputMessageContent' - description: >- - Dictionary of variable names to OpenAIResponseInputMessageContent structure - for template substitution. The substitution values can either be strings, - or other Response input types like images or files. - version: - type: string - description: >- - Version number of the prompt to use (defaults to latest if not specified) - additionalProperties: false - required: - - id - title: OpenAIResponsePrompt - description: >- - OpenAI compatible Prompt object that is used in OpenAI responses. - OpenAIResponseText: - type: object - properties: - format: - type: object - properties: - type: - oneOf: - - type: string - const: text - - type: string - const: json_schema - - type: string - const: json_object - description: >- - Must be "text", "json_schema", or "json_object" to identify the format - type - name: - type: string - description: >- - The name of the response format. Only used for json_schema. - schema: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - The JSON schema the response should conform to. In a Python SDK, this - is often a `pydantic` model. Only used for json_schema. - description: - type: string - description: >- - (Optional) A description of the response format. Only used for json_schema. - strict: - type: boolean - description: >- - (Optional) Whether to strictly enforce the JSON schema. If true, the - response must match the schema exactly. Only used for json_schema. - additionalProperties: false - required: - - type - description: >- - (Optional) Text format configuration specifying output format requirements - additionalProperties: false - title: OpenAIResponseText - description: >- - Text response configuration for OpenAI responses. - OpenAIResponseTool: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - - $ref: '#/components/schemas/OpenAIResponseToolMCP' - discriminator: - propertyName: type - mapping: - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseToolMCP' - OpenAIResponseToolMCP: - type: object - properties: - type: - type: string - const: mcp - default: mcp - description: Tool type identifier, always "mcp" - server_label: - type: string - description: Label to identify this MCP server - allowed_tools: - oneOf: - - type: array - items: - type: string - - type: object - properties: - tool_names: - type: array - items: - type: string - description: >- - (Optional) List of specific tool names that are allowed - additionalProperties: false - title: AllowedToolsFilter - description: >- - Filter configuration for restricting which MCP tools can be used. - description: >- - (Optional) Restriction on which tools can be used from this server - additionalProperties: false - required: - - type - - server_label - title: OpenAIResponseToolMCP - description: >- - Model Context Protocol (MCP) tool configuration for OpenAI response object. - OpenAIResponseUsage: - type: object - properties: - input_tokens: - type: integer - description: Number of tokens in the input - output_tokens: - type: integer - description: Number of tokens in the output - total_tokens: - type: integer - description: Total tokens used (input + output) - input_tokens_details: - type: object - properties: - cached_tokens: - type: integer - description: Number of tokens retrieved from cache - additionalProperties: false - description: Detailed breakdown of input token usage - output_tokens_details: - type: object - properties: - reasoning_tokens: - type: integer - description: >- - Number of tokens used for reasoning (o1/o3 models) - additionalProperties: false - description: Detailed breakdown of output token usage - additionalProperties: false - required: - - input_tokens - - output_tokens - - total_tokens - title: OpenAIResponseUsage - description: Usage information for OpenAI response. - ResponseGuardrailSpec: - type: object - properties: - type: - type: string - description: The type/identifier of the guardrail. - additionalProperties: false - required: - - type - title: ResponseGuardrailSpec - description: >- - Specification for a guardrail to apply during response generation. - OpenAIResponseInputTool: - oneOf: - - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' - - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' - - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' - - $ref: '#/components/schemas/OpenAIResponseInputToolMCP' - discriminator: - propertyName: type - mapping: - web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch' - file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch' - function: '#/components/schemas/OpenAIResponseInputToolFunction' - mcp: '#/components/schemas/OpenAIResponseInputToolMCP' - OpenAIResponseInputToolMCP: - type: object - properties: - type: - type: string - const: mcp - default: mcp - description: Tool type identifier, always "mcp" - server_label: - type: string - description: Label to identify this MCP server - server_url: - type: string - description: URL endpoint of the MCP server - headers: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - (Optional) HTTP headers to include when connecting to the server - require_approval: - oneOf: - - type: string - const: always - - type: string - const: never - - type: object - properties: - always: - type: array - items: - type: string - description: >- - (Optional) List of tool names that always require approval - never: - type: array - items: - type: string - description: >- - (Optional) List of tool names that never require approval - additionalProperties: false - title: ApprovalFilter - description: >- - Filter configuration for MCP tool approval requirements. - default: never - description: >- - Approval requirement for tool calls ("always", "never", or filter) - allowed_tools: - oneOf: - - type: array - items: - type: string - - type: object - properties: - tool_names: - type: array - items: - type: string - description: >- - (Optional) List of specific tool names that are allowed - additionalProperties: false - title: AllowedToolsFilter - description: >- - Filter configuration for restricting which MCP tools can be used. - description: >- - (Optional) Restriction on which tools can be used from this server - additionalProperties: false - required: - - type - - server_label - - server_url - - require_approval - title: OpenAIResponseInputToolMCP - description: >- - Model Context Protocol (MCP) tool configuration for OpenAI response inputs. - CreateOpenaiResponseRequest: - type: object - properties: - input: - oneOf: - - type: string - - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInput' - description: Input message(s) to create the response. - model: - type: string - description: The underlying LLM used for completions. - prompt: - $ref: '#/components/schemas/OpenAIResponsePrompt' - description: >- - (Optional) Prompt object with ID, version, and variables. - instructions: - type: string - previous_response_id: - type: string - description: >- - (Optional) if specified, the new response will be a continuation of the - previous response. This can be used to easily fork-off new responses from - existing responses. - conversation: - type: string - description: >- - (Optional) The ID of a conversation to add the response to. Must begin - with 'conv_'. Input and output messages will be automatically added to - the conversation. - store: - type: boolean - stream: - type: boolean - temperature: - type: number - text: - $ref: '#/components/schemas/OpenAIResponseText' - tools: - type: array - items: - $ref: '#/components/schemas/OpenAIResponseInputTool' - include: - type: array - items: - type: string - description: >- - (Optional) Additional fields to include in the response. - max_infer_iters: - type: integer - additionalProperties: false - required: - - input - - model - title: CreateOpenaiResponseRequest - OpenAIResponseObject: - $defs: - AllowedToolsFilter: - description: >- - Filter configuration for restricting which MCP tools can be used. - - - :param tool_names: (Optional) List of specific tool names that are allowed - properties: - tool_names: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Tool Names - title: AllowedToolsFilter - type: object - MCPListToolsTool: - description: >- - Tool definition returned by MCP list tools operation. - - - :param input_schema: JSON schema defining the tool's input parameters - - :param name: Name of the tool - - :param description: (Optional) Description of what the tool does - properties: - input_schema: - additionalProperties: true - title: Input Schema - type: object - name: - title: Name - type: string - description: - anyOf: - - type: string - - type: 'null' - title: Description - required: - - input_schema - - name - title: MCPListToolsTool - type: object - OpenAIResponseAnnotationCitation: - description: >- - URL citation annotation for referencing external web resources. - - - :param type: Annotation type identifier, always "url_citation" - - :param end_index: End position of the citation span in the content - - :param start_index: Start position of the citation span in the content - - :param title: Title of the referenced web resource - - :param url: URL of the referenced web resource - properties: - type: - const: url_citation - default: url_citation - title: Type - type: string - end_index: - title: End Index - type: integer - start_index: - title: Start Index - type: integer - title: - title: Title - type: string - url: - title: Url - type: string - required: - - end_index - - start_index - - title - - url - title: OpenAIResponseAnnotationCitation - type: object - "OpenAIResponseAnnotationContainerFileCitation": - properties: - type: - const: container_file_citation - default: container_file_citation - title: Type - type: string - container_id: - title: Container Id - type: string - end_index: - title: End Index - type: integer - file_id: - title: File Id - type: string - filename: - title: Filename - type: string - start_index: - title: Start Index - type: integer - required: - - container_id - - end_index - - file_id - - filename - - start_index - title: >- - OpenAIResponseAnnotationContainerFileCitation - type: object - OpenAIResponseAnnotationFileCitation: - description: >- - File citation annotation for referencing specific files in response content. - - - :param type: Annotation type identifier, always "file_citation" - - :param file_id: Unique identifier of the referenced file - - :param filename: Name of the referenced file - - :param index: Position index of the citation within the content - properties: - type: - const: file_citation - default: file_citation - title: Type - type: string - file_id: - title: File Id - type: string - filename: - title: Filename - type: string - index: - title: Index - type: integer - required: - - file_id - - filename - - index - title: OpenAIResponseAnnotationFileCitation - type: object - OpenAIResponseAnnotationFilePath: - properties: - type: - const: file_path - default: file_path - title: Type - type: string - file_id: - title: File Id - type: string - index: - title: Index - type: integer - required: - - file_id - - index - title: OpenAIResponseAnnotationFilePath - type: object - OpenAIResponseContentPartRefusal: - description: >- - Refusal content within a streamed response part. - - - :param type: Content part type identifier, always "refusal" - - :param refusal: Refusal text supplied by the model - properties: - type: - const: refusal - default: refusal - title: Type - type: string - refusal: - title: Refusal - type: string - required: - - refusal - title: OpenAIResponseContentPartRefusal - type: object - OpenAIResponseError: - description: >- - Error details for failed OpenAI response requests. - - - :param code: Error code identifying the type of failure - - :param message: Human-readable error message describing the failure - properties: - code: - title: Code - type: string - message: - title: Message - type: string - required: - - code - - message - title: OpenAIResponseError - type: object - OpenAIResponseInputMessageContentImage: - description: >- - Image content for input messages in OpenAI response format. - - - :param detail: Level of detail for image processing, can be "low", "high", - or "auto" - - :param type: Content type identifier, always "input_image" - - :param image_url: (Optional) URL of the image content - properties: - detail: - anyOf: - - const: low - type: string - - const: high - type: string - - const: auto - type: string - default: auto - title: Detail - type: - const: input_image - default: input_image - title: Type - type: string - image_url: - anyOf: - - type: string - - type: 'null' - title: Image Url - title: OpenAIResponseInputMessageContentImage - type: object - OpenAIResponseInputMessageContentText: - description: >- - Text content for input messages in OpenAI response format. - - - :param text: The text content of the input message - - :param type: Content type identifier, always "input_text" - properties: - text: - title: Text - type: string - type: - const: input_text - default: input_text - title: Type - type: string - required: - - text - title: OpenAIResponseInputMessageContentText - type: object - OpenAIResponseInputToolFileSearch: - description: >- - File search tool configuration for OpenAI response inputs. - - - :param type: Tool type identifier, always "file_search" - - :param vector_store_ids: List of vector store identifiers to search within - - :param filters: (Optional) Additional filters to apply to the search - - :param max_num_results: (Optional) Maximum number of search results to - return (1-50) - - :param ranking_options: (Optional) Options for ranking and scoring search - results - properties: - type: - const: file_search - default: file_search - title: Type - type: string - vector_store_ids: - items: - type: string - title: Vector Store Ids - type: array - filters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Filters - max_num_results: - anyOf: - - maximum: 50 - minimum: 1 - type: integer - - type: 'null' - default: 10 - title: Max Num Results - ranking_options: - anyOf: - - $ref: '#/$defs/SearchRankingOptions' - - type: 'null' - required: - - vector_store_ids - title: OpenAIResponseInputToolFileSearch - type: object - OpenAIResponseInputToolFunction: - description: >- - Function tool configuration for OpenAI response inputs. - - - :param type: Tool type identifier, always "function" - - :param name: Name of the function that can be called - - :param description: (Optional) Description of what the function does - - :param parameters: (Optional) JSON schema defining the function's parameters - - :param strict: (Optional) Whether to enforce strict parameter validation - properties: - type: - const: function - default: function - title: Type - type: string - name: - title: Name - type: string - description: - anyOf: - - type: string - - type: 'null' - title: Description - parameters: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Parameters - strict: - anyOf: - - type: boolean - - type: 'null' - title: Strict - required: - - name - - parameters - title: OpenAIResponseInputToolFunction - type: object - OpenAIResponseInputToolWebSearch: - description: >- - Web search tool configuration for OpenAI response inputs. - - - :param type: Web search tool type variant to use - - :param search_context_size: (Optional) Size of search context, must be - "low", "medium", or "high" - properties: - type: - anyOf: - - const: web_search - type: string - - const: web_search_preview - type: string - - const: web_search_preview_2025_03_11 - type: string - default: web_search - title: Type - search_context_size: - anyOf: - - pattern: ^low|medium|high$ - type: string - - type: 'null' - default: medium - title: Search Context Size - title: OpenAIResponseInputToolWebSearch - type: object - OpenAIResponseMCPApprovalRequest: - description: >- - A request for human approval of a tool invocation. - properties: - arguments: - title: Arguments - type: string - id: - title: Id - type: string - name: - title: Name - type: string - server_label: - title: Server Label - type: string - type: - const: mcp_approval_request - default: mcp_approval_request - title: Type - type: string - required: - - arguments - - id - - name - - server_label - title: OpenAIResponseMCPApprovalRequest - type: object - OpenAIResponseMessage: - description: >- - Corresponds to the various Message types in the Responses API. - - They are all under one type because the Responses API gives them all - - the same "type" value, and there is no way to tell them apart in certain - - scenarios. - properties: - content: - anyOf: - - type: string - - items: - discriminator: - mapping: - input_image: >- - #/$defs/OpenAIResponseInputMessageContentImage - input_text: >- - #/$defs/OpenAIResponseInputMessageContentText - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIResponseInputMessageContentText - - $ref: >- - #/$defs/OpenAIResponseInputMessageContentImage - type: array - - items: - discriminator: - mapping: - output_text: >- - #/$defs/OpenAIResponseOutputMessageContentOutputText - refusal: '#/$defs/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIResponseOutputMessageContentOutputText - - $ref: '#/$defs/OpenAIResponseContentPartRefusal' - type: array - title: Content - role: - anyOf: - - const: system - type: string - - const: developer - type: string - - const: user - type: string - - const: assistant - type: string - title: Role - type: - const: message - default: message - title: Type - type: string - id: - anyOf: - - type: string - - type: 'null' - title: Id - status: - anyOf: - - type: string - - type: 'null' - title: Status - required: - - content - - role - title: OpenAIResponseMessage - type: object - "OpenAIResponseOutputMessageContentOutputText": - properties: - text: - title: Text - type: string - type: - const: output_text - default: output_text - title: Type - type: string - annotations: - items: - discriminator: - mapping: - container_file_citation: >- - #/$defs/OpenAIResponseAnnotationContainerFileCitation - file_citation: >- - #/$defs/OpenAIResponseAnnotationFileCitation - file_path: '#/$defs/OpenAIResponseAnnotationFilePath' - url_citation: '#/$defs/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIResponseAnnotationFileCitation - - $ref: '#/$defs/OpenAIResponseAnnotationCitation' - - $ref: >- - #/$defs/OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/$defs/OpenAIResponseAnnotationFilePath' - title: Annotations - type: array - required: - - text - title: >- - OpenAIResponseOutputMessageContentOutputText - type: object - "OpenAIResponseOutputMessageFileSearchToolCall": - description: >- - File search tool call output message for OpenAI responses. - - - :param id: Unique identifier for this tool call - - :param queries: List of search queries executed - - :param status: Current status of the file search operation - - :param type: Tool call type identifier, always "file_search_call" - - :param results: (Optional) Search results returned by the file search - operation - properties: - id: - title: Id - type: string - queries: - items: - type: string - title: Queries - type: array - status: - title: Status - type: string - type: - const: file_search_call - default: file_search_call - title: Type - type: string - results: - anyOf: - - items: - $ref: >- - #/$defs/OpenAIResponseOutputMessageFileSearchToolCallResults - type: array - - type: 'null' - title: Results - required: - - id - - queries - - status - title: >- - OpenAIResponseOutputMessageFileSearchToolCall - type: object - "OpenAIResponseOutputMessageFileSearchToolCallResults": - description: >- - Search results returned by the file search operation. - - - :param attributes: (Optional) Key-value attributes associated with the - file - - :param file_id: Unique identifier of the file containing the result - - :param filename: Name of the file containing the result - - :param score: Relevance score for this search result (between 0 and 1) - - :param text: Text content of the search result - properties: - attributes: - additionalProperties: true - title: Attributes - type: object - file_id: - title: File Id - type: string - filename: - title: Filename - type: string - score: - title: Score - type: number - text: - title: Text - type: string - required: - - attributes - - file_id - - filename - - score - - text - title: >- - OpenAIResponseOutputMessageFileSearchToolCallResults - type: object - "OpenAIResponseOutputMessageFunctionToolCall": - description: >- - Function tool call output message for OpenAI responses. - - - :param call_id: Unique identifier for the function call - - :param name: Name of the function being called - - :param arguments: JSON string containing the function arguments - - :param type: Tool call type identifier, always "function_call" - - :param id: (Optional) Additional identifier for the tool call - - :param status: (Optional) Current status of the function call execution - properties: - call_id: - title: Call Id - type: string - name: - title: Name - type: string - arguments: - title: Arguments - type: string - type: - const: function_call - default: function_call - title: Type - type: string - id: - anyOf: - - type: string - - type: 'null' - title: Id - status: - anyOf: - - type: string - - type: 'null' - title: Status - required: - - call_id - - name - - arguments - title: >- - OpenAIResponseOutputMessageFunctionToolCall - type: object - OpenAIResponseOutputMessageMCPCall: - description: >- - Model Context Protocol (MCP) call output message for OpenAI responses. - - - :param id: Unique identifier for this MCP call - - :param type: Tool call type identifier, always "mcp_call" - - :param arguments: JSON string containing the MCP call arguments - - :param name: Name of the MCP method being called - - :param server_label: Label identifying the MCP server handling the call - - :param error: (Optional) Error message if the MCP call failed - - :param output: (Optional) Output result from the successful MCP call - properties: - id: - title: Id - type: string - type: - const: mcp_call - default: mcp_call - title: Type - type: string - arguments: - title: Arguments - type: string - name: - title: Name - type: string - server_label: - title: Server Label - type: string - error: - anyOf: - - type: string - - type: 'null' - title: Error - output: - anyOf: - - type: string - - type: 'null' - title: Output - required: - - id - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall - type: object - OpenAIResponseOutputMessageMCPListTools: - description: >- - MCP list tools output message containing available tools from an MCP server. - - - :param id: Unique identifier for this MCP list tools operation - - :param type: Tool call type identifier, always "mcp_list_tools" - - :param server_label: Label identifying the MCP server providing the tools - - :param tools: List of available tools provided by the MCP server - properties: - id: - title: Id - type: string - type: - const: mcp_list_tools - default: mcp_list_tools - title: Type - type: string - server_label: - title: Server Label - type: string - tools: - items: - $ref: '#/$defs/MCPListToolsTool' - title: Tools - type: array - required: - - id - - server_label - - tools - title: OpenAIResponseOutputMessageMCPListTools - type: object - "OpenAIResponseOutputMessageWebSearchToolCall": - description: >- - Web search tool call output message for OpenAI responses. - - - :param id: Unique identifier for this tool call - - :param status: Current status of the web search operation - - :param type: Tool call type identifier, always "web_search_call" - properties: - id: - title: Id - type: string - status: - title: Status - type: string - type: - const: web_search_call - default: web_search_call - title: Type - type: string - required: - - id - - status - title: >- - OpenAIResponseOutputMessageWebSearchToolCall - type: object - OpenAIResponseText: - description: >- - Text response configuration for OpenAI responses. - - - :param format: (Optional) Text format configuration specifying output - format requirements - properties: - format: - anyOf: - - $ref: '#/$defs/OpenAIResponseTextFormat' - - type: 'null' - title: OpenAIResponseText - type: object - OpenAIResponseTextFormat: - description: >- - Configuration for Responses API text format. - - - :param type: Must be "text", "json_schema", or "json_object" to identify - the format type - - :param name: The name of the response format. Only used for json_schema. - - :param schema: The JSON schema the response should conform to. In a Python - SDK, this is often a `pydantic` model. Only used for json_schema. - - :param description: (Optional) A description of the response format. Only - used for json_schema. - - :param strict: (Optional) Whether to strictly enforce the JSON schema. - If true, the response must match the schema exactly. Only used for json_schema. - properties: - type: - anyOf: - - const: text - type: string - - const: json_schema - type: string - - const: json_object - type: string - title: Type - name: - anyOf: - - type: string - - type: 'null' - title: Name - schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Schema - description: - anyOf: - - type: string - - type: 'null' - title: Description - strict: - anyOf: - - type: boolean - - type: 'null' - title: Strict - title: OpenAIResponseTextFormat - type: object - OpenAIResponseToolMCP: - description: >- - Model Context Protocol (MCP) tool configuration for OpenAI response object. - - - :param type: Tool type identifier, always "mcp" - - :param server_label: Label to identify this MCP server - - :param allowed_tools: (Optional) Restriction on which tools can be used - from this server - properties: - type: - const: mcp - default: mcp - title: Type - type: string - server_label: - title: Server Label - type: string - allowed_tools: - anyOf: - - items: - type: string - type: array - - $ref: '#/$defs/AllowedToolsFilter' - - type: 'null' - title: Allowed Tools - required: - - server_label - title: OpenAIResponseToolMCP - type: object - OpenAIResponseUsage: - description: >- - Usage information for OpenAI response. - - - :param input_tokens: Number of tokens in the input - - :param output_tokens: Number of tokens in the output - - :param total_tokens: Total tokens used (input + output) - - :param input_tokens_details: Detailed breakdown of input token usage - - :param output_tokens_details: Detailed breakdown of output token usage - properties: - input_tokens: - title: Input Tokens - type: integer - output_tokens: - title: Output Tokens - type: integer - total_tokens: - title: Total Tokens - type: integer - input_tokens_details: - anyOf: - - $ref: >- - #/$defs/OpenAIResponseUsageInputTokensDetails - - type: 'null' - output_tokens_details: - anyOf: - - $ref: >- - #/$defs/OpenAIResponseUsageOutputTokensDetails - - type: 'null' - required: - - input_tokens - - output_tokens - - total_tokens - title: OpenAIResponseUsage - type: object - OpenAIResponseUsageInputTokensDetails: - description: >- - Token details for input tokens in OpenAI response usage. - - - :param cached_tokens: Number of tokens retrieved from cache - properties: - cached_tokens: - anyOf: - - type: integer - - type: 'null' - title: Cached Tokens - title: OpenAIResponseUsageInputTokensDetails - type: object - OpenAIResponseUsageOutputTokensDetails: - description: >- - Token details for output tokens in OpenAI response usage. - - - :param reasoning_tokens: Number of tokens used for reasoning (o1/o3 models) - properties: - reasoning_tokens: - anyOf: - - type: integer - - type: 'null' - title: Reasoning Tokens - title: OpenAIResponseUsageOutputTokensDetails - type: object - SearchRankingOptions: - description: >- - Options for ranking and filtering search results. - - - :param ranker: (Optional) Name of the ranking algorithm to use - - :param score_threshold: (Optional) Minimum relevance score threshold for - results - properties: - ranker: - anyOf: - - type: string - - type: 'null' - title: Ranker - score_threshold: - anyOf: - - type: number - - type: 'null' - default: 0.0 - title: Score Threshold - title: SearchRankingOptions - type: object - description: >- - Complete OpenAI response object containing generation results and metadata. - - - :param created_at: Unix timestamp when the response was created - - :param error: (Optional) Error details if the response generation failed - - :param id: Unique identifier for this response - - :param model: Model identifier used for generation - - :param object: Object type identifier, always "response" - - :param output: List of generated output items (messages, tool calls, etc.) - - :param parallel_tool_calls: Whether tool calls can be executed in parallel - - :param previous_response_id: (Optional) ID of the previous response in a conversation - - :param status: Current status of the response generation - - :param temperature: (Optional) Sampling temperature used for generation - - :param text: Text formatting configuration for the response - - :param top_p: (Optional) Nucleus sampling parameter used for generation - - :param tools: (Optional) An array of tools the model may call while generating - a response. - - :param truncation: (Optional) Truncation strategy applied to the response - - :param usage: (Optional) Token usage information for the response - - :param instructions: (Optional) System message inserted into the model's context - properties: - created_at: - title: Created At - type: integer - error: + content: anyOf: - - $ref: '#/$defs/OpenAIResponseError' - - type: 'null' + - type: string + - items: + $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + type: array + title: Content + nullable: true + name: + title: Name + type: string + nullable: true + tool_calls: + title: Tool Calls + items: + $ref: '#/components/schemas/OpenAIChatCompletionToolCall' + type: array + nullable: true + title: OpenAIAssistantMessageParam + type: object + OpenAIChoice: + description: "A choice from an OpenAI-compatible chat completion response.\n\n:param message: The message from the model\n:param finish_reason: The reason the model stopped generating\n:param index: The index of the choice\n:param logprobs: (Optional) The log probabilities for the tokens in the message" + properties: + message: + discriminator: + mapping: + assistant: '#/$defs/OpenAIAssistantMessageParam' + developer: '#/$defs/OpenAIDeveloperMessageParam' + system: '#/$defs/OpenAISystemMessageParam' + tool: '#/$defs/OpenAIToolMessageParam' + user: '#/$defs/OpenAIUserMessageParam' + propertyName: role + oneOf: + - $ref: '#/components/schemas/OpenAIUserMessageParam' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: Message + finish_reason: + title: Finish Reason + type: string + index: + title: Index + type: integer + logprobs: + $ref: '#/components/schemas/OpenAIChoiceLogprobs' + nullable: true + required: + - message + - finish_reason + - index + title: OpenAIChoice + type: object + OpenAIChoiceLogprobs: + description: "The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response.\n\n:param content: (Optional) The log probabilities for the tokens in the message\n:param refusal: (Optional) The log probabilities for the tokens in the message" + properties: + content: + title: Content + items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + nullable: true + refusal: + title: Refusal + items: + $ref: '#/components/schemas/OpenAITokenLogProb' + type: array + nullable: true + title: OpenAIChoiceLogprobs + type: object + OpenAICompletionWithInputMessages: + properties: id: title: Id type: string + choices: + items: + $ref: '#/components/schemas/OpenAIChoice' + title: Choices + type: array + object: + const: chat.completion + default: chat.completion + title: Object + type: string + created: + title: Created + type: integer model: title: Model type: string - object: - const: response - default: response - title: Object - type: string - output: + usage: + $ref: '#/components/schemas/OpenAIChatCompletionUsage' + nullable: true + input_messages: items: discriminator: mapping: - file_search_call: >- - #/$defs/OpenAIResponseOutputMessageFileSearchToolCall - function_call: >- - #/$defs/OpenAIResponseOutputMessageFunctionToolCall - mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest' - mcp_call: >- - #/$defs/OpenAIResponseOutputMessageMCPCall - mcp_list_tools: >- - #/$defs/OpenAIResponseOutputMessageMCPListTools - message: '#/$defs/OpenAIResponseMessage' - web_search_call: >- - #/$defs/OpenAIResponseOutputMessageWebSearchToolCall - propertyName: type + assistant: '#/$defs/OpenAIAssistantMessageParam' + developer: '#/$defs/OpenAIDeveloperMessageParam' + system: '#/$defs/OpenAISystemMessageParam' + tool: '#/$defs/OpenAIToolMessageParam' + user: '#/$defs/OpenAIUserMessageParam' + propertyName: role oneOf: - - $ref: '#/$defs/OpenAIResponseMessage' - - $ref: >- - #/$defs/OpenAIResponseOutputMessageWebSearchToolCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageFileSearchToolCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageFunctionToolCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageMCPCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageMCPListTools - - $ref: '#/$defs/OpenAIResponseMCPApprovalRequest' - title: Output + - $ref: '#/components/schemas/OpenAIUserMessageParam' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: Input Messages type: array - parallel_tool_calls: - default: false - title: Parallel Tool Calls - type: boolean - previous_response_id: - type: string - description: >- - (Optional) ID of the previous response in a conversation - prompt: - $ref: '#/components/schemas/OpenAIResponsePrompt' - description: >- - (Optional) Reference to a prompt template and its variables. - status: - title: Status - type: string - temperature: - anyOf: - - type: number - - type: 'null' - title: Temperature - text: - $ref: '#/$defs/OpenAIResponseText' - default: - format: - type: text - top_p: - anyOf: - - type: number - - type: 'null' - title: Top P - tools: - anyOf: - - items: - discriminator: - mapping: - file_search: >- - #/$defs/OpenAIResponseInputToolFileSearch - function: '#/$defs/OpenAIResponseInputToolFunction' - mcp: '#/$defs/OpenAIResponseToolMCP' - web_search: '#/$defs/OpenAIResponseInputToolWebSearch' - web_search_preview: '#/$defs/OpenAIResponseInputToolWebSearch' - web_search_preview_2025_03_11: '#/$defs/OpenAIResponseInputToolWebSearch' - propertyName: type - oneOf: - - $ref: '#/$defs/OpenAIResponseInputToolWebSearch' - - $ref: >- - #/$defs/OpenAIResponseInputToolFileSearch - - $ref: '#/$defs/OpenAIResponseInputToolFunction' - - $ref: '#/$defs/OpenAIResponseToolMCP' - type: array - - type: 'null' - title: Tools - truncation: - anyOf: - - type: string - - type: 'null' - title: Truncation - usage: - anyOf: - - $ref: '#/$defs/OpenAIResponseUsage' - - type: 'null' - instructions: - anyOf: - - type: string - - type: 'null' - title: Instructions required: - - created_at - - id - - model - - output - - status - title: OpenAIResponseObject + - id + - choices + - created + - model + - input_messages + title: OpenAICompletionWithInputMessages type: object - AsyncIterator: - type: object - OpenAIDeleteResponseObject: - description: >- - Response object confirming deletion of an OpenAI response. - - - :param id: Unique identifier of the deleted response - - :param object: Object type identifier, always "response" - - :param deleted: Deletion confirmation flag, always True + OpenAIUserMessageParam: + description: "A message from the user in an OpenAI-compatible chat completion request.\n\n:param role: Must be \"user\" to identify this as a user message\n:param content: The content of the message, which can include text and other media\n:param name: (Optional) The name of the user message participant." properties: - id: - title: Id + role: + const: user + default: user + title: Role type: string - object: - const: response - default: response - title: Object - type: string - deleted: - default: true - title: Deleted - type: boolean - required: - - id - title: OpenAIDeleteResponseObject - type: object - ListOpenAIResponseInputItem: - $defs: - MCPListToolsTool: - description: >- - Tool definition returned by MCP list tools operation. - - - :param input_schema: JSON schema defining the tool's input parameters - - :param name: Name of the tool - - :param description: (Optional) Description of what the tool does - properties: - input_schema: - additionalProperties: true - title: Input Schema - type: object - name: - title: Name - type: string - description: - anyOf: - - type: string - - type: 'null' - title: Description - required: - - input_schema - - name - title: MCPListToolsTool - type: object - OpenAIResponseAnnotationCitation: - description: >- - URL citation annotation for referencing external web resources. - - - :param type: Annotation type identifier, always "url_citation" - - :param end_index: End position of the citation span in the content - - :param start_index: Start position of the citation span in the content - - :param title: Title of the referenced web resource - - :param url: URL of the referenced web resource - properties: - type: - const: url_citation - default: url_citation - title: Type - type: string - end_index: - title: End Index - type: integer - start_index: - title: Start Index - type: integer - title: - title: Title - type: string - url: - title: Url - type: string - required: - - end_index - - start_index - - title - - url - title: OpenAIResponseAnnotationCitation - type: object - "OpenAIResponseAnnotationContainerFileCitation": - properties: - type: - const: container_file_citation - default: container_file_citation - title: Type - type: string - container_id: - title: Container Id - type: string - end_index: - title: End Index - type: integer - file_id: - title: File Id - type: string - filename: - title: Filename - type: string - start_index: - title: Start Index - type: integer - required: - - container_id - - end_index - - file_id - - filename - - start_index - title: >- - OpenAIResponseAnnotationContainerFileCitation - type: object - OpenAIResponseAnnotationFileCitation: - description: >- - File citation annotation for referencing specific files in response content. - - - :param type: Annotation type identifier, always "file_citation" - - :param file_id: Unique identifier of the referenced file - - :param filename: Name of the referenced file - - :param index: Position index of the citation within the content - properties: - type: - const: file_citation - default: file_citation - title: Type - type: string - file_id: - title: File Id - type: string - filename: - title: Filename - type: string - index: - title: Index - type: integer - required: - - file_id - - filename - - index - title: OpenAIResponseAnnotationFileCitation - type: object - OpenAIResponseAnnotationFilePath: - properties: - type: - const: file_path - default: file_path - title: Type - type: string - file_id: - title: File Id - type: string - index: - title: Index - type: integer - required: - - file_id - - index - title: OpenAIResponseAnnotationFilePath - type: object - OpenAIResponseContentPartRefusal: - description: >- - Refusal content within a streamed response part. - - - :param type: Content part type identifier, always "refusal" - - :param refusal: Refusal text supplied by the model - properties: - type: - const: refusal - default: refusal - title: Type - type: string - refusal: - title: Refusal - type: string - required: - - refusal - title: OpenAIResponseContentPartRefusal - type: object - "OpenAIResponseInputFunctionToolCallOutput": - description: >- - This represents the output of a function call that gets passed back to - the model. - properties: - call_id: - title: Call Id - type: string - output: - title: Output - type: string - type: - const: function_call_output - default: function_call_output - title: Type - type: string - id: - anyOf: - - type: string - - type: 'null' - title: Id - status: - anyOf: - - type: string - - type: 'null' - title: Status - required: - - call_id - - output - title: >- - OpenAIResponseInputFunctionToolCallOutput - type: object - OpenAIResponseInputMessageContentImage: - description: >- - Image content for input messages in OpenAI response format. - - - :param detail: Level of detail for image processing, can be "low", "high", - or "auto" - - :param type: Content type identifier, always "input_image" - - :param image_url: (Optional) URL of the image content - properties: - detail: - anyOf: - - const: low - type: string - - const: high - type: string - - const: auto - type: string - default: auto - title: Detail - type: - const: input_image - default: input_image - title: Type - type: string - image_url: - anyOf: - - type: string - - type: 'null' - title: Image Url - title: OpenAIResponseInputMessageContentImage - type: object - OpenAIResponseInputMessageContentText: - description: >- - Text content for input messages in OpenAI response format. - - - :param text: The text content of the input message - - :param type: Content type identifier, always "input_text" - properties: - text: - title: Text - type: string - type: - const: input_text - default: input_text - title: Type - type: string - required: - - text - title: OpenAIResponseInputMessageContentText - type: object - OpenAIResponseMCPApprovalRequest: - description: >- - A request for human approval of a tool invocation. - properties: - arguments: - title: Arguments - type: string - id: - title: Id - type: string - name: - title: Name - type: string - server_label: - title: Server Label - type: string - type: - const: mcp_approval_request - default: mcp_approval_request - title: Type - type: string - required: - - arguments - - id - - name - - server_label - title: OpenAIResponseMCPApprovalRequest - type: object - OpenAIResponseMCPApprovalResponse: - description: A response to an MCP approval request. - properties: - approval_request_id: - title: Approval Request Id - type: string - approve: - title: Approve - type: boolean - type: - const: mcp_approval_response - default: mcp_approval_response - title: Type - type: string - id: - anyOf: - - type: string - - type: 'null' - title: Id - reason: - anyOf: - - type: string - - type: 'null' - title: Reason - required: - - approval_request_id - - approve - title: OpenAIResponseMCPApprovalResponse - type: object - OpenAIResponseMessage: - description: >- - Corresponds to the various Message types in the Responses API. - - They are all under one type because the Responses API gives them all - - the same "type" value, and there is no way to tell them apart in certain - - scenarios. - properties: - content: - anyOf: - - type: string - - items: - discriminator: - mapping: - input_image: >- - #/$defs/OpenAIResponseInputMessageContentImage - input_text: >- - #/$defs/OpenAIResponseInputMessageContentText - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIResponseInputMessageContentText - - $ref: >- - #/$defs/OpenAIResponseInputMessageContentImage - type: array - - items: - discriminator: - mapping: - output_text: >- - #/$defs/OpenAIResponseOutputMessageContentOutputText - refusal: '#/$defs/OpenAIResponseContentPartRefusal' - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIResponseOutputMessageContentOutputText - - $ref: '#/$defs/OpenAIResponseContentPartRefusal' - type: array - title: Content - role: - anyOf: - - const: system - type: string - - const: developer - type: string - - const: user - type: string - - const: assistant - type: string - title: Role - type: - const: message - default: message - title: Type - type: string - id: - anyOf: - - type: string - - type: 'null' - title: Id - status: - anyOf: - - type: string - - type: 'null' - title: Status - required: - - content - - role - title: OpenAIResponseMessage - type: object - "OpenAIResponseOutputMessageContentOutputText": - properties: - text: - title: Text - type: string - type: - const: output_text - default: output_text - title: Type - type: string - annotations: - items: - discriminator: - mapping: - container_file_citation: >- - #/$defs/OpenAIResponseAnnotationContainerFileCitation - file_citation: >- - #/$defs/OpenAIResponseAnnotationFileCitation - file_path: '#/$defs/OpenAIResponseAnnotationFilePath' - url_citation: '#/$defs/OpenAIResponseAnnotationCitation' - propertyName: type - oneOf: - - $ref: >- - #/$defs/OpenAIResponseAnnotationFileCitation - - $ref: '#/$defs/OpenAIResponseAnnotationCitation' - - $ref: >- - #/$defs/OpenAIResponseAnnotationContainerFileCitation - - $ref: '#/$defs/OpenAIResponseAnnotationFilePath' - title: Annotations - type: array - required: - - text - title: >- - OpenAIResponseOutputMessageContentOutputText - type: object - "OpenAIResponseOutputMessageFileSearchToolCall": - description: >- - File search tool call output message for OpenAI responses. - - - :param id: Unique identifier for this tool call - - :param queries: List of search queries executed - - :param status: Current status of the file search operation - - :param type: Tool call type identifier, always "file_search_call" - - :param results: (Optional) Search results returned by the file search - operation - properties: - id: - title: Id - type: string - queries: - items: - type: string - title: Queries - type: array - status: - title: Status - type: string - type: - const: file_search_call - default: file_search_call - title: Type - type: string - results: - anyOf: - - items: - $ref: >- - #/$defs/OpenAIResponseOutputMessageFileSearchToolCallResults - type: array - - type: 'null' - title: Results - required: - - id - - queries - - status - title: >- - OpenAIResponseOutputMessageFileSearchToolCall - type: object - "OpenAIResponseOutputMessageFileSearchToolCallResults": - description: >- - Search results returned by the file search operation. - - - :param attributes: (Optional) Key-value attributes associated with the - file - - :param file_id: Unique identifier of the file containing the result - - :param filename: Name of the file containing the result - - :param score: Relevance score for this search result (between 0 and 1) - - :param text: Text content of the search result - properties: - attributes: - additionalProperties: true - title: Attributes - type: object - file_id: - title: File Id - type: string - filename: - title: Filename - type: string - score: - title: Score - type: number - text: - title: Text - type: string - required: - - attributes - - file_id - - filename - - score - - text - title: >- - OpenAIResponseOutputMessageFileSearchToolCallResults - type: object - "OpenAIResponseOutputMessageFunctionToolCall": - description: >- - Function tool call output message for OpenAI responses. - - - :param call_id: Unique identifier for the function call - - :param name: Name of the function being called - - :param arguments: JSON string containing the function arguments - - :param type: Tool call type identifier, always "function_call" - - :param id: (Optional) Additional identifier for the tool call - - :param status: (Optional) Current status of the function call execution - properties: - call_id: - title: Call Id - type: string - name: - title: Name - type: string - arguments: - title: Arguments - type: string - type: - const: function_call - default: function_call - title: Type - type: string - id: - anyOf: - - type: string - - type: 'null' - title: Id - status: - anyOf: - - type: string - - type: 'null' - title: Status - required: - - call_id - - name - - arguments - title: >- - OpenAIResponseOutputMessageFunctionToolCall - type: object - OpenAIResponseOutputMessageMCPCall: - description: >- - Model Context Protocol (MCP) call output message for OpenAI responses. - - - :param id: Unique identifier for this MCP call - - :param type: Tool call type identifier, always "mcp_call" - - :param arguments: JSON string containing the MCP call arguments - - :param name: Name of the MCP method being called - - :param server_label: Label identifying the MCP server handling the call - - :param error: (Optional) Error message if the MCP call failed - - :param output: (Optional) Output result from the successful MCP call - properties: - id: - title: Id - type: string - type: - const: mcp_call - default: mcp_call - title: Type - type: string - arguments: - title: Arguments - type: string - name: - title: Name - type: string - server_label: - title: Server Label - type: string - error: - anyOf: - - type: string - - type: 'null' - title: Error - output: - anyOf: - - type: string - - type: 'null' - title: Output - required: - - id - - arguments - - name - - server_label - title: OpenAIResponseOutputMessageMCPCall - type: object - OpenAIResponseOutputMessageMCPListTools: - description: >- - MCP list tools output message containing available tools from an MCP server. - - - :param id: Unique identifier for this MCP list tools operation - - :param type: Tool call type identifier, always "mcp_list_tools" - - :param server_label: Label identifying the MCP server providing the tools - - :param tools: List of available tools provided by the MCP server - properties: - id: - title: Id - type: string - type: - const: mcp_list_tools - default: mcp_list_tools - title: Type - type: string - server_label: - title: Server Label - type: string - tools: - items: - $ref: '#/$defs/MCPListToolsTool' - title: Tools - type: array - required: - - id - - server_label - - tools - title: OpenAIResponseOutputMessageMCPListTools - type: object - "OpenAIResponseOutputMessageWebSearchToolCall": - description: >- - Web search tool call output message for OpenAI responses. - - - :param id: Unique identifier for this tool call - - :param status: Current status of the web search operation - - :param type: Tool call type identifier, always "web_search_call" - properties: - id: - title: Id - type: string - status: - title: Status - type: string - type: - const: web_search_call - default: web_search_call - title: Type - type: string - required: - - id - - status - title: >- - OpenAIResponseOutputMessageWebSearchToolCall - type: object - description: >- - List container for OpenAI response input items. - - - :param data: List of input items - - :param object: Object type identifier, always "list" - properties: - data: - items: - anyOf: - - discriminator: - mapping: - file_search_call: >- - #/$defs/OpenAIResponseOutputMessageFileSearchToolCall - function_call: >- - #/$defs/OpenAIResponseOutputMessageFunctionToolCall - mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest' - mcp_call: >- - #/$defs/OpenAIResponseOutputMessageMCPCall - mcp_list_tools: >- - #/$defs/OpenAIResponseOutputMessageMCPListTools - message: '#/$defs/OpenAIResponseMessage' - web_search_call: >- - #/$defs/OpenAIResponseOutputMessageWebSearchToolCall - propertyName: type - oneOf: - - $ref: '#/$defs/OpenAIResponseMessage' - - $ref: >- - #/$defs/OpenAIResponseOutputMessageWebSearchToolCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageFileSearchToolCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageFunctionToolCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageMCPCall - - $ref: >- - #/$defs/OpenAIResponseOutputMessageMCPListTools - - $ref: '#/$defs/OpenAIResponseMCPApprovalRequest' - - $ref: >- - #/$defs/OpenAIResponseInputFunctionToolCallOutput - - $ref: >- - #/$defs/OpenAIResponseMCPApprovalResponse - - $ref: '#/$defs/OpenAIResponseMessage' - title: Data - type: array - object: - const: list - default: list - title: Object - type: string - required: - - data - title: ListOpenAIResponseInputItem - type: object - RunShieldRequest: - type: object - RunShieldResponse: - $defs: - SafetyViolation: - description: >- - Details of a safety violation detected by content moderation. - - - :param violation_level: Severity level of the violation - - :param user_message: (Optional) Message to convey to the user about the - violation - - :param metadata: Additional metadata including specific violation codes - for debugging and telemetry - properties: - violation_level: - $ref: '#/$defs/ViolationLevel' - user_message: - anyOf: - - type: string - - type: 'null' - title: User Message - metadata: - additionalProperties: true - title: Metadata - type: object - required: - - violation_level - title: SafetyViolation - type: object - ViolationLevel: - description: >- - Severity level of a safety violation. - - - :cvar INFO: Informational level violation that does not require action - - :cvar WARN: Warning level violation that suggests caution but allows continuation - - :cvar ERROR: Error level violation that requires blocking or intervention - enum: - - info - - warn - - error - title: ViolationLevel - type: string - description: >- - Response from running a safety shield. - - - :param violation: (Optional) Safety violation detected by the shield, if any - properties: - violation: + content: anyOf: - - $ref: '#/$defs/SafetyViolation' - - type: 'null' - title: RunShieldResponse - type: object - ListScoringFunctionsResponse: - $defs: - AgentTurnInputType: - description: >- - Parameter type for agent turn input. - - - :param type: Discriminator type. Always "agent_turn_input" - properties: - type: - const: agent_turn_input - default: agent_turn_input - title: Type - type: string - title: AgentTurnInputType - type: object - AggregationFunctionType: - description: >- - Types of aggregation functions for scoring results. - - :cvar average: Calculate the arithmetic mean of scores - - :cvar weighted_average: Calculate a weighted average of scores - - :cvar median: Calculate the median value of scores - - :cvar categorical_count: Count occurrences of categorical values - - :cvar accuracy: Calculate accuracy as the proportion of correct answers - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType - type: string - ArrayType: - description: >- - Parameter type for array values. - - - :param type: Discriminator type. Always "array" - properties: - type: - const: array - default: array - title: Type - type: string - title: ArrayType - type: object - BasicScoringFnParams: - description: >- - Parameters for basic scoring function configuration. - - :param type: The type of scoring function parameters, always basic - - :param aggregation_functions: Aggregation functions to apply to the scores - of each row - properties: - type: - const: basic - default: basic - title: Type - type: string - aggregation_functions: - description: >- - Aggregation functions to apply to the scores of each row - items: - $ref: '#/$defs/AggregationFunctionType' - title: Aggregation Functions - type: array - title: BasicScoringFnParams - type: object - BooleanType: - description: >- - Parameter type for boolean values. - - - :param type: Discriminator type. Always "boolean" - properties: - type: - const: boolean - default: boolean - title: Type - type: string - title: BooleanType - type: object - ChatCompletionInputType: - description: >- - Parameter type for chat completion input. - - - :param type: Discriminator type. Always "chat_completion_input" - properties: - type: - const: chat_completion_input - default: chat_completion_input - title: Type - type: string - title: ChatCompletionInputType - type: object - CompletionInputType: - description: >- - Parameter type for completion input. - - - :param type: Discriminator type. Always "completion_input" - properties: - type: - const: completion_input - default: completion_input - title: Type - type: string - title: CompletionInputType - type: object - JsonType: - description: >- - Parameter type for JSON values. - - - :param type: Discriminator type. Always "json" - properties: - type: - const: json - default: json - title: Type - type: string - title: JsonType - type: object - LLMAsJudgeScoringFnParams: - description: >- - Parameters for LLM-as-judge scoring function configuration. - - :param type: The type of scoring function parameters, always llm_as_judge - - :param judge_model: Identifier of the LLM model to use as a judge for - scoring - - :param prompt_template: (Optional) Custom prompt template for the judge - model - - :param judge_score_regexes: Regexes to extract the answer from generated - response - - :param aggregation_functions: Aggregation functions to apply to the scores - of each row - properties: - type: - const: llm_as_judge - default: llm_as_judge - title: Type - type: string - judge_model: - title: Judge Model - type: string - prompt_template: - anyOf: - - type: string - - type: 'null' - title: Prompt Template - judge_score_regexes: - description: >- - Regexes to extract the answer from generated response - items: - type: string - title: Judge Score Regexes - type: array - aggregation_functions: - description: >- - Aggregation functions to apply to the scores of each row - items: - $ref: '#/$defs/AggregationFunctionType' - title: Aggregation Functions - type: array - required: - - judge_model - title: LLMAsJudgeScoringFnParams - type: object - NumberType: - description: >- - Parameter type for numeric values. - - - :param type: Discriminator type. Always "number" - properties: - type: - const: number - default: number - title: Type - type: string - title: NumberType - type: object - ObjectType: - description: >- - Parameter type for object values. - - - :param type: Discriminator type. Always "object" - properties: - type: - const: object - default: object - title: Type - type: string - title: ObjectType - type: object - RegexParserScoringFnParams: - description: >- - Parameters for regex parser scoring function configuration. - - :param type: The type of scoring function parameters, always regex_parser - - :param parsing_regexes: Regex to extract the answer from generated response - - :param aggregation_functions: Aggregation functions to apply to the scores - of each row - properties: - type: - const: regex_parser - default: regex_parser - title: Type - type: string - parsing_regexes: - description: >- - Regex to extract the answer from generated response - items: - type: string - title: Parsing Regexes - type: array - aggregation_functions: - description: >- - Aggregation functions to apply to the scores of each row - items: - $ref: '#/$defs/AggregationFunctionType' - title: Aggregation Functions - type: array - title: RegexParserScoringFnParams - type: object - ScoringFn: - description: >- - A scoring function resource for evaluating model outputs. - - :param type: The resource type, always scoring_function - properties: - identifier: - description: >- - Unique identifier for this resource in llama stack - title: Identifier - type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: >- - Unique identifier for this resource in the provider - title: Provider Resource Id - provider_id: - description: >- - ID of the provider that owns this resource - title: Provider Id - type: string - type: - const: scoring_function - default: scoring_function - title: Type - type: string - description: - anyOf: - - type: string - - type: 'null' - title: Description - metadata: - additionalProperties: true - description: >- - Any additional metadata for this definition - title: Metadata - type: object - return_type: - description: >- - The return type of the deterministic function + - type: string + - items: discriminator: mapping: - agent_turn_input: '#/$defs/AgentTurnInputType' - array: '#/$defs/ArrayType' - boolean: '#/$defs/BooleanType' - chat_completion_input: '#/$defs/ChatCompletionInputType' - completion_input: '#/$defs/CompletionInputType' - json: '#/$defs/JsonType' - number: '#/$defs/NumberType' - object: '#/$defs/ObjectType' - string: '#/$defs/StringType' - union: '#/$defs/UnionType' + file: '#/$defs/OpenAIFile' + image_url: '#/$defs/OpenAIChatCompletionContentPartImageParam' + text: '#/$defs/OpenAIChatCompletionContentPartTextParam' propertyName: type oneOf: - - $ref: '#/$defs/StringType' - - $ref: '#/$defs/NumberType' - - $ref: '#/$defs/BooleanType' - - $ref: '#/$defs/ArrayType' - - $ref: '#/$defs/ObjectType' - - $ref: '#/$defs/JsonType' - - $ref: '#/$defs/UnionType' - - $ref: '#/$defs/ChatCompletionInputType' - - $ref: '#/$defs/CompletionInputType' - - $ref: '#/$defs/AgentTurnInputType' - title: Return Type - params: - anyOf: - - discriminator: - mapping: - basic: '#/$defs/BasicScoringFnParams' - llm_as_judge: '#/$defs/LLMAsJudgeScoringFnParams' - regex_parser: '#/$defs/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/$defs/LLMAsJudgeScoringFnParams' - - $ref: '#/$defs/RegexParserScoringFnParams' - - $ref: '#/$defs/BasicScoringFnParams' - - type: 'null' - description: >- - The parameters for the scoring function for benchmark eval, these - can be overridden for app eval - title: Params - required: - - identifier - - provider_id - - return_type - title: ScoringFn - type: object - StringType: - description: >- - Parameter type for string values. - - - :param type: Discriminator type. Always "string" - properties: - type: - const: string - default: string - title: Type - type: string - title: StringType - type: object - UnionType: - description: >- - Parameter type for union values. - - - :param type: Discriminator type. Always "union" - properties: - type: - const: union - default: union - title: Type - type: string - title: UnionType - type: object - properties: - data: - items: - $ref: '#/$defs/ScoringFn' - title: Data - type: array - required: - - data - title: ListScoringFunctionsResponse - type: object - RegisterScoringFunctionRequest: - type: object - ScoringFn: - $defs: - AgentTurnInputType: - description: >- - Parameter type for agent turn input. - - - :param type: Discriminator type. Always "agent_turn_input" - properties: - type: - const: agent_turn_input - default: agent_turn_input - title: Type - type: string - title: AgentTurnInputType - type: object - AggregationFunctionType: - description: >- - Types of aggregation functions for scoring results. - - :cvar average: Calculate the arithmetic mean of scores - - :cvar weighted_average: Calculate a weighted average of scores - - :cvar median: Calculate the median value of scores - - :cvar categorical_count: Count occurrences of categorical values - - :cvar accuracy: Calculate accuracy as the proportion of correct answers - enum: - - average - - weighted_average - - median - - categorical_count - - accuracy - title: AggregationFunctionType + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartTextParam' + - $ref: '#/components/schemas/OpenAIChatCompletionContentPartImageParam' + - $ref: '#/components/schemas/OpenAIFile' + type: array + title: Content + name: + title: Name type: string - ArrayType: - description: >- - Parameter type for array values. - - - :param type: Discriminator type. Always "array" - properties: - type: - const: array - default: array - title: Type - type: string - title: ArrayType - type: object - BasicScoringFnParams: - description: >- - Parameters for basic scoring function configuration. - - :param type: The type of scoring function parameters, always basic - - :param aggregation_functions: Aggregation functions to apply to the scores - of each row - properties: - type: - const: basic - default: basic - title: Type - type: string - aggregation_functions: - description: >- - Aggregation functions to apply to the scores of each row - items: - $ref: '#/$defs/AggregationFunctionType' - title: Aggregation Functions - type: array - title: BasicScoringFnParams - type: object - BooleanType: - description: >- - Parameter type for boolean values. - - - :param type: Discriminator type. Always "boolean" - properties: - type: - const: boolean - default: boolean - title: Type - type: string - title: BooleanType - type: object - ChatCompletionInputType: - description: >- - Parameter type for chat completion input. - - - :param type: Discriminator type. Always "chat_completion_input" - properties: - type: - const: chat_completion_input - default: chat_completion_input - title: Type - type: string - title: ChatCompletionInputType - type: object - CompletionInputType: - description: >- - Parameter type for completion input. - - - :param type: Discriminator type. Always "completion_input" - properties: - type: - const: completion_input - default: completion_input - title: Type - type: string - title: CompletionInputType - type: object - JsonType: - description: >- - Parameter type for JSON values. - - - :param type: Discriminator type. Always "json" - properties: - type: - const: json - default: json - title: Type - type: string - title: JsonType - type: object - LLMAsJudgeScoringFnParams: - description: >- - Parameters for LLM-as-judge scoring function configuration. - - :param type: The type of scoring function parameters, always llm_as_judge - - :param judge_model: Identifier of the LLM model to use as a judge for - scoring - - :param prompt_template: (Optional) Custom prompt template for the judge - model - - :param judge_score_regexes: Regexes to extract the answer from generated - response - - :param aggregation_functions: Aggregation functions to apply to the scores - of each row - properties: - type: - const: llm_as_judge - default: llm_as_judge - title: Type - type: string - judge_model: - title: Judge Model - type: string - prompt_template: - anyOf: - - type: string - - type: 'null' - title: Prompt Template - judge_score_regexes: - description: >- - Regexes to extract the answer from generated response - items: - type: string - title: Judge Score Regexes - type: array - aggregation_functions: - description: >- - Aggregation functions to apply to the scores of each row - items: - $ref: '#/$defs/AggregationFunctionType' - title: Aggregation Functions - type: array - required: - - judge_model - title: LLMAsJudgeScoringFnParams - type: object - NumberType: - description: >- - Parameter type for numeric values. - - - :param type: Discriminator type. Always "number" - properties: - type: - const: number - default: number - title: Type - type: string - title: NumberType - type: object - ObjectType: - description: >- - Parameter type for object values. - - - :param type: Discriminator type. Always "object" - properties: - type: - const: object - default: object - title: Type - type: string - title: ObjectType - type: object - RegexParserScoringFnParams: - description: >- - Parameters for regex parser scoring function configuration. - - :param type: The type of scoring function parameters, always regex_parser - - :param parsing_regexes: Regex to extract the answer from generated response - - :param aggregation_functions: Aggregation functions to apply to the scores - of each row - properties: - type: - const: regex_parser - default: regex_parser - title: Type - type: string - parsing_regexes: - description: >- - Regex to extract the answer from generated response - items: - type: string - title: Parsing Regexes - type: array - aggregation_functions: - description: >- - Aggregation functions to apply to the scores of each row - items: - $ref: '#/$defs/AggregationFunctionType' - title: Aggregation Functions - type: array - title: RegexParserScoringFnParams - type: object - StringType: - description: >- - Parameter type for string values. - - - :param type: Discriminator type. Always "string" - properties: - type: - const: string - default: string - title: Type - type: string - title: StringType - type: object - UnionType: - description: >- - Parameter type for union values. - - - :param type: Discriminator type. Always "union" - properties: - type: - const: union - default: union - title: Type - type: string - title: UnionType - type: object - description: >- - A scoring function resource for evaluating model outputs. - - :param type: The resource type, always scoring_function + nullable: true + required: + - content + title: OpenAIUserMessageParam + type: object + Checkpoint: + description: "Checkpoint created during training runs.\n\n:param identifier: Unique identifier for the checkpoint\n:param created_at: Timestamp when the checkpoint was created\n:param epoch: Training epoch when the checkpoint was saved\n:param post_training_job_id: Identifier of the training job that created this checkpoint\n:param path: File system path where the checkpoint is stored\n:param training_metrics: (Optional) Training metrics associated with this checkpoint" properties: identifier: - description: >- - Unique identifier for this resource in llama stack + title: Identifier + type: string + created_at: + format: date-time + title: Created At + type: string + epoch: + title: Epoch + type: integer + post_training_job_id: + title: Post Training Job Id + type: string + path: + title: Path + type: string + training_metrics: + $ref: '#/components/schemas/PostTrainingMetric' + nullable: true + required: + - identifier + - created_at + - epoch + - post_training_job_id + - path + title: Checkpoint + type: object + PostTrainingJobArtifactsResponse: + description: "Artifacts of a finetuning job.\n\n:param job_uuid: Unique identifier for the training job\n:param checkpoints: List of model checkpoints created during training" + properties: + job_uuid: + title: Job Uuid + type: string + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array + required: + - job_uuid + title: PostTrainingJobArtifactsResponse + type: object + PostTrainingJobStatusResponse: + description: "Status of a finetuning job.\n\n:param job_uuid: Unique identifier for the training job\n:param status: Current status of the training job\n:param scheduled_at: (Optional) Timestamp when the job was scheduled\n:param started_at: (Optional) Timestamp when the job execution began\n:param completed_at: (Optional) Timestamp when the job finished, if completed\n:param resources_allocated: (Optional) Information about computational resources allocated to the job\n:param checkpoints: List of model checkpoints created during training" + properties: + job_uuid: + title: Job Uuid + type: string + status: + $ref: '#/components/schemas/JobStatus' + scheduled_at: + title: Scheduled At + format: date-time + type: string + nullable: true + started_at: + title: Started At + format: date-time + type: string + nullable: true + completed_at: + title: Completed At + format: date-time + type: string + nullable: true + resources_allocated: + title: Resources Allocated + additionalProperties: true + type: object + nullable: true + checkpoints: + items: + $ref: '#/components/schemas/Checkpoint' + title: Checkpoints + type: array + required: + - job_uuid + - status + title: PostTrainingJobStatusResponse + type: object + ScoringFn: + description: "A scoring function resource for evaluating model outputs.\n:param type: The resource type, always scoring_function" + properties: + identifier: + description: Unique identifier for this resource in llama stack title: Identifier type: string provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: >- - Unique identifier for this resource in the provider + description: Unique identifier for this resource in the provider title: Provider Resource Id + type: string + nullable: true provider_id: - description: >- - ID of the provider that owns this resource + description: ID of the provider that owns this resource title: Provider Id type: string type: @@ -13456,19 +15705,16 @@ components: title: Type type: string description: - anyOf: - - type: string - - type: 'null' title: Description + type: string + nullable: true metadata: additionalProperties: true - description: >- - Any additional metadata for this definition + description: Any additional metadata for this definition title: Metadata type: object return_type: - description: >- - The return type of the deterministic function + description: The return type of the deterministic function discriminator: mapping: agent_turn_input: '#/$defs/AgentTurnInputType' @@ -13483,38 +15729,35 @@ components: union: '#/$defs/UnionType' propertyName: type oneOf: - - $ref: '#/$defs/StringType' - - $ref: '#/$defs/NumberType' - - $ref: '#/$defs/BooleanType' - - $ref: '#/$defs/ArrayType' - - $ref: '#/$defs/ObjectType' - - $ref: '#/$defs/JsonType' - - $ref: '#/$defs/UnionType' - - $ref: '#/$defs/ChatCompletionInputType' - - $ref: '#/$defs/CompletionInputType' - - $ref: '#/$defs/AgentTurnInputType' + - $ref: '#/components/schemas/StringType' + - $ref: '#/components/schemas/NumberType' + - $ref: '#/components/schemas/BooleanType' + - $ref: '#/components/schemas/ArrayType' + - $ref: '#/components/schemas/ObjectType' + - $ref: '#/components/schemas/JsonType' + - $ref: '#/components/schemas/UnionType' + - $ref: '#/components/schemas/ChatCompletionInputType' + - $ref: '#/components/schemas/CompletionInputType' + - $ref: '#/components/schemas/AgentTurnInputType' title: Return Type params: - anyOf: - - discriminator: - mapping: - basic: '#/$defs/BasicScoringFnParams' - llm_as_judge: '#/$defs/LLMAsJudgeScoringFnParams' - regex_parser: '#/$defs/RegexParserScoringFnParams' - propertyName: type - oneOf: - - $ref: '#/$defs/LLMAsJudgeScoringFnParams' - - $ref: '#/$defs/RegexParserScoringFnParams' - - $ref: '#/$defs/BasicScoringFnParams' - - type: 'null' - description: >- - The parameters for the scoring function for benchmark eval, these can - be overridden for app eval + description: The parameters for the scoring function for benchmark eval, these can be overridden for app eval title: Params + discriminator: + mapping: + basic: '#/$defs/BasicScoringFnParams' + llm_as_judge: '#/$defs/LLMAsJudgeScoringFnParams' + regex_parser: '#/$defs/RegexParserScoringFnParams' + propertyName: type + oneOf: + - $ref: '#/components/schemas/LLMAsJudgeScoringFnParams' + - $ref: '#/components/schemas/RegexParserScoringFnParams' + - $ref: '#/components/schemas/BasicScoringFnParams' + nullable: true required: - - identifier - - provider_id - - return_type + - identifier + - provider_id + - return_type title: ScoringFn type: object ScoreRequest: @@ -14241,1005 +16484,19 @@ components: title: URL type: object ListToolDefsResponse: - $defs: - ToolDef: - description: >- - Tool definition used in runtime contexts. - - - :param name: Name of the tool - - :param description: (Optional) Human-readable description of what the - tool does - - :param input_schema: (Optional) JSON Schema for tool inputs (MCP inputSchema) - - :param output_schema: (Optional) JSON Schema for tool outputs (MCP outputSchema) - - :param metadata: (Optional) Additional metadata about the tool - - :param toolgroup_id: (Optional) ID of the tool group this tool belongs - to - properties: - toolgroup_id: - anyOf: - - type: string - - type: 'null' - title: Toolgroup Id - name: - title: Name - type: string - description: - anyOf: - - type: string - - type: 'null' - title: Description - input_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Input Schema - output_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Output Schema - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Metadata - required: - - name - title: ToolDef - type: object - description: >- - Response containing a list of tool definitions. - - - :param data: List of tool definitions + description: "Response containing a list of tool definitions.\n\n:param data: List of tool definitions" properties: data: items: - $ref: '#/$defs/ToolDef' + $ref: '#/components/schemas/ToolDef' title: Data type: array required: - - data + - data title: ListToolDefsResponse type: object - InsertRequest: - type: object - QueryRequest: - type: object - RAGQueryResult: - $defs: - ImageContentItem: - description: >- - A image content item - - - :param type: Discriminator type of the content item. Always "image" - - :param image: Image as a base64 encoded string or an URL - properties: - type: - const: image - default: image - title: Type - type: string - image: - $ref: '#/$defs/_URLOrData' - required: - - image - title: ImageContentItem - type: object - TextContentItem: - description: >- - A text content item - - - :param type: Discriminator type of the content item. Always "text" - - :param text: Text content - properties: - type: - const: text - default: text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: TextContentItem - type: object - URL: - description: >- - A URL reference to external content. - - - :param uri: The URL string pointing to the resource - properties: - uri: - title: Uri - type: string - required: - - uri - title: URL - type: object - _URLOrData: - description: >- - A URL or a base64 encoded string - - - :param url: A URL of the image or data URL in the format of data:image/{type};base64,{data}. - Note that URL could have length limits. - - :param data: base64 encoded image data as string - properties: - url: - anyOf: - - $ref: '#/$defs/URL' - - type: 'null' - data: - anyOf: - - type: string - - type: 'null' - contentEncoding: base64 - title: Data - title: _URLOrData - type: object - description: >- - Result of a RAG query containing retrieved content and metadata. - - - :param content: (Optional) The retrieved content from the query - - :param metadata: Additional metadata about the query result - properties: - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/$defs/ImageContentItem' - text: '#/$defs/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/$defs/ImageContentItem' - - $ref: '#/$defs/TextContentItem' - - items: - discriminator: - mapping: - image: '#/$defs/ImageContentItem' - text: '#/$defs/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/$defs/ImageContentItem' - - $ref: '#/$defs/TextContentItem' - type: array - - type: 'null' - title: Content - metadata: - additionalProperties: true - title: Metadata - type: object - title: RAGQueryResult - type: object - ListToolGroupsResponse: - $defs: - ToolGroup: - description: >- - A group of related tools managed together. - - - :param type: Type of resource, always 'tool_group' - - :param mcp_endpoint: (Optional) Model Context Protocol endpoint for remote - tools - - :param args: (Optional) Additional arguments for the tool group - properties: - identifier: - description: >- - Unique identifier for this resource in llama stack - title: Identifier - type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: >- - Unique identifier for this resource in the provider - title: Provider Resource Id - provider_id: - description: >- - ID of the provider that owns this resource - title: Provider Id - type: string - type: - const: tool_group - default: tool_group - title: Type - type: string - mcp_endpoint: - anyOf: - - $ref: '#/$defs/URL' - - type: 'null' - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Args - required: - - identifier - - provider_id - title: ToolGroup - type: object - URL: - description: >- - A URL reference to external content. - - - :param uri: The URL string pointing to the resource - properties: - uri: - title: Uri - type: string - required: - - uri - title: URL - type: object - description: >- - Response containing a list of tool groups. - - - :param data: List of tool groups - properties: - data: - items: - $ref: '#/$defs/ToolGroup' - title: Data - type: array - required: - - data - title: ListToolGroupsResponse - type: object - RegisterToolGroupRequest: - type: object - ToolGroup: - $defs: - URL: - description: >- - A URL reference to external content. - - - :param uri: The URL string pointing to the resource - properties: - uri: - title: Uri - type: string - required: - - uri - title: URL - type: object - description: >- - A group of related tools managed together. - - - :param type: Type of resource, always 'tool_group' - - :param mcp_endpoint: (Optional) Model Context Protocol endpoint for remote - tools - - :param args: (Optional) Additional arguments for the tool group - properties: - identifier: - description: >- - Unique identifier for this resource in llama stack - title: Identifier - type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: >- - Unique identifier for this resource in the provider - title: Provider Resource Id - provider_id: - description: >- - ID of the provider that owns this resource - title: Provider Id - type: string - type: - const: tool_group - default: tool_group - title: Type - type: string - mcp_endpoint: - anyOf: - - $ref: '#/$defs/URL' - - type: 'null' - args: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Args - required: - - identifier - - provider_id - title: ToolGroup - type: object - ToolDef: - description: >- - Tool definition used in runtime contexts. - - - :param name: Name of the tool - - :param description: (Optional) Human-readable description of what the tool - does - - :param input_schema: (Optional) JSON Schema for tool inputs (MCP inputSchema) - - :param output_schema: (Optional) JSON Schema for tool outputs (MCP outputSchema) - - :param metadata: (Optional) Additional metadata about the tool - - :param toolgroup_id: (Optional) ID of the tool group this tool belongs to - properties: - toolgroup_id: - anyOf: - - type: string - - type: 'null' - title: Toolgroup Id - name: - title: Name - type: string - description: The ID of the tool group to register. - provider_id: - type: string - description: >- - The ID of the provider to use for the tool group. - mcp_endpoint: - $ref: '#/components/schemas/URL' - description: >- - The MCP endpoint to use for the tool group. - args: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - A dictionary of arguments to pass to the tool group. - additionalProperties: false - required: - - toolgroup_id - - provider_id - title: RegisterToolGroupRequest - Chunk: - type: object - properties: - content: - $ref: '#/components/schemas/InterleavedContent' - description: >- - The content of the chunk, which can be interleaved text, images, or other - types. - chunk_id: - type: string - description: >- - Unique identifier for the chunk. Must be provided explicitly. - metadata: - type: object - additionalProperties: - oneOf: - - type: 'null' - - type: boolean - - type: number - - type: string - - type: array - - type: object - description: >- - Metadata associated with the chunk that will be used in the model context - during inference. - embedding: - type: array - items: - type: number - description: >- - Optional embedding for the chunk. If not provided, it will be computed - later. - chunk_metadata: - $ref: '#/components/schemas/ChunkMetadata' - description: >- - Metadata for the chunk that will NOT be used in the context during inference. - The `chunk_metadata` is required backend functionality. - additionalProperties: false - required: - - content - - chunk_id - - metadata - title: Chunk - description: >- - A chunk of content that can be inserted into a vector database. - ChunkMetadata: - type: object - InsertChunksRequest: - type: object - QueryChunksRequest: - type: object - QueryChunksResponse: - $defs: - Chunk: - description: >- - A chunk of content that can be inserted into a vector database. - - :param content: The content of the chunk, which can be interleaved text, - images, or other types. - - :param embedding: Optional embedding for the chunk. If not provided, it - will be computed later. - - :param metadata: Metadata associated with the chunk that will be used - in the model context during inference. - - :param stored_chunk_id: The chunk ID that is stored in the vector database. - Used for backend functionality. - - :param chunk_metadata: Metadata for the chunk that will NOT be used in - the context during inference. - The `chunk_metadata` is required backend functionality. - properties: - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/$defs/ImageContentItem' - text: '#/$defs/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/$defs/ImageContentItem' - - $ref: '#/$defs/TextContentItem' - - items: - discriminator: - mapping: - image: '#/$defs/ImageContentItem' - text: '#/$defs/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/$defs/ImageContentItem' - - $ref: '#/$defs/TextContentItem' - type: array - title: Content - metadata: - additionalProperties: true - title: Metadata - type: object - embedding: - anyOf: - - items: - type: number - type: array - - type: 'null' - title: Embedding - chunk_id: - anyOf: - - type: string - - type: 'null' - title: Chunk Id - chunk_metadata: - anyOf: - - $ref: '#/$defs/ChunkMetadata' - - type: 'null' - required: - - content - title: Chunk - type: object - ChunkMetadata: - description: >- - `ChunkMetadata` is backend metadata for a `Chunk` that is used to store - additional information about the chunk that - will not be used in the context during inference, but is required - for backend functionality. The `ChunkMetadata` - is set during chunk creation in `MemoryToolRuntimeImpl().insert()`and - is not expected to change after. - Use `Chunk.metadata` for metadata that will be used in the context - during inference. - :param chunk_id: The ID of the chunk. If not set, it will be generated - based on the document ID and content. - - :param document_id: The ID of the document this chunk belongs to. - - :param source: The source of the content, such as a URL, file path, or - other identifier. - - :param created_timestamp: An optional timestamp indicating when the chunk - was created. - - :param updated_timestamp: An optional timestamp indicating when the chunk - was last updated. - - :param chunk_window: The window of the chunk, which can be used to group - related chunks together. - - :param chunk_tokenizer: The tokenizer used to create the chunk. Default - is Tiktoken. - - :param chunk_embedding_model: The embedding model used to create the chunk's - embedding. - - :param chunk_embedding_dimension: The dimension of the embedding vector - for the chunk. - - :param content_token_count: The number of tokens in the content of the - chunk. - - :param metadata_token_count: The number of tokens in the metadata of the - chunk. - properties: - chunk_id: - anyOf: - - type: string - - type: 'null' - title: Chunk Id - document_id: - anyOf: - - type: string - - type: 'null' - title: Document Id - source: - anyOf: - - type: string - - type: 'null' - title: Source - created_timestamp: - anyOf: - - type: integer - - type: 'null' - title: Created Timestamp - updated_timestamp: - anyOf: - - type: integer - - type: 'null' - title: Updated Timestamp - chunk_window: - anyOf: - - type: string - - type: 'null' - title: Chunk Window - chunk_tokenizer: - anyOf: - - type: string - - type: 'null' - title: Chunk Tokenizer - chunk_embedding_model: - anyOf: - - type: string - - type: 'null' - title: Chunk Embedding Model - chunk_embedding_dimension: - anyOf: - - type: integer - - type: 'null' - title: Chunk Embedding Dimension - content_token_count: - anyOf: - - type: integer - - type: 'null' - title: Content Token Count - metadata_token_count: - anyOf: - - type: integer - - type: 'null' - title: Metadata Token Count - title: ChunkMetadata - type: object - ImageContentItem: - description: >- - A image content item - - - :param type: Discriminator type of the content item. Always "image" - - :param image: Image as a base64 encoded string or an URL - properties: - type: - const: image - default: image - title: Type - type: string - image: - $ref: '#/$defs/_URLOrData' - required: - - image - title: ImageContentItem - type: object - TextContentItem: - description: >- - A text content item - - - :param type: Discriminator type of the content item. Always "text" - - :param text: Text content - properties: - type: - const: text - default: text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: TextContentItem - type: object - URL: - description: >- - A URL reference to external content. - - - :param uri: The URL string pointing to the resource - properties: - uri: - title: Uri - type: string - required: - - uri - title: URL - type: object - _URLOrData: - description: >- - A URL or a base64 encoded string - - - :param url: A URL of the image or data URL in the format of data:image/{type};base64,{data}. - Note that URL could have length limits. - - :param data: base64 encoded image data as string - properties: - url: - anyOf: - - $ref: '#/$defs/URL' - - type: 'null' - data: - anyOf: - - type: string - - type: 'null' - contentEncoding: base64 - title: Data - title: _URLOrData - type: object - description: >- - Response from querying chunks in a vector database. - - - :param chunks: List of content chunks returned from the query - - :param scores: Relevance scores corresponding to each returned chunk - properties: - chunks: - items: - $ref: '#/$defs/Chunk' - title: Chunks - type: array - scores: - items: - type: number - title: Scores - type: array - required: - - chunks - - scores - title: QueryChunksResponse - type: object - VectorStoreListResponse: - $defs: - VectorStoreFileCounts: - description: >- - File processing status counts for a vector store. - - - :param completed: Number of files that have been successfully processed - - :param cancelled: Number of files that had their processing cancelled - - :param failed: Number of files that failed to process - - :param in_progress: Number of files currently being processed - - :param total: Total number of files in the vector store - properties: - completed: - title: Completed - type: integer - cancelled: - title: Cancelled - type: integer - failed: - title: Failed - type: integer - in_progress: - title: In Progress - type: integer - total: - title: Total - type: integer - required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts - type: object - VectorStoreObject: - description: >- - OpenAI Vector Store object. - - - :param id: Unique identifier for the vector store - - :param object: Object type identifier, always "vector_store" - - :param created_at: Timestamp when the vector store was created - - :param name: (Optional) Name of the vector store - - :param usage_bytes: Storage space used by the vector store in bytes - - :param file_counts: File processing status counts for the vector store - - :param status: Current status of the vector store - - :param expires_after: (Optional) Expiration policy for the vector store - - :param expires_at: (Optional) Timestamp when the vector store will expire - - :param last_active_at: (Optional) Timestamp of last activity on the vector - store - - :param metadata: Set of key-value pairs that can be attached to the vector - store - properties: - id: - title: Id - type: string - object: - default: vector_store - title: Object - type: string - created_at: - title: Created At - type: integer - name: - anyOf: - - type: string - - type: 'null' - title: Name - usage_bytes: - default: 0 - title: Usage Bytes - type: integer - file_counts: - $ref: '#/$defs/VectorStoreFileCounts' - status: - default: completed - title: Status - type: string - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Expires After - expires_at: - anyOf: - - type: integer - - type: 'null' - title: Expires At - last_active_at: - anyOf: - - type: integer - - type: 'null' - title: Last Active At - metadata: - additionalProperties: true - title: Metadata - type: object - required: - - id - - created_at - - file_counts - title: VectorStoreObject - type: object - description: >- - Response from listing vector stores. - - - :param object: Object type identifier, always "list" - - :param data: List of vector store objects - - :param first_id: (Optional) ID of the first vector store in the list for pagination - - :param last_id: (Optional) ID of the last vector store in the list for pagination - - :param has_more: Whether there are more vector stores available beyond this - page - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/$defs/VectorStoreObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - has_more: - default: false - title: Has More - type: boolean - required: - - data - title: VectorStoreListResponse - type: object - VectorStoreObject: - $defs: - VectorStoreFileCounts: - description: >- - File processing status counts for a vector store. - - - :param completed: Number of files that have been successfully processed - - :param cancelled: Number of files that had their processing cancelled - - :param failed: Number of files that failed to process - - :param in_progress: Number of files currently being processed - - :param total: Total number of files in the vector store - properties: - completed: - title: Completed - type: integer - cancelled: - title: Cancelled - type: integer - failed: - title: Failed - type: integer - in_progress: - title: In Progress - type: integer - total: - title: Total - type: integer - required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts - type: object - description: >- - OpenAI Vector Store object. - - - :param id: Unique identifier for the vector store - - :param object: Object type identifier, always "vector_store" - - :param created_at: Timestamp when the vector store was created - - :param name: (Optional) Name of the vector store - - :param usage_bytes: Storage space used by the vector store in bytes - - :param file_counts: File processing status counts for the vector store - - :param status: Current status of the vector store - - :param expires_after: (Optional) Expiration policy for the vector store - - :param expires_at: (Optional) Timestamp when the vector store will expire - - :param last_active_at: (Optional) Timestamp of last activity on the vector - store - - :param metadata: Set of key-value pairs that can be attached to the vector - store - properties: - id: - title: Id - type: string - object: - default: vector_store - title: Object - type: string - created_at: - title: Created At - type: integer - name: - anyOf: - - type: string - - type: 'null' - title: Name - usage_bytes: - default: 0 - title: Usage Bytes - type: integer - file_counts: - $ref: '#/$defs/VectorStoreFileCounts' - status: - default: completed - title: Status - type: string - expires_after: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Expires After - expires_at: - anyOf: - - type: integer - - type: 'null' - title: Expires At - last_active_at: - anyOf: - - type: integer - - type: 'null' - title: Last Active At - metadata: - additionalProperties: true - title: Metadata - type: object - required: - - id - - created_at - - file_counts - title: VectorStoreObject - type: object - OpenaiUpdateVectorStoreRequest: - type: object VectorStoreDeleteResponse: - description: >- - Response from deleting a vector store. - - - :param id: Unique identifier of the deleted vector store - - :param object: Object type identifier for the deletion response - - :param deleted: Whether the deletion operation was successful + description: "Response from deleting a vector store.\n\n:param id: Unique identifier of the deleted vector store\n:param object: Object type identifier for the deletion response\n:param deleted: Whether the deletion operation was successful" properties: id: title: Id @@ -15253,736 +16510,11 @@ components: title: Deleted type: boolean required: - - id + - id title: VectorStoreDeleteResponse type: object - VectorStoreFileBatchObject: - $defs: - VectorStoreFileCounts: - description: >- - File processing status counts for a vector store. - - - :param completed: Number of files that have been successfully processed - - :param cancelled: Number of files that had their processing cancelled - - :param failed: Number of files that failed to process - - :param in_progress: Number of files currently being processed - - :param total: Total number of files in the vector store - properties: - completed: - title: Completed - type: integer - cancelled: - title: Cancelled - type: integer - failed: - title: Failed - type: integer - in_progress: - title: In Progress - type: integer - total: - title: Total - type: integer - required: - - completed - - cancelled - - failed - - in_progress - - total - title: VectorStoreFileCounts - type: object - description: >- - OpenAI Vector Store File Batch object. - - - :param id: Unique identifier for the file batch - - :param object: Object type identifier, always "vector_store.file_batch" - - :param created_at: Timestamp when the file batch was created - - :param vector_store_id: ID of the vector store containing the file batch - - :param status: Current processing status of the file batch - - :param file_counts: File processing status counts for the batch - properties: - id: - title: Id - type: string - object: - default: vector_store.file_batch - title: Object - type: string - created_at: - title: Created At - type: integer - vector_store_id: - title: Vector Store Id - type: string - status: - anyOf: - - const: completed - type: string - - const: in_progress - type: string - - const: cancelled - type: string - - const: failed - type: string - title: Status - file_counts: - $ref: '#/$defs/VectorStoreFileCounts' - required: - - id - - created_at - - vector_store_id - - status - - file_counts - title: VectorStoreFileBatchObject - type: object - VectorStoreFilesListInBatchResponse: - $defs: - VectorStoreChunkingStrategyAuto: - description: >- - Automatic chunking strategy for vector store files. - - - :param type: Strategy type, always "auto" for automatic chunking - properties: - type: - const: auto - default: auto - title: Type - type: string - title: VectorStoreChunkingStrategyAuto - type: object - VectorStoreChunkingStrategyStatic: - description: >- - Static chunking strategy with configurable parameters. - - - :param type: Strategy type, always "static" for static chunking - - :param static: Configuration parameters for the static chunking strategy - properties: - type: - const: static - default: static - title: Type - type: string - static: - $ref: >- - #/$defs/VectorStoreChunkingStrategyStaticConfig - required: - - static - title: VectorStoreChunkingStrategyStatic - type: object - VectorStoreChunkingStrategyStaticConfig: - description: >- - Configuration for static chunking strategy. - - - :param chunk_overlap_tokens: Number of tokens to overlap between adjacent - chunks - - :param max_chunk_size_tokens: Maximum number of tokens per chunk, must - be between 100 and 4096 - properties: - chunk_overlap_tokens: - default: 400 - title: Chunk Overlap Tokens - type: integer - max_chunk_size_tokens: - default: 800 - maximum: 4096 - minimum: 100 - title: Max Chunk Size Tokens - type: integer - title: VectorStoreChunkingStrategyStaticConfig - type: object - VectorStoreFileLastError: - description: >- - Error information for failed vector store file processing. - - - :param code: Error code indicating the type of failure - - :param message: Human-readable error message describing the failure - properties: - code: - anyOf: - - const: server_error - type: string - - const: rate_limit_exceeded - type: string - title: Code - message: - title: Message - type: string - required: - - code - - message - title: VectorStoreFileLastError - type: object - VectorStoreFileObject: - description: >- - OpenAI Vector Store File object. - - - :param id: Unique identifier for the file - - :param object: Object type identifier, always "vector_store.file" - - :param attributes: Key-value attributes associated with the file - - :param chunking_strategy: Strategy used for splitting the file into chunks - - :param created_at: Timestamp when the file was added to the vector store - - :param last_error: (Optional) Error information if file processing failed - - :param status: Current processing status of the file - - :param usage_bytes: Storage space used by this file in bytes - - :param vector_store_id: ID of the vector store containing this file - properties: - id: - title: Id - type: string - object: - default: vector_store.file - title: Object - type: string - attributes: - additionalProperties: true - title: Attributes - type: object - chunking_strategy: - discriminator: - mapping: - auto: '#/$defs/VectorStoreChunkingStrategyAuto' - static: >- - #/$defs/VectorStoreChunkingStrategyStatic - propertyName: type - oneOf: - - $ref: '#/$defs/VectorStoreChunkingStrategyAuto' - - $ref: >- - #/$defs/VectorStoreChunkingStrategyStatic - title: Chunking Strategy - created_at: - title: Created At - type: integer - last_error: - anyOf: - - $ref: '#/$defs/VectorStoreFileLastError' - - type: 'null' - status: - anyOf: - - const: completed - type: string - - const: in_progress - type: string - - const: cancelled - type: string - - const: failed - type: string - title: Status - usage_bytes: - default: 0 - title: Usage Bytes - type: integer - vector_store_id: - title: Vector Store Id - type: string - required: - - id - - chunking_strategy - - created_at - - status - - vector_store_id - title: VectorStoreFileObject - type: object - description: >- - Response from listing files in a vector store file batch. - - - :param object: Object type identifier, always "list" - - :param data: List of vector store file objects in the batch - - :param first_id: (Optional) ID of the first file in the list for pagination - - :param last_id: (Optional) ID of the last file in the list for pagination - - :param has_more: Whether there are more files available beyond this page - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/$defs/VectorStoreFileObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - has_more: - default: false - title: Has More - type: boolean - required: - - data - title: VectorStoreFilesListInBatchResponse - type: object - Union: - type: object - nullable: true - VectorStoreListFilesResponse: - $defs: - VectorStoreChunkingStrategyAuto: - description: >- - Automatic chunking strategy for vector store files. - - - :param type: Strategy type, always "auto" for automatic chunking - properties: - type: - const: auto - default: auto - title: Type - type: string - title: VectorStoreChunkingStrategyAuto - type: object - VectorStoreChunkingStrategyStatic: - description: >- - Static chunking strategy with configurable parameters. - - - :param type: Strategy type, always "static" for static chunking - - :param static: Configuration parameters for the static chunking strategy - properties: - type: - const: static - default: static - title: Type - type: string - static: - $ref: >- - #/$defs/VectorStoreChunkingStrategyStaticConfig - required: - - static - title: VectorStoreChunkingStrategyStatic - type: object - VectorStoreChunkingStrategyStaticConfig: - description: >- - Configuration for static chunking strategy. - - - :param chunk_overlap_tokens: Number of tokens to overlap between adjacent - chunks - - :param max_chunk_size_tokens: Maximum number of tokens per chunk, must - be between 100 and 4096 - properties: - chunk_overlap_tokens: - default: 400 - title: Chunk Overlap Tokens - type: integer - max_chunk_size_tokens: - default: 800 - maximum: 4096 - minimum: 100 - title: Max Chunk Size Tokens - type: integer - title: VectorStoreChunkingStrategyStaticConfig - type: object - VectorStoreFileLastError: - description: >- - Error information for failed vector store file processing. - - - :param code: Error code indicating the type of failure - - :param message: Human-readable error message describing the failure - properties: - code: - anyOf: - - const: server_error - type: string - - const: rate_limit_exceeded - type: string - title: Code - message: - title: Message - type: string - required: - - code - - message - title: VectorStoreFileLastError - type: object - VectorStoreFileObject: - description: >- - OpenAI Vector Store File object. - - - :param id: Unique identifier for the file - - :param object: Object type identifier, always "vector_store.file" - - :param attributes: Key-value attributes associated with the file - - :param chunking_strategy: Strategy used for splitting the file into chunks - - :param created_at: Timestamp when the file was added to the vector store - - :param last_error: (Optional) Error information if file processing failed - - :param status: Current processing status of the file - - :param usage_bytes: Storage space used by this file in bytes - - :param vector_store_id: ID of the vector store containing this file - properties: - id: - title: Id - type: string - object: - default: vector_store.file - title: Object - type: string - attributes: - additionalProperties: true - title: Attributes - type: object - chunking_strategy: - discriminator: - mapping: - auto: '#/$defs/VectorStoreChunkingStrategyAuto' - static: >- - #/$defs/VectorStoreChunkingStrategyStatic - propertyName: type - oneOf: - - $ref: '#/$defs/VectorStoreChunkingStrategyAuto' - - $ref: >- - #/$defs/VectorStoreChunkingStrategyStatic - title: Chunking Strategy - created_at: - title: Created At - type: integer - last_error: - anyOf: - - $ref: '#/$defs/VectorStoreFileLastError' - - type: 'null' - status: - anyOf: - - const: completed - type: string - - const: in_progress - type: string - - const: cancelled - type: string - - const: failed - type: string - title: Status - usage_bytes: - default: 0 - title: Usage Bytes - type: integer - vector_store_id: - title: Vector Store Id - type: string - required: - - id - - chunking_strategy - - created_at - - status - - vector_store_id - title: VectorStoreFileObject - type: object - description: >- - Response from listing files in a vector store. - - - :param object: Object type identifier, always "list" - - :param data: List of vector store file objects - - :param first_id: (Optional) ID of the first file in the list for pagination - - :param last_id: (Optional) ID of the last file in the list for pagination - - :param has_more: Whether there are more files available beyond this page - properties: - object: - default: list - title: Object - type: string - data: - items: - $ref: '#/$defs/VectorStoreFileObject' - title: Data - type: array - first_id: - anyOf: - - type: string - - type: 'null' - title: First Id - last_id: - anyOf: - - type: string - - type: 'null' - title: Last Id - has_more: - default: false - title: Has More - type: boolean - required: - - data - title: VectorStoreListFilesResponse - type: object - OpenaiAttachFileToVectorStoreRequest: - type: object - VectorStoreFileObject: - $defs: - VectorStoreChunkingStrategyAuto: - description: >- - Automatic chunking strategy for vector store files. - - - :param type: Strategy type, always "auto" for automatic chunking - properties: - type: - const: auto - default: auto - title: Type - type: string - title: VectorStoreChunkingStrategyAuto - type: object - VectorStoreChunkingStrategyStatic: - description: >- - Static chunking strategy with configurable parameters. - - - :param type: Strategy type, always "static" for static chunking - - :param static: Configuration parameters for the static chunking strategy - properties: - type: - const: static - default: static - title: Type - type: string - static: - $ref: >- - #/$defs/VectorStoreChunkingStrategyStaticConfig - required: - - static - title: VectorStoreChunkingStrategyStatic - type: object - VectorStoreChunkingStrategyStaticConfig: - description: >- - Configuration for static chunking strategy. - - - :param chunk_overlap_tokens: Number of tokens to overlap between adjacent - chunks - - :param max_chunk_size_tokens: Maximum number of tokens per chunk, must - be between 100 and 4096 - properties: - chunk_overlap_tokens: - default: 400 - title: Chunk Overlap Tokens - type: integer - max_chunk_size_tokens: - default: 800 - maximum: 4096 - minimum: 100 - title: Max Chunk Size Tokens - type: integer - title: VectorStoreChunkingStrategyStaticConfig - type: object - VectorStoreFileLastError: - description: >- - Error information for failed vector store file processing. - - - :param code: Error code indicating the type of failure - - :param message: Human-readable error message describing the failure - properties: - code: - anyOf: - - const: server_error - type: string - - const: rate_limit_exceeded - type: string - title: Code - message: - title: Message - type: string - required: - - code - - message - title: VectorStoreFileLastError - type: object - description: >- - OpenAI Vector Store File object. - - - :param id: Unique identifier for the file - - :param object: Object type identifier, always "vector_store.file" - - :param attributes: Key-value attributes associated with the file - - :param chunking_strategy: Strategy used for splitting the file into chunks - - :param created_at: Timestamp when the file was added to the vector store - - :param last_error: (Optional) Error information if file processing failed - - :param status: Current processing status of the file - - :param usage_bytes: Storage space used by this file in bytes - - :param vector_store_id: ID of the vector store containing this file - properties: - id: - title: Id - type: string - object: - default: vector_store.file - title: Object - type: string - attributes: - additionalProperties: true - title: Attributes - type: object - chunking_strategy: - discriminator: - mapping: - auto: '#/$defs/VectorStoreChunkingStrategyAuto' - static: >- - #/$defs/VectorStoreChunkingStrategyStatic - propertyName: type - oneOf: - - $ref: '#/$defs/VectorStoreChunkingStrategyAuto' - - $ref: >- - #/$defs/VectorStoreChunkingStrategyStatic - title: Chunking Strategy - created_at: - title: Created At - type: integer - last_error: - anyOf: - - $ref: '#/$defs/VectorStoreFileLastError' - - type: 'null' - status: - anyOf: - - const: completed - type: string - - const: in_progress - type: string - - const: cancelled - type: string - - const: failed - type: string - title: Status - usage_bytes: - default: 0 - title: Usage Bytes - type: integer - vector_store_id: - title: Vector Store Id - type: string - required: - - id - - chunking_strategy - - created_at - - status - - vector_store_id - title: VectorStoreFileObject - type: object - OpenaiUpdateVectorStoreFileRequest: - type: object - VectorStoreFileDeleteResponse: - description: >- - Response from deleting a vector store file. - - - :param id: Unique identifier of the deleted file - - :param object: Object type identifier for the deletion response - - :param deleted: Whether the deletion operation was successful - properties: - id: - title: Id - type: string - object: - default: vector_store.file.deleted - title: Object - type: string - deleted: - default: true - title: Deleted - type: boolean - required: - - id - title: VectorStoreFileDeleteResponse - type: object VectorStoreFileContentsResponse: - $defs: - VectorStoreContent: - description: >- - Content item from a vector store file or search result. - - - :param type: Content type, currently only "text" is supported - - :param text: The actual text content - properties: - type: - const: text - title: Type - type: string - text: - title: Text - type: string - required: - - type - - text - title: VectorStoreContent - type: object - description: >- - Response from retrieving the contents of a vector store file. - - - :param file_id: Unique identifier for the file - - :param filename: Name of the file - - :param attributes: Key-value attributes associated with the file - - :param content: List of content items from the file + description: "Response from retrieving the contents of a vector store file.\n\n:param file_id: Unique identifier for the file\n:param filename: Name of the file\n:param attributes: Key-value attributes associated with the file\n:param content: List of content items from the file" properties: file_id: title: File Id @@ -15996,965 +16528,190 @@ components: type: object content: items: - $ref: '#/$defs/VectorStoreContent' + $ref: '#/components/schemas/VectorStoreContent' title: Content type: array required: - - file_id - - filename - - attributes - - content + - file_id + - filename + - attributes + - content title: VectorStoreFileContentsResponse type: object - OpenaiSearchVectorStoreRequest: - type: object - VectorStoreSearchResponsePage: - $defs: - VectorStoreContent: - description: >- - Content item from a vector store file or search result. - - - :param type: Content type, currently only "text" is supported - - :param text: The actual text content - properties: - type: - const: text - title: Type - type: string - text: - title: Text - type: string - required: - - type - - text - title: VectorStoreContent - type: object - VectorStoreSearchResponse: - description: >- - Response from searching a vector store. - - - :param file_id: Unique identifier of the file containing the result - - :param filename: Name of the file containing the result - - :param score: Relevance score for this search result - - :param attributes: (Optional) Key-value attributes associated with the - file - - :param content: List of content items matching the search query - properties: - file_id: - title: File Id - type: string - filename: - title: Filename - type: string - score: - title: Score - type: number - attributes: - anyOf: - - additionalProperties: - anyOf: - - type: string - - type: number - - type: boolean - type: object - - type: 'null' - title: Attributes - content: - items: - $ref: '#/$defs/VectorStoreContent' - title: Content - type: array - required: - - file_id - - filename - - score - - content - title: VectorStoreSearchResponse - type: object - description: >- - Paginated response from searching a vector store. - - - :param object: Object type identifier for the search results page - - :param search_query: The original search query that was executed - - :param data: List of search result objects - - :param has_more: Whether there are more results available beyond this page - - :param next_page: (Optional) Token for retrieving the next page of results + VectorStoreFileDeleteResponse: + description: "Response from deleting a vector store file.\n\n:param id: Unique identifier of the deleted file\n:param object: Object type identifier for the deletion response\n:param deleted: Whether the deletion operation was successful" properties: + id: + title: Id + type: string object: - default: vector_store.search_results.page + default: vector_store.file.deleted title: Object type: string - search_query: - title: Search Query + deleted: + default: true + title: Deleted + type: boolean + required: + - id + title: VectorStoreFileDeleteResponse + type: object + VectorStoreFilesListInBatchResponse: + description: "Response from listing files in a vector store file batch.\n\n:param object: Object type identifier, always \"list\"\n:param data: List of vector store file objects in the batch\n:param first_id: (Optional) ID of the first file in the list for pagination\n:param last_id: (Optional) ID of the last file in the list for pagination\n:param has_more: Whether there are more files available beyond this page" + properties: + object: + default: list + title: Object type: string data: items: - $ref: '#/$defs/VectorStoreSearchResponse' + $ref: '#/components/schemas/VectorStoreFileObject' title: Data type: array + first_id: + title: First Id + type: string + nullable: true + last_id: + title: Last Id + type: string + nullable: true has_more: default: false title: Has More type: boolean - next_page: - anyOf: - - type: string - - type: 'null' - title: Next Page required: - - search_query - - data - title: VectorStoreSearchResponsePage + - data + title: VectorStoreFilesListInBatchResponse type: object - VersionInfo: - description: >- - Version information for the service. - - - :param version: Version number of the service + VectorStoreListFilesResponse: + description: "Response from listing files in a vector store.\n\n:param object: Object type identifier, always \"list\"\n:param data: List of vector store file objects\n:param first_id: (Optional) ID of the first file in the list for pagination\n:param last_id: (Optional) ID of the last file in the list for pagination\n:param has_more: Whether there are more files available beyond this page" properties: - version: - title: Version + object: + default: list + title: Object type: string - required: - - version - title: VersionInfo - type: object - AppendRowsRequest: - type: object - PaginatedResponse: - description: >- - A generic paginated response that follows a simple format. - - - :param data: The list of items for the current page - - :param has_more: Whether there are more items available after this set - - :param url: The URL for accessing this list - properties: data: items: - additionalProperties: true - type: object + $ref: '#/components/schemas/VectorStoreFileObject' title: Data type: array + first_id: + title: First Id + type: string + nullable: true + last_id: + title: Last Id + type: string + nullable: true has_more: + default: false title: Has More type: boolean - url: - anyOf: - - type: string - - type: 'null' - title: Url required: - - data - - has_more - title: PaginatedResponse + - data + title: VectorStoreListFilesResponse type: object - ListDatasetsResponse: - $defs: - Dataset: - description: >- - Dataset resource for storing and accessing training or evaluation data. - - - :param type: Type of resource, always 'dataset' for datasets - properties: - identifier: - description: >- - Unique identifier for this resource in llama stack - title: Identifier - type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: >- - Unique identifier for this resource in the provider - title: Provider Resource Id - provider_id: - description: >- - ID of the provider that owns this resource - title: Provider Id - type: string - type: - const: dataset - default: dataset - title: Type - type: string - purpose: - $ref: '#/$defs/DatasetPurpose' - source: - discriminator: - mapping: - rows: '#/$defs/RowsDataSource' - uri: '#/$defs/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/$defs/URIDataSource' - - $ref: '#/$defs/RowsDataSource' - title: Source - metadata: - additionalProperties: true - description: Any additional metadata for this dataset - title: Metadata - type: object - required: - - identifier - - provider_id - - purpose - - source - title: Dataset - type: object - DatasetPurpose: - description: >- - Purpose of the dataset. Each purpose has a required input data schema. - - - :cvar post-training/messages: The dataset contains messages used for post-training. - { - "messages": [ - {"role": "user", "content": "Hello, world!"}, - {"role": "assistant", "content": "Hello, world!"}, - ] - } - :cvar eval/question-answer: The dataset contains a question column and - an answer column. - { - "question": "What is the capital of France?", - "answer": "Paris" - } - :cvar eval/messages-answer: The dataset contains a messages column with - list of messages and an answer column. - { - "messages": [ - {"role": "user", "content": "Hello, my name is John Doe."}, - {"role": "assistant", "content": "Hello, John Doe. How can - I help you today?"}, - {"role": "user", "content": "What's my name?"}, - ], - "answer": "John Doe" - } - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - title: DatasetPurpose - type: string - RowsDataSource: - description: >- - A dataset stored in rows. - - :param rows: The dataset is stored in rows. E.g. - - [ - {"messages": [{"role": "user", "content": "Hello, world!"}, {"role": - "assistant", "content": "Hello, world!"}]} - ] - properties: - type: - const: rows - default: rows - title: Type - type: string - rows: - items: - additionalProperties: true - type: object - title: Rows - type: array - required: - - rows - title: RowsDataSource - type: object - URIDataSource: - description: >- - A dataset that can be obtained from a URI. - - :param uri: The dataset can be obtained from a URI. E.g. - - "https://mywebsite.com/mydata.jsonl" - - "lsfs://mydata.jsonl" - - "data:csv;base64,{base64_content}" - properties: - type: - const: uri - default: uri - title: Type - type: string - uri: - title: Uri - type: string - required: - - uri - title: URIDataSource - type: object - description: >- - Response from listing datasets. - - - :param data: List of datasets + VectorStoreListResponse: + description: "Response from listing vector stores.\n\n:param object: Object type identifier, always \"list\"\n:param data: List of vector store objects\n:param first_id: (Optional) ID of the first vector store in the list for pagination\n:param last_id: (Optional) ID of the last vector store in the list for pagination\n:param has_more: Whether there are more vector stores available beyond this page" properties: + object: + default: list + title: Object + type: string data: items: - $ref: '#/$defs/Dataset' + $ref: '#/components/schemas/VectorStoreObject' title: Data type: array + first_id: + title: First Id + type: string + nullable: true + last_id: + title: Last Id + type: string + nullable: true + has_more: + default: false + title: Has More + type: boolean required: - - data - title: ListDatasetsResponse + - data + title: VectorStoreListResponse type: object - RegisterDatasetRequest: - type: object - Dataset: - $defs: - DatasetPurpose: - description: >- - Purpose of the dataset. Each purpose has a required input data schema. - - - :cvar post-training/messages: The dataset contains messages used for post-training. - { - "messages": [ - {"role": "user", "content": "Hello, world!"}, - {"role": "assistant", "content": "Hello, world!"}, - ] - } - :cvar eval/question-answer: The dataset contains a question column and - an answer column. - { - "question": "What is the capital of France?", - "answer": "Paris" - } - :cvar eval/messages-answer: The dataset contains a messages column with - list of messages and an answer column. - { - "messages": [ - {"role": "user", "content": "Hello, my name is John Doe."}, - {"role": "assistant", "content": "Hello, John Doe. How can - I help you today?"}, - {"role": "user", "content": "What's my name?"}, - ], - "answer": "John Doe" - } - enum: - - post-training/messages - - eval/question-answer - - eval/messages-answer - title: DatasetPurpose - type: string - RowsDataSource: - description: >- - A dataset stored in rows. - - :param rows: The dataset is stored in rows. E.g. - - [ - {"messages": [{"role": "user", "content": "Hello, world!"}, {"role": - "assistant", "content": "Hello, world!"}]} - ] - properties: - type: - const: rows - default: rows - title: Type - type: string - rows: - items: - additionalProperties: true - type: object - title: Rows - type: array - required: - - rows - title: RowsDataSource - type: object - URIDataSource: - description: >- - A dataset that can be obtained from a URI. - - :param uri: The dataset can be obtained from a URI. E.g. - - "https://mywebsite.com/mydata.jsonl" - - "lsfs://mydata.jsonl" - - "data:csv;base64,{base64_content}" - properties: - type: - const: uri - default: uri - title: Type - type: string - uri: - title: Uri - type: string - required: - - uri - title: URIDataSource - type: object - description: >- - Dataset resource for storing and accessing training or evaluation data. - - - :param type: Type of resource, always 'dataset' for datasets + OpenAIResponseMessage: + description: "Corresponds to the various Message types in the Responses API.\nThey are all under one type because the Responses API gives them all\nthe same \"type\" value, and there is no way to tell them apart in certain\nscenarios." properties: - identifier: - description: >- - Unique identifier for this resource in llama stack - title: Identifier - type: string - provider_resource_id: + content: anyOf: - - type: string - - type: 'null' - description: >- - Unique identifier for this resource in the provider - title: Provider Resource Id - provider_id: - description: >- - ID of the provider that owns this resource - title: Provider Id - type: string - type: - const: dataset - default: dataset - title: Type - type: string - purpose: - $ref: '#/$defs/DatasetPurpose' - source: - discriminator: - mapping: - rows: '#/$defs/RowsDataSource' - uri: '#/$defs/URIDataSource' - propertyName: type - oneOf: - - $ref: '#/$defs/URIDataSource' - - $ref: '#/$defs/RowsDataSource' - title: Source - metadata: - additionalProperties: true - description: Any additional metadata for this dataset - title: Metadata - type: object - required: - - identifier - - provider_id - - purpose - - source - title: Dataset - type: object - CreateAgentRequest: - type: object - AgentCreateResponse: - description: >- - Response returned when creating a new agent. - - - :param agent_id: Unique identifier for the created agent - properties: - agent_id: - title: Agent Id - type: string - required: - - agent_id - title: AgentCreateResponse - type: object - Agent: - $defs: - AgentConfig: - description: >- - Configuration for an agent. - - - :param model: The model identifier to use for the agent - - :param instructions: The system instructions for the agent - - :param name: Optional name for the agent, used in telemetry and identification - - :param enable_session_persistence: Optional flag indicating whether session - data has to be persisted - - :param response_format: Optional response format configuration - properties: - sampling_params: - anyOf: - - $ref: '#/$defs/SamplingParams' - - type: 'null' - input_shields: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Input Shields - output_shields: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Output Shields - toolgroups: - anyOf: - - items: - anyOf: - - type: string - - $ref: '#/$defs/AgentToolGroupWithArgs' - type: array - - type: 'null' - title: Toolgroups - client_tools: - anyOf: - - items: - $ref: '#/$defs/ToolDef' - type: array - - type: 'null' - title: Client Tools - tool_choice: - anyOf: - - $ref: '#/$defs/ToolChoice' - - type: 'null' - deprecated: true - tool_prompt_format: - anyOf: - - $ref: '#/$defs/ToolPromptFormat' - - type: 'null' - deprecated: true - tool_config: - anyOf: - - $ref: '#/$defs/ToolConfig' - - type: 'null' - max_infer_iters: - anyOf: - - type: integer - - type: 'null' - default: 10 - title: Max Infer Iters - model: - title: Model - type: string - instructions: - title: Instructions - type: string - name: - anyOf: - - type: string - - type: 'null' - title: Name - enable_session_persistence: - anyOf: - - type: boolean - - type: 'null' - default: false - title: Enable Session Persistence - response_format: - anyOf: - - discriminator: - mapping: - grammar: '#/$defs/GrammarResponseFormat' - json_schema: '#/$defs/JsonSchemaResponseFormat' - propertyName: type - oneOf: - - $ref: '#/$defs/JsonSchemaResponseFormat' - - $ref: '#/$defs/GrammarResponseFormat' - - type: 'null' - title: Response Format - required: - - model - - instructions - title: AgentConfig - type: object - AgentToolGroupWithArgs: - properties: - name: - title: Name - type: string - args: - additionalProperties: true - title: Args - type: object - required: - - name - - args - title: AgentToolGroupWithArgs - type: object - GrammarResponseFormat: - description: >- - Configuration for grammar-guided response generation. - - - :param type: Must be "grammar" to identify this format type - - :param bnf: The BNF grammar specification the response should conform - to - properties: - type: - const: grammar - default: grammar - title: Type - type: string - bnf: - additionalProperties: true - title: Bnf - type: object - required: - - bnf - title: GrammarResponseFormat - type: object - GreedySamplingStrategy: - description: >- - Greedy sampling strategy that selects the highest probability token at - each step. - - - :param type: Must be "greedy" to identify this sampling strategy - properties: - type: - const: greedy - default: greedy - title: Type - type: string - title: GreedySamplingStrategy - type: object - JsonSchemaResponseFormat: - description: >- - Configuration for JSON schema-guided response generation. - - - :param type: Must be "json_schema" to identify this format type - - :param json_schema: The JSON schema the response should conform to. In - a Python SDK, this is often a `pydantic` model. - properties: - type: - const: json_schema - default: json_schema - title: Type - type: string - json_schema: - additionalProperties: true - title: Json Schema - type: object - required: - - json_schema - title: JsonSchemaResponseFormat - type: object - SamplingParams: - description: >- - Sampling parameters. - - - :param strategy: The sampling strategy. - - :param max_tokens: The maximum number of tokens that can be generated - in the completion. The token count of - your prompt plus max_tokens cannot exceed the model's context length. - :param repetition_penalty: Number between -2.0 and 2.0. Positive values - penalize new tokens - based on whether they appear in the text so far, increasing the model's - likelihood to talk about new topics. - :param stop: Up to 4 sequences where the API will stop generating further - tokens. - The returned text will not contain the stop sequence. - properties: - strategy: + - type: string + - items: discriminator: mapping: - greedy: '#/$defs/GreedySamplingStrategy' - top_k: '#/$defs/TopKSamplingStrategy' - top_p: '#/$defs/TopPSamplingStrategy' + input_file: '#/$defs/OpenAIResponseInputMessageContentFile' + input_image: '#/$defs/OpenAIResponseInputMessageContentImage' + input_text: '#/$defs/OpenAIResponseInputMessageContentText' propertyName: type oneOf: - - $ref: '#/$defs/GreedySamplingStrategy' - - $ref: '#/$defs/TopPSamplingStrategy' - - $ref: '#/$defs/TopKSamplingStrategy' - title: Strategy - max_tokens: - anyOf: - - type: integer - - type: 'null' - title: Max Tokens - repetition_penalty: - anyOf: - - type: number - - type: 'null' - default: 1.0 - title: Repetition Penalty - stop: - anyOf: - - items: - type: string - type: array - - type: 'null' - title: Stop - title: SamplingParams - type: object - SystemMessageBehavior: - description: >- - Config for how to override the default system prompt. - - - :cvar append: Appends the provided system message to the default system - prompt: - https://www.llama.com/docs/model-cards-and-prompt-formats/llama3_2/#-function-definitions-in-the-system-prompt- - :cvar replace: Replaces the default system prompt with the provided system - message. The system message can include the string - '{{function_definitions}}' to indicate where the function definitions - should be inserted. - enum: - - append - - replace - title: SystemMessageBehavior + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentText' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentImage' + - $ref: '#/components/schemas/OpenAIResponseInputMessageContentFile' + type: array + - items: + discriminator: + mapping: + output_text: '#/$defs/OpenAIResponseOutputMessageContentOutputText' + refusal: '#/$defs/OpenAIResponseContentPartRefusal' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseOutputMessageContentOutputText' + - $ref: '#/components/schemas/OpenAIResponseContentPartRefusal' + type: array + title: Content + role: + anyOf: + - const: system + type: string + - const: developer + type: string + - const: user + type: string + - const: assistant + type: string + title: Role + type: + const: message + default: message + title: Type type: string - ToolChoice: - description: >- - Whether tool use is required or automatic. This is a hint to the model - which may not be followed. It depends on the Instruction Following capabilities - of the model. - - - :cvar auto: The model may use tools if it determines that is appropriate. - - :cvar required: The model must use tools. - - :cvar none: The model must not use tools. - enum: - - auto - - required - - none - title: ToolChoice + id: + title: Id type: string - ToolConfig: - description: >- - Configuration for tool use. - - - :param tool_choice: (Optional) Whether tool use is automatic, required, - or none. Can also specify a tool name to use a specific tool. Defaults - to ToolChoice.auto. - - :param tool_prompt_format: (Optional) Instructs the model how to format - tool calls. By default, Llama Stack will attempt to use a format that - is best adapted to the model. - - `ToolPromptFormat.json`: The tool calls are formatted as a JSON - object. - - `ToolPromptFormat.function_tag`: The tool calls are enclosed in - a tag. - - `ToolPromptFormat.python_list`: The tool calls are output as Python - syntax -- a list of function calls. - :param system_message_behavior: (Optional) Config for how to override - the default system prompt. - - `SystemMessageBehavior.append`: Appends the provided system message - to the default system prompt. - - `SystemMessageBehavior.replace`: Replaces the default system prompt - with the provided system message. The system message can include the string - '{{function_definitions}}' to indicate where the function definitions - should be inserted. - properties: - tool_choice: - anyOf: - - $ref: '#/$defs/ToolChoice' - - type: string - - type: 'null' - default: auto - title: Tool Choice - tool_prompt_format: - anyOf: - - $ref: '#/$defs/ToolPromptFormat' - - type: 'null' - system_message_behavior: - anyOf: - - $ref: '#/$defs/SystemMessageBehavior' - - type: 'null' - default: append - title: ToolConfig - type: object - ToolDef: - description: >- - Tool definition used in runtime contexts. - - - :param name: Name of the tool - - :param description: (Optional) Human-readable description of what the - tool does - - :param input_schema: (Optional) JSON Schema for tool inputs (MCP inputSchema) - - :param output_schema: (Optional) JSON Schema for tool outputs (MCP outputSchema) - - :param metadata: (Optional) Additional metadata about the tool - - :param toolgroup_id: (Optional) ID of the tool group this tool belongs - to - properties: - toolgroup_id: - anyOf: - - type: string - - type: 'null' - title: Toolgroup Id - name: - title: Name - type: string - description: - anyOf: - - type: string - - type: 'null' - title: Description - input_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Input Schema - output_schema: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Output Schema - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Metadata - required: - - name - title: ToolDef - type: object - ToolPromptFormat: - description: >- - Prompt format for calling custom / zero shot tools. - - - :cvar json: JSON format for calling tools. It takes the form: - { - "type": "function", - "function" : { - "name": "function_name", - "description": "function_description", - "parameters": {...} - } - } - :cvar function_tag: Function tag format, pseudo-XML. This looks like: - (parameters) - - :cvar python_list: Python list. The output is a valid Python expression - that can be - evaluated to a list. Each element in the list is a function call. - Example: - ["function_name(param1, param2)", "function_name(param1, param2)"] - enum: - - json - - function_tag - - python_list - title: ToolPromptFormat - type: string - TopKSamplingStrategy: - description: >- - Top-k sampling strategy that restricts sampling to the k most likely tokens. - - - :param type: Must be "top_k" to identify this sampling strategy - - :param top_k: Number of top tokens to consider for sampling. Must be at - least 1 - properties: - type: - const: top_k - default: top_k - title: Type - type: string - top_k: - minimum: 1 - title: Top K - type: integer - required: - - top_k - title: TopKSamplingStrategy - type: object - TopPSamplingStrategy: - description: >- - Top-p (nucleus) sampling strategy that samples from the smallest set of - tokens with cumulative probability >= p. - - - :param type: Must be "top_p" to identify this sampling strategy - - :param temperature: Controls randomness in sampling. Higher values increase - randomness - - :param top_p: Cumulative probability threshold for nucleus sampling. Defaults - to 0.95 - properties: - type: - const: top_p - default: top_p - title: Type - type: string - temperature: - anyOf: - - exclusiveMinimum: 0.0 - type: number - - type: 'null' - title: Temperature - top_p: - anyOf: - - type: number - - type: 'null' - default: 0.95 - title: Top P - required: - - temperature - title: TopPSamplingStrategy - type: object - description: >- - An agent instance with configuration and metadata. - - - :param agent_id: Unique identifier for the agent - - :param agent_config: Configuration settings for the agent - - :param created_at: Timestamp when the agent was created - properties: - agent_id: - title: Agent Id - type: string - agent_config: - $ref: '#/$defs/AgentConfig' - created_at: - format: date-time - title: Created At + nullable: true + status: + title: Status type: string + nullable: true required: - - agent_id - - agent_config - - created_at - title: Agent + - content + - role + title: OpenAIResponseMessage type: object - CreateAgentSessionRequest: - type: object - AgentSessionCreateResponse: - description: >- - Response returned when creating a new agent session. - - - :param session_id: Unique identifier for the created session + OpenAIResponseObjectWithInput: + description: "OpenAI response object extended with input context information.\n\n:param input: List of input items that led to this response" properties: - session_id: - title: Session Id + created_at: + title: Created At + type: integer + error: + $ref: '#/components/schemas/OpenAIResponseError' + nullable: true + id: + title: Id + type: string + model: + title: Model type: string required: - session_id @@ -18557,30 +18314,30 @@ components: items: discriminator: mapping: - inference: '#/$defs/InferenceStep' - memory_retrieval: '#/$defs/MemoryRetrievalStep' - shield_call: '#/$defs/ShieldCallStep' - tool_execution: '#/$defs/ToolExecutionStep' - propertyName: step_type + file_search_call: '#/$defs/OpenAIResponseOutputMessageFileSearchToolCall' + function_call: '#/$defs/OpenAIResponseOutputMessageFunctionToolCall' + mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest' + mcp_call: '#/$defs/OpenAIResponseOutputMessageMCPCall' + mcp_list_tools: '#/$defs/OpenAIResponseOutputMessageMCPListTools' + message: '#/$defs/OpenAIResponseMessage' + web_search_call: '#/$defs/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type oneOf: - - $ref: '#/$defs/InferenceStep' - - $ref: '#/$defs/ToolExecutionStep' - - $ref: '#/$defs/ShieldCallStep' - - $ref: '#/$defs/MemoryRetrievalStep' - title: Steps + - $ref: '#/components/schemas/OpenAIResponseMessage' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + title: Output type: array - output_message: - $ref: '#/$defs/CompletionMessage' - output_attachments: - anyOf: - - items: - $ref: '#/$defs/Attachment' - type: array - - type: 'null' - title: Output Attachments - started_at: - format: date-time - title: Started At + parallel_tool_calls: + default: false + title: Parallel Tool Calls + type: boolean + previous_response_id: + title: Previous Response Id type: string completed_at: anyOf: @@ -18637,609 +18394,97 @@ components: - code_interpreter title: BuiltinTool type: string - CompletionMessage: - description: >- - A message containing the model's (assistant) response in a chat conversation. - - - :param role: Must be "assistant" to identify this as the model's response - - :param content: The content of the model's response - - :param stop_reason: Reason why the model stopped generating. Options are: - - `StopReason.end_of_turn`: The model finished generating the entire - response. - - `StopReason.end_of_message`: The model finished generating but generated - a partial response -- usually, a tool call. The user may call the tool - and continue the conversation with the tool's response. - - `StopReason.out_of_tokens`: The model ran out of token budget. - :param tool_calls: List of tool calls. Each tool call is a ToolCall object. - properties: - role: - const: assistant - default: assistant - title: Role - type: string - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/$defs/ImageContentItem' - text: '#/$defs/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/$defs/ImageContentItem' - - $ref: '#/$defs/TextContentItem' - - items: - discriminator: - mapping: - image: '#/$defs/ImageContentItem' - text: '#/$defs/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/$defs/ImageContentItem' - - $ref: '#/$defs/TextContentItem' - type: array - title: Content - stop_reason: - $ref: '#/$defs/StopReason' - tool_calls: - anyOf: - - items: - $ref: '#/$defs/ToolCall' - type: array - - type: 'null' - title: Tool Calls - required: - - content - - stop_reason - title: CompletionMessage - type: object - ImageContentItem: - description: >- - A image content item - - - :param type: Discriminator type of the content item. Always "image" - - :param image: Image as a base64 encoded string or an URL - properties: - type: - const: image - default: image - title: Type - type: string - image: - $ref: '#/$defs/_URLOrData' - required: - - image - title: ImageContentItem - type: object - InferenceStep: - description: >- - An inference step in an agent turn. - - - :param model_response: The response from the LLM. - properties: - turn_id: - title: Turn Id - type: string - step_id: - title: Step Id - type: string - started_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Started At - completed_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Completed At - step_type: - const: inference - default: inference - title: Step Type - type: string - model_response: - $ref: '#/$defs/CompletionMessage' - required: - - turn_id - - step_id - - model_response - title: InferenceStep - type: object - MemoryRetrievalStep: - description: >- - A memory retrieval step in an agent turn. - - - :param vector_store_ids: The IDs of the vector databases to retrieve context - from. - - :param inserted_context: The context retrieved from the vector databases. - properties: - turn_id: - title: Turn Id - type: string - step_id: - title: Step Id - type: string - started_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Started At - completed_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Completed At - step_type: - const: memory_retrieval - default: memory_retrieval - title: Step Type - type: string - vector_store_ids: - title: Vector Store Ids - type: string - inserted_context: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/$defs/ImageContentItem' - text: '#/$defs/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/$defs/ImageContentItem' - - $ref: '#/$defs/TextContentItem' - - items: - discriminator: - mapping: - image: '#/$defs/ImageContentItem' - text: '#/$defs/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/$defs/ImageContentItem' - - $ref: '#/$defs/TextContentItem' - type: array - title: Inserted Context - required: - - turn_id - - step_id - - vector_store_ids - - inserted_context - title: MemoryRetrievalStep - type: object - SafetyViolation: - description: >- - Details of a safety violation detected by content moderation. - - - :param violation_level: Severity level of the violation - - :param user_message: (Optional) Message to convey to the user about the - violation - - :param metadata: Additional metadata including specific violation codes - for debugging and telemetry - properties: - violation_level: - $ref: '#/$defs/ViolationLevel' - user_message: - anyOf: - - type: string - - type: 'null' - title: User Message - metadata: - additionalProperties: true - title: Metadata - type: object - required: - - violation_level - title: SafetyViolation - type: object - ShieldCallStep: - description: >- - A shield call step in an agent turn. - - - :param violation: The violation from the shield call. - properties: - turn_id: - title: Turn Id - type: string - step_id: - title: Step Id - type: string - started_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Started At - completed_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Completed At - step_type: - const: shield_call - default: shield_call - title: Step Type - type: string - violation: - anyOf: - - $ref: '#/$defs/SafetyViolation' - - type: 'null' - required: - - turn_id - - step_id - - violation - title: ShieldCallStep - type: object - StopReason: - enum: - - end_of_turn - - end_of_message - - out_of_tokens - title: StopReason - type: string - TextContentItem: - description: >- - A text content item - - - :param type: Discriminator type of the content item. Always "text" - - :param text: Text content - properties: - type: - const: text - default: text - title: Type - type: string - text: - title: Text - type: string - required: - - text - title: TextContentItem - type: object - ToolCall: - properties: - call_id: - title: Call Id - type: string - tool_name: - anyOf: - - $ref: '#/$defs/BuiltinTool' - - type: string - title: Tool Name - arguments: - title: Arguments - type: string - required: - - call_id - - tool_name - - arguments - title: ToolCall - type: object - ToolExecutionStep: - description: >- - A tool execution step in an agent turn. - - - :param tool_calls: The tool calls to execute. - - :param tool_responses: The tool responses from the tool calls. - properties: - turn_id: - title: Turn Id - type: string - step_id: - title: Step Id - type: string - started_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Started At - completed_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Completed At - step_type: - const: tool_execution - default: tool_execution - title: Step Type - type: string - tool_calls: - items: - $ref: '#/$defs/ToolCall' - title: Tool Calls - type: array - tool_responses: - items: - $ref: '#/$defs/ToolResponse' - title: Tool Responses - type: array - required: - - turn_id - - step_id - - tool_calls - - tool_responses - title: ToolExecutionStep - type: object - ToolResponse: - description: >- - Response from a tool invocation. - - - :param call_id: Unique identifier for the tool call this response is for - - :param tool_name: Name of the tool that was invoked - - :param content: The response content from the tool - - :param metadata: (Optional) Additional metadata about the tool response - properties: - call_id: - title: Call Id - type: string - tool_name: - anyOf: - - $ref: '#/$defs/BuiltinTool' - - type: string - title: Tool Name - content: - anyOf: - - type: string - - discriminator: - mapping: - image: '#/$defs/ImageContentItem' - text: '#/$defs/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/$defs/ImageContentItem' - - $ref: '#/$defs/TextContentItem' - - items: - discriminator: - mapping: - image: '#/$defs/ImageContentItem' - text: '#/$defs/TextContentItem' - propertyName: type - oneOf: - - $ref: '#/$defs/ImageContentItem' - - $ref: '#/$defs/TextContentItem' - type: array - title: Content - metadata: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Metadata - required: - - call_id - - tool_name - - content - title: ToolResponse - type: object - URL: - description: >- - A URL reference to external content. - - - :param uri: The URL string pointing to the resource - properties: - uri: - title: Uri - type: string - required: - - uri - title: URL - type: object - ViolationLevel: - description: >- - Severity level of a safety violation. - - - :cvar INFO: Informational level violation that does not require action - - :cvar WARN: Warning level violation that suggests caution but allows continuation - - :cvar ERROR: Error level violation that requires blocking or intervention - enum: - - info - - warn - - error - title: ViolationLevel - type: string - _URLOrData: - description: >- - A URL or a base64 encoded string - - - :param url: A URL of the image or data URL in the format of data:image/{type};base64,{data}. - Note that URL could have length limits. - - :param data: base64 encoded image data as string - properties: - url: - anyOf: - - $ref: '#/$defs/URL' - - type: 'null' - data: - anyOf: - - type: string - - type: 'null' - contentEncoding: base64 - title: Data - title: _URLOrData - type: object - description: >- - Response containing details of a specific agent step. - - - :param step: The complete step data and execution details - properties: - step: - discriminator: - mapping: - inference: '#/$defs/InferenceStep' - memory_retrieval: '#/$defs/MemoryRetrievalStep' - shield_call: '#/$defs/ShieldCallStep' - tool_execution: '#/$defs/ToolExecutionStep' - propertyName: step_type - oneOf: - - $ref: '#/$defs/InferenceStep' - - $ref: '#/$defs/ToolExecutionStep' - - $ref: '#/$defs/ShieldCallStep' - - $ref: '#/$defs/MemoryRetrievalStep' - title: Step - required: - - step - title: AgentStepResponse - type: object - ListBenchmarksResponse: - $defs: - Benchmark: - description: >- - A benchmark resource for evaluating model performance. - - - :param dataset_id: Identifier of the dataset to use for the benchmark - evaluation - - :param scoring_functions: List of scoring function identifiers to apply - during evaluation - - :param metadata: Metadata for this evaluation task - - :param type: The resource type, always benchmark - properties: - identifier: - description: >- - Unique identifier for this resource in llama stack - title: Identifier - type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: >- - Unique identifier for this resource in the provider - title: Provider Resource Id - provider_id: - description: >- - ID of the provider that owns this resource - title: Provider Id - type: string - type: - const: benchmark - default: benchmark - title: Type - type: string - dataset_id: - title: Dataset Id - type: string - scoring_functions: - items: - type: string - title: Scoring Functions - type: array - metadata: - additionalProperties: true - description: Metadata for this evaluation task - title: Metadata - type: object - required: - - identifier - - provider_id - - dataset_id - - scoring_functions - title: Benchmark - type: object - properties: - data: + temperature: + title: Temperature + type: number + nullable: true + text: + $ref: '#/components/schemas/OpenAIResponseText' + default: + format: + type: text + top_p: + title: Top P + type: number + nullable: true + tools: + title: Tools items: - $ref: '#/$defs/Benchmark' - title: Data + discriminator: + mapping: + file_search: '#/$defs/OpenAIResponseInputToolFileSearch' + function: '#/$defs/OpenAIResponseInputToolFunction' + mcp: '#/$defs/OpenAIResponseToolMCP' + web_search: '#/$defs/OpenAIResponseInputToolWebSearch' + web_search_preview: '#/$defs/OpenAIResponseInputToolWebSearch' + web_search_preview_2025_03_11: '#/$defs/OpenAIResponseInputToolWebSearch' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch' + - $ref: '#/components/schemas/OpenAIResponseInputToolFunction' + - $ref: '#/components/schemas/OpenAIResponseToolMCP' + type: array + nullable: true + truncation: + title: Truncation + type: string + nullable: true + usage: + $ref: '#/components/schemas/OpenAIResponseUsage' + nullable: true + instructions: + title: Instructions + type: string + nullable: true + input: + items: + anyOf: + - discriminator: + mapping: + file_search_call: '#/$defs/OpenAIResponseOutputMessageFileSearchToolCall' + function_call: '#/$defs/OpenAIResponseOutputMessageFunctionToolCall' + mcp_approval_request: '#/$defs/OpenAIResponseMCPApprovalRequest' + mcp_call: '#/$defs/OpenAIResponseOutputMessageMCPCall' + mcp_list_tools: '#/$defs/OpenAIResponseOutputMessageMCPListTools' + message: '#/$defs/OpenAIResponseMessage' + web_search_call: '#/$defs/OpenAIResponseOutputMessageWebSearchToolCall' + propertyName: type + oneOf: + - $ref: '#/components/schemas/OpenAIResponseMessage' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageWebSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFileSearchToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageFunctionToolCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPCall' + - $ref: '#/components/schemas/OpenAIResponseOutputMessageMCPListTools' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalRequest' + - $ref: '#/components/schemas/OpenAIResponseInputFunctionToolCallOutput' + - $ref: '#/components/schemas/OpenAIResponseMCPApprovalResponse' + - $ref: '#/components/schemas/OpenAIResponseMessage' + title: Input type: array required: - - data - title: ListBenchmarksResponse + - created_at + - id + - model + - output + - status + - input + title: OpenAIResponseObjectWithInput type: object - RegisterBenchmarkRequest: - type: object - Benchmark: - description: >- - A benchmark resource for evaluating model performance. - - - :param dataset_id: Identifier of the dataset to use for the benchmark evaluation - - :param scoring_functions: List of scoring function identifiers to apply during - evaluation - - :param metadata: Metadata for this evaluation task - - :param type: The resource type, always benchmark + ImageContentItem: + description: "A image content item\n\n:param type: Discriminator type of the content item. Always \"image\"\n:param image: Image as a base64 encoded string or an URL" properties: - identifier: - description: >- - Unique identifier for this resource in llama stack - title: Identifier - type: string - provider_resource_id: - anyOf: - - type: string - - type: 'null' - description: >- - Unique identifier for this resource in the provider - title: Provider Resource Id - provider_id: - description: >- - ID of the provider that owns this resource - title: Provider Id - type: string type: - const: benchmark - default: benchmark + const: image + default: image title: Type type: string - dataset_id: - title: Dataset Id - type: string - scoring_functions: - items: - type: string - title: Scoring Functions - type: array - metadata: - additionalProperties: true - description: Metadata for this evaluation task - title: Metadata - type: object + image: + $ref: '#/components/schemas/_URLOrData' required: - - identifier - - provider_id - - dataset_id - - scoring_functions - title: Benchmark + - image + title: ImageContentItem type: object properties: type: @@ -19372,401 +18617,46 @@ components: :param scores: The scores from the evaluation. properties: - generations: - items: - additionalProperties: true - type: object - title: Generations - type: array - scores: - additionalProperties: - $ref: '#/$defs/ScoringResult' - title: Scores - type: object + epoch: + title: Epoch + type: integer + train_loss: + title: Train Loss + type: number + validation_loss: + title: Validation Loss + type: number + perplexity: + title: Perplexity + type: number required: - - generations - - scores - title: EvaluateResponse + - epoch + - train_loss + - validation_loss + - perplexity + title: PostTrainingMetric type: object - RunEvalRequest: - type: object - Job: - $defs: - JobStatus: - description: >- - Status of a job execution. - - :cvar completed: Job has finished successfully - - :cvar in_progress: Job is currently running - - :cvar failed: Job has failed during execution - - :cvar scheduled: Job is scheduled but not yet started - - :cvar cancelled: Job was cancelled before completion - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - type: string - description: >- - A job execution instance with status tracking. - - - :param job_id: Unique identifier for the job - - :param status: Current execution status of the job + _safety_run_shield_Request: properties: - job_id: - title: Job Id + shield_id: + title: Shield Id type: string - status: - $ref: '#/$defs/JobStatus' - required: - - job_id - - status - title: Job - type: object - RerankRequest: - type: object - RerankResponse: - $defs: - RerankData: - description: >- - A single rerank result from a reranking response. - - - :param index: The original index of the document in the input list - - :param relevance_score: The relevance score from the model output. Values - are inverted when applicable so that higher scores indicate greater relevance. - properties: - index: - title: Index - type: integer - relevance_score: - title: Relevance Score - type: number - required: - - index - - relevance_score - title: RerankData - type: object - description: >- - Response from a reranking request. - - - :param data: List of rerank result objects, sorted by relevance score (descending) - properties: - data: - items: - $ref: '#/$defs/RerankData' - title: Data - type: array - required: - - data - title: RerankResponse - type: object - PostTrainingJobArtifactsResponse: - $defs: - Checkpoint: - description: >- - Checkpoint created during training runs. - - - :param identifier: Unique identifier for the checkpoint - - :param created_at: Timestamp when the checkpoint was created - - :param epoch: Training epoch when the checkpoint was saved - - :param post_training_job_id: Identifier of the training job that created - this checkpoint - - :param path: File system path where the checkpoint is stored - - :param training_metrics: (Optional) Training metrics associated with this - checkpoint - properties: - identifier: - title: Identifier - type: string - created_at: - format: date-time - title: Created At - type: string - epoch: - title: Epoch - type: integer - post_training_job_id: - title: Post Training Job Id - type: string - path: - title: Path - type: string - training_metrics: - anyOf: - - $ref: '#/$defs/PostTrainingMetric' - - type: 'null' - required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - type: object - PostTrainingMetric: - description: >- - Training metrics captured during post-training jobs. - - - :param epoch: Training epoch number - - :param train_loss: Loss value on the training dataset - - :param validation_loss: Loss value on the validation dataset - - :param perplexity: Perplexity metric indicating model confidence - properties: - epoch: - title: Epoch - type: integer - train_loss: - title: Train Loss - type: number - validation_loss: - title: Validation Loss - type: number - perplexity: - title: Perplexity - type: number - required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric - type: object - description: >- - Artifacts of a finetuning job. - - - :param job_uuid: Unique identifier for the training job - - :param checkpoints: List of model checkpoints created during training - properties: - job_uuid: - title: Job Uuid - type: string - checkpoints: - items: - $ref: '#/$defs/Checkpoint' - title: Checkpoints - type: array - required: - - job_uuid - title: PostTrainingJobArtifactsResponse - type: object - CancelTrainingJobRequest: - type: object - PostTrainingJobStatusResponse: - $defs: - Checkpoint: - description: >- - Checkpoint created during training runs. - - - :param identifier: Unique identifier for the checkpoint - - :param created_at: Timestamp when the checkpoint was created - - :param epoch: Training epoch when the checkpoint was saved - - :param post_training_job_id: Identifier of the training job that created - this checkpoint - - :param path: File system path where the checkpoint is stored - - :param training_metrics: (Optional) Training metrics associated with this - checkpoint - properties: - identifier: - title: Identifier - type: string - created_at: - format: date-time - title: Created At - type: string - epoch: - title: Epoch - type: integer - post_training_job_id: - title: Post Training Job Id - type: string - path: - title: Path - type: string - training_metrics: - anyOf: - - $ref: '#/$defs/PostTrainingMetric' - - type: 'null' - required: - - identifier - - created_at - - epoch - - post_training_job_id - - path - title: Checkpoint - type: object - JobStatus: - description: >- - Status of a job execution. - - :cvar completed: Job has finished successfully - - :cvar in_progress: Job is currently running - - :cvar failed: Job has failed during execution - - :cvar scheduled: Job is scheduled but not yet started - - :cvar cancelled: Job was cancelled before completion - enum: - - completed - - in_progress - - failed - - scheduled - - cancelled - title: JobStatus - type: string - PostTrainingMetric: - description: >- - Training metrics captured during post-training jobs. - - - :param epoch: Training epoch number - - :param train_loss: Loss value on the training dataset - - :param validation_loss: Loss value on the validation dataset - - :param perplexity: Perplexity metric indicating model confidence - properties: - epoch: - title: Epoch - type: integer - train_loss: - title: Train Loss - type: number - validation_loss: - title: Validation Loss - type: number - perplexity: - title: Perplexity - type: number - required: - - epoch - - train_loss - - validation_loss - - perplexity - title: PostTrainingMetric - type: object - description: >- - Status of a finetuning job. - - - :param job_uuid: Unique identifier for the training job - - :param status: Current status of the training job - - :param scheduled_at: (Optional) Timestamp when the job was scheduled - - :param started_at: (Optional) Timestamp when the job execution began - - :param completed_at: (Optional) Timestamp when the job finished, if completed - - :param resources_allocated: (Optional) Information about computational resources - allocated to the job - - :param checkpoints: List of model checkpoints created during training - properties: - job_uuid: - title: Job Uuid - type: string - status: - $ref: '#/$defs/JobStatus' - scheduled_at: + messages: anyOf: - - format: date-time - type: string - - type: 'null' - title: Scheduled At - started_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Started At - completed_at: - anyOf: - - format: date-time - type: string - - type: 'null' - title: Completed At - resources_allocated: - anyOf: - - additionalProperties: true - type: object - - type: 'null' - title: Resources Allocated - checkpoints: - items: - $ref: '#/$defs/Checkpoint' - title: Checkpoints - type: array - required: - - job_uuid - - status - title: PostTrainingJobStatusResponse - type: object - ListPostTrainingJobsResponse: - $defs: - PostTrainingJob: - properties: - job_uuid: - title: Job Uuid - type: string - required: - - job_uuid - title: PostTrainingJob - type: object - properties: - data: - items: - $ref: '#/$defs/PostTrainingJob' - title: Data - type: array - required: - - data - title: ListPostTrainingJobsResponse - type: object - PreferenceOptimizeRequest: - type: object - PostTrainingJob: - properties: - job_uuid: - title: Job Uuid + - $ref: '#/components/schemas/OpenAIUserMessageParam' + - $ref: '#/components/schemas/OpenAISystemMessageParam' + - $ref: '#/components/schemas/OpenAIAssistantMessageParam' + - $ref: '#/components/schemas/OpenAIToolMessageParam' + - $ref: '#/components/schemas/OpenAIDeveloperMessageParam' + title: Messages + params: + title: Params type: string required: - - job_uuid - title: PostTrainingJob - type: object - SupervisedFineTuneRequest: + - shield_id + - messages + - params + title: _safety_run_shield_Request type: object responses: BadRequest400: @@ -19780,8 +18670,7 @@ components: title: Bad Request detail: The request was invalid or malformed TooManyRequests429: - description: >- - The client has sent too many requests in a given amount of time + description: The client has sent too many requests in a given amount of time content: application/json: schema: @@ -19789,11 +18678,9 @@ components: example: status: 429 title: Too Many Requests - detail: >- - You have exceeded the rate limit. Please try again later. + detail: You have exceeded the rate limit. Please try again later. InternalServerError500: - description: >- - The server encountered an unexpected error + description: The server encountered an unexpected error content: application/json: schema: @@ -19801,10 +18688,9 @@ components: example: status: 500 title: Internal Server Error - detail: >- - An unexpected error occurred. Our team has been notified. + detail: An unexpected error occurred DefaultError: - description: An unexpected error occurred + description: An error occurred content: application/json: schema: diff --git a/pyproject.toml b/pyproject.toml index 6a01d7843..e676b6d5d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,13 +68,14 @@ dev = [ "pytest-cov", "pytest-html", "pytest-json-report", - "pytest-socket", # For blocking network access in unit tests - "nbval", # For notebook testing + "pytest-socket", # For blocking network access in unit tests + "nbval", # For notebook testing "black", "ruff", "mypy", "pre-commit", - "ruamel.yaml", # needed for openapi generator + "ruamel.yaml", # needed for openapi generator + "openapi-spec-validator>=0.7.2", ] # Type checking dependencies - includes type stubs and optional runtime dependencies # needed for complete mypy coverage across all optional features diff --git a/scripts/fastapi_generator.py b/scripts/fastapi_generator.py index 5a0dbd00a..08b80a0fb 100755 --- a/scripts/fastapi_generator.py +++ b/scripts/fastapi_generator.py @@ -17,6 +17,8 @@ from typing import Annotated, Any, Literal, get_args, get_origin import yaml from fastapi import FastAPI from fastapi.openapi.utils import get_openapi +from openapi_spec_validator import validate_spec +from openapi_spec_validator.exceptions import OpenAPISpecValidatorError from llama_stack.apis.datatypes import Api from llama_stack.core.resolver import api_protocol_map @@ -24,6 +26,9 @@ from llama_stack.core.resolver import api_protocol_map # Import the existing route discovery system from llama_stack.core.server.routes import get_all_api_routes +# Global list to store dynamic models created during endpoint generation +_dynamic_models = [] + def _get_all_api_routes_with_functions(): """ @@ -108,6 +113,37 @@ def create_llama_stack_app() -> FastAPI: return app +def _extract_path_parameters(path: str) -> list[dict[str, Any]]: + """ + Extract path parameters from a URL path and return them as OpenAPI parameter definitions. + + Args: + path: URL path with parameters like /v1/batches/{batch_id}/cancel + + Returns: + List of parameter definitions for OpenAPI + """ + import re + + # Find all path parameters in the format {param} or {param:type} + param_pattern = r"\{([^}:]+)(?::[^}]+)?\}" + matches = re.findall(param_pattern, path) + + parameters = [] + for param_name in matches: + parameters.append( + { + "name": param_name, + "in": "path", + "required": True, + "schema": {"type": "string"}, + "description": f"Path parameter: {param_name}", + } + ) + + return parameters + + def _create_fastapi_endpoint(app: FastAPI, route, webmethod): """ Create a FastAPI endpoint from a discovered route and webmethod. @@ -124,6 +160,12 @@ def _create_fastapi_endpoint(app: FastAPI, route, webmethod): # Try to find actual models for this endpoint request_model, response_model, query_parameters = _find_models_for_endpoint(webmethod) + # Debug: Print info for safety endpoints + if "safety" in webmethod.route or "shield" in webmethod.route: + print( + f"Debug: {webmethod.route} - request_model: {request_model}, response_model: {response_model}, query_parameters: {query_parameters}" + ) + # Extract response description from webmethod docstring (always try this first) response_description = _extract_response_description_from_docstring(webmethod, response_model) @@ -136,46 +178,107 @@ def _create_fastapi_endpoint(app: FastAPI, route, webmethod): endpoint_func = typed_endpoint elif response_model and query_parameters: - # Request with individual parameters (could be GET with query params or POST with individual params) - # Create a function with the actual query parameters - def create_query_endpoint_func(): - # Build the function signature dynamically - import inspect + # Check if this is a POST/PUT endpoint with individual parameters + # For POST/PUT, individual parameters should go in request body, not query params + is_post_put = any(method.upper() in ["POST", "PUT", "PATCH"] for method in methods) - # Create parameter annotations - param_annotations = {} - param_defaults = {} + if is_post_put: + # POST/PUT with individual parameters - create a request body model + try: + from pydantic import create_model - for param_name, param_type, default_value in query_parameters: - # Handle problematic type annotations that cause FastAPI issues - safe_type = _make_type_safe_for_fastapi(param_type) - param_annotations[param_name] = safe_type - if default_value is not None: - param_defaults[param_name] = default_value + # Create a dynamic Pydantic model for the request body + field_definitions = {} + for param_name, param_type, default_value in query_parameters: + # Handle complex types that might cause issues with create_model + safe_type = _make_type_safe_for_fastapi(param_type) - # Create the function signature - sig = inspect.Signature( - [ - inspect.Parameter( - name=param_name, - kind=inspect.Parameter.POSITIONAL_OR_KEYWORD, - default=default_value, - annotation=param_annotations[param_name], + if default_value is None: + field_definitions[param_name] = (safe_type, ...) # Required field + else: + field_definitions[param_name] = (safe_type, default_value) # Optional field with default + + # Create the request model dynamically + # Clean up the route name to create a valid schema name + clean_route = webmethod.route.replace("/", "_").replace("{", "").replace("}", "").replace("-", "_") + model_name = f"{clean_route}_Request" + + print(f"Debug: Creating model {model_name} with fields: {field_definitions}") + request_model = create_model(model_name, **field_definitions) + print(f"Debug: Successfully created model {model_name}") + + # Store the dynamic model in the global list for schema inclusion + _dynamic_models.append(request_model) + + # Create endpoint with request body + async def typed_endpoint(request: request_model) -> response_model: + """Typed endpoint for proper schema generation.""" + return response_model() + + # Set the function signature to ensure FastAPI recognizes the request model + typed_endpoint.__annotations__ = {"request": request_model, "return": response_model} + + endpoint_func = typed_endpoint + except Exception as e: + # If dynamic model creation fails, fall back to query parameters + print(f"Warning: Failed to create dynamic request model for {webmethod.route}: {e}") + print(f" Query parameters: {query_parameters}") + # Fall through to the query parameter handling + pass + + if not is_post_put: + # GET with query parameters - create a function with the actual query parameters + def create_query_endpoint_func(): + # Build the function signature dynamically + import inspect + + # Create parameter annotations + param_annotations = {} + param_defaults = {} + + for param_name, param_type, default_value in query_parameters: + # Handle problematic type annotations that cause FastAPI issues + safe_type = _make_type_safe_for_fastapi(param_type) + param_annotations[param_name] = safe_type + if default_value is not None: + param_defaults[param_name] = default_value + + # Create the function with the correct signature + def create_endpoint_func(): + # Sort parameters so that required parameters come before optional ones + # Parameters with None default are required, others are optional + sorted_params = sorted( + query_parameters, + key=lambda x: (x[2] is not None, x[0]), # False (required) comes before True (optional) ) - for param_name, param_type, default_value in query_parameters - ] - ) - async def query_endpoint(**kwargs) -> response_model: - """Query endpoint for proper schema generation.""" - return response_model() + # Create the function signature + sig = inspect.Signature( + [ + inspect.Parameter( + name=param_name, + kind=inspect.Parameter.POSITIONAL_OR_KEYWORD, + default=default_value if default_value is not None else inspect.Parameter.empty, + annotation=param_annotations[param_name], + ) + for param_name, param_type, default_value in sorted_params + ] + ) - # Set the signature - query_endpoint.__signature__ = sig - query_endpoint.__annotations__ = param_annotations - return query_endpoint + # Create a simple function without **kwargs + async def query_endpoint(): + """Query endpoint for proper schema generation.""" + return response_model() - endpoint_func = create_query_endpoint_func() + # Set the signature and annotations + query_endpoint.__signature__ = sig + query_endpoint.__annotations__ = param_annotations + + return query_endpoint + + return create_endpoint_func() + + endpoint_func = create_query_endpoint_func() elif response_model: # Response-only endpoint (no parameters) async def response_only_endpoint() -> response_model: @@ -289,6 +392,10 @@ def _find_models_for_endpoint(webmethod) -> tuple[type | None, type | None, list if param_name == "self": continue + # Skip *args and **kwargs parameters - these are not real API parameters + if param.kind in (inspect.Parameter.VAR_POSITIONAL, inspect.Parameter.VAR_KEYWORD): + continue + # Check if it's a Pydantic model (for POST/PUT requests) param_type = param.annotation if hasattr(param_type, "model_json_schema"): @@ -319,8 +426,17 @@ def _find_models_for_endpoint(webmethod) -> tuple[type | None, type | None, list elif get_origin(return_annotation) is Annotated: # Handle Annotated return types args = get_args(return_annotation) - if args and hasattr(args[0], "model_json_schema"): - response_model = args[0] + if args: + # Check if the first argument is a Pydantic model + if hasattr(args[0], "model_json_schema"): + response_model = args[0] + # Check if the first argument is a union type + elif get_origin(args[0]) is type(args[0]): # Union type + union_args = get_args(args[0]) + for arg in union_args: + if hasattr(arg, "model_json_schema"): + response_model = arg + break elif get_origin(return_annotation) is type(return_annotation): # Union type # Handle union types - try to find the first Pydantic model args = get_args(return_annotation) @@ -340,6 +456,7 @@ def _make_type_safe_for_fastapi(type_hint) -> type: """ Make a type hint safe for FastAPI by converting problematic types to their base types. This handles cases like Literal["24h"] that cause forward reference errors. + Also removes Union with None to avoid anyOf with type: 'null' schemas. """ # Handle Literal types that might cause issues if hasattr(type_hint, "__origin__") and type_hint.__origin__ is Literal: @@ -369,11 +486,16 @@ def _make_type_safe_for_fastapi(type_hint) -> type: if origin is type(type_hint) or (hasattr(type_hint, "__args__") and type_hint.__args__): # This is a union type, find the non-None type args = get_args(type_hint) - for arg in args: - if arg is not type(None) and arg is not None: - return arg - # If all args are None, return the first one - return args[0] if args else type_hint + non_none_types = [arg for arg in args if arg is not type(None) and arg is not None] + + if non_none_types: + # Return the first non-None type to avoid anyOf with null + return non_none_types[0] + elif args: + # If all args are None, return the first one + return args[0] + else: + return type_hint # Not a union type, return as-is return type_hint @@ -475,6 +597,202 @@ def _find_extra_body_params_for_route(api_name: str, route, webmethod) -> list[d return [] +def _ensure_json_schema_types_included(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """ + Ensure all @json_schema_type decorated models are included in the OpenAPI schema. + This finds all models with the _llama_stack_schema_type attribute and adds them to the schema. + """ + if "components" not in openapi_schema: + openapi_schema["components"] = {} + + if "schemas" not in openapi_schema["components"]: + openapi_schema["components"]["schemas"] = {} + + # Find all classes with the _llama_stack_schema_type attribute + from llama_stack import apis + + # Get all modules in the apis package + apis_modules = [] + for module_name in dir(apis): + if not module_name.startswith("_"): + try: + module = getattr(apis, module_name) + if hasattr(module, "__file__"): + apis_modules.append(module) + except (ImportError, AttributeError): + continue + + # Also check submodules + for module in apis_modules: + for attr_name in dir(module): + if not attr_name.startswith("_"): + try: + attr = getattr(module, attr_name) + if hasattr(attr, "__file__") and hasattr(attr, "__name__"): + apis_modules.append(attr) + except (ImportError, AttributeError): + continue + + # Find all classes with the _llama_stack_schema_type attribute + for module in apis_modules: + for attr_name in dir(module): + try: + attr = getattr(module, attr_name) + if ( + hasattr(attr, "_llama_stack_schema_type") + and hasattr(attr, "model_json_schema") + and hasattr(attr, "__name__") + ): + schema_name = attr.__name__ + if schema_name not in openapi_schema["components"]["schemas"]: + try: + schema = attr.model_json_schema() + openapi_schema["components"]["schemas"][schema_name] = schema + except Exception: + # Skip if we can't generate the schema + continue + except (AttributeError, TypeError): + continue + + # Also include any dynamic models that were created during endpoint generation + # This is a workaround to ensure dynamic models appear in the schema + global _dynamic_models + if "_dynamic_models" in globals(): + for model in _dynamic_models: + try: + schema_name = model.__name__ + if schema_name not in openapi_schema["components"]["schemas"]: + schema = model.model_json_schema() + openapi_schema["components"]["schemas"][schema_name] = schema + except Exception: + # Skip if we can't generate the schema + continue + + return openapi_schema + + +def _fix_ref_references(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """ + Fix $ref references to point to components/schemas instead of $defs. + This prevents the YAML dumper from creating a root-level $defs section. + """ + + def fix_refs(obj: Any) -> None: + if isinstance(obj, dict): + if "$ref" in obj and obj["$ref"].startswith("#/$defs/"): + # Replace #/$defs/ with #/components/schemas/ + obj["$ref"] = obj["$ref"].replace("#/$defs/", "#/components/schemas/") + for value in obj.values(): + fix_refs(value) + elif isinstance(obj, list): + for item in obj: + fix_refs(item) + + fix_refs(openapi_schema) + return openapi_schema + + +def _fix_anyof_with_null(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """ + Fix anyOf schemas that contain type: 'null' by removing the null type + and making the field optional through the required field instead. + """ + + def fix_anyof(obj: Any) -> None: + if isinstance(obj, dict): + if "anyOf" in obj and isinstance(obj["anyOf"], list): + # Check if anyOf contains type: 'null' + has_null = any(item.get("type") == "null" for item in obj["anyOf"] if isinstance(item, dict)) + if has_null: + # Remove null types and keep only the non-null types + non_null_types = [ + item for item in obj["anyOf"] if not (isinstance(item, dict) and item.get("type") == "null") + ] + if len(non_null_types) == 1: + # If only one non-null type remains, replace anyOf with that type + obj.update(non_null_types[0]) + if "anyOf" in obj: + del obj["anyOf"] + else: + # Keep the anyOf but without null types + obj["anyOf"] = non_null_types + + # Recursively process all values + for value in obj.values(): + fix_anyof(value) + elif isinstance(obj, list): + for item in obj: + fix_anyof(item) + + fix_anyof(openapi_schema) + return openapi_schema + + +def _eliminate_defs_section(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """ + Eliminate $defs section entirely by moving all definitions to components/schemas. + This matches the structure of the old pyopenapi generator for oasdiff compatibility. + """ + if "components" not in openapi_schema: + openapi_schema["components"] = {} + + if "schemas" not in openapi_schema["components"]: + openapi_schema["components"]["schemas"] = {} + + # First pass: collect all $defs from anywhere in the schema + defs_to_move = {} + + def collect_defs(obj: Any) -> None: + if isinstance(obj, dict): + if "$defs" in obj: + # Collect $defs for later processing + for def_name, def_schema in obj["$defs"].items(): + if def_name not in defs_to_move: + defs_to_move[def_name] = def_schema + + # Recursively process all values + for value in obj.values(): + collect_defs(value) + elif isinstance(obj, list): + for item in obj: + collect_defs(item) + + # Collect all $defs + collect_defs(openapi_schema) + + # Move all $defs to components/schemas + for def_name, def_schema in defs_to_move.items(): + if def_name not in openapi_schema["components"]["schemas"]: + openapi_schema["components"]["schemas"][def_name] = def_schema + + # Also move any existing root-level $defs to components/schemas + if "$defs" in openapi_schema: + print(f"Found root-level $defs with {len(openapi_schema['$defs'])} items, moving to components/schemas") + for def_name, def_schema in openapi_schema["$defs"].items(): + if def_name not in openapi_schema["components"]["schemas"]: + openapi_schema["components"]["schemas"][def_name] = def_schema + # Remove the root-level $defs + del openapi_schema["$defs"] + + # Second pass: remove all $defs sections from anywhere in the schema + def remove_defs(obj: Any) -> None: + if isinstance(obj, dict): + if "$defs" in obj: + del obj["$defs"] + + # Recursively process all values + for value in obj.values(): + remove_defs(value) + elif isinstance(obj, list): + for item in obj: + remove_defs(item) + + # Remove all $defs sections + remove_defs(openapi_schema) + + return openapi_schema + + def _add_error_responses(openapi_schema: dict[str, Any]) -> dict[str, Any]: """ Add standard error response definitions to the OpenAPI schema. @@ -547,10 +865,40 @@ def _add_error_responses(openapi_schema: dict[str, Any]) -> dict[str, Any]: return openapi_schema +def _fix_path_parameters(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """ + Fix path parameter resolution issues by adding explicit parameter definitions. + """ + if "paths" not in openapi_schema: + return openapi_schema + + for path, path_item in openapi_schema["paths"].items(): + # Extract path parameters from the URL + path_params = _extract_path_parameters(path) + + if not path_params: + continue + + # Add parameters to each operation in this path + for method in ["get", "post", "put", "delete", "patch", "head", "options"]: + if method in path_item and isinstance(path_item[method], dict): + operation = path_item[method] + if "parameters" not in operation: + operation["parameters"] = [] + + # Add path parameters that aren't already defined + existing_param_names = {p.get("name") for p in operation["parameters"] if p.get("in") == "path"} + for param in path_params: + if param["name"] not in existing_param_names: + operation["parameters"].append(param) + + return openapi_schema + + def _fix_schema_issues(openapi_schema: dict[str, Any]) -> dict[str, Any]: """ Fix common schema issues that cause OpenAPI validation problems. - This includes converting exclusiveMinimum numbers to minimum values. + This includes converting exclusiveMinimum numbers to minimum values and fixing string fields with null defaults. """ if "components" not in openapi_schema or "schemas" not in openapi_schema["components"]: return openapi_schema @@ -560,10 +908,64 @@ def _fix_schema_issues(openapi_schema: dict[str, Any]) -> dict[str, Any]: # Fix exclusiveMinimum issues for _, schema_def in schemas.items(): _fix_exclusive_minimum_in_schema(schema_def) + _fix_all_null_defaults(schema_def) return openapi_schema +def validate_openapi_schema(schema: dict[str, Any], schema_name: str = "OpenAPI schema") -> bool: + """ + Validate an OpenAPI schema using openapi-spec-validator. + + Args: + schema: The OpenAPI schema dictionary to validate + schema_name: Name of the schema for error reporting + + Returns: + True if valid, False otherwise + + Raises: + OpenAPIValidationError: If validation fails + """ + try: + validate_spec(schema) + print(f"βœ… {schema_name} is valid") + return True + except OpenAPISpecValidatorError as e: + print(f"❌ {schema_name} validation failed:") + print(f" {e}") + return False + except Exception as e: + print(f"❌ {schema_name} validation error: {e}") + return False + + +def validate_schema_file(file_path: Path) -> bool: + """ + Validate an OpenAPI schema file (YAML or JSON). + + Args: + file_path: Path to the schema file + + Returns: + True if valid, False otherwise + """ + try: + with open(file_path) as f: + if file_path.suffix.lower() in [".yaml", ".yml"]: + schema = yaml.safe_load(f) + elif file_path.suffix.lower() == ".json": + schema = json.load(f) + else: + print(f"❌ Unsupported file format: {file_path.suffix}") + return False + + return validate_openapi_schema(schema, str(file_path)) + except Exception as e: + print(f"❌ Failed to read {file_path}: {e}") + return False + + def _fix_exclusive_minimum_in_schema(obj: Any) -> None: """ Recursively fix exclusiveMinimum issues in a schema object. @@ -586,6 +988,75 @@ def _fix_exclusive_minimum_in_schema(obj: Any) -> None: _fix_exclusive_minimum_in_schema(item) +def _fix_string_fields_with_null_defaults(obj: Any) -> None: + """ + Recursively fix string fields that have default: null. + This violates OpenAPI spec - string fields should either have a string default or be optional. + """ + if isinstance(obj, dict): + # Check if this is a field definition with type: string and default: null + if obj.get("type") == "string" and "default" in obj and obj["default"] is None: + # Remove the default: null to make the field optional + del obj["default"] + # Add nullable: true to indicate the field can be null + obj["nullable"] = True + + # Recursively process all values + for value in obj.values(): + _fix_string_fields_with_null_defaults(value) + + elif isinstance(obj, list): + # Recursively process all items + for item in obj: + _fix_string_fields_with_null_defaults(item) + + +def _fix_anyof_with_null_defaults(obj: Any) -> None: + """ + Recursively fix anyOf schemas that have default: null. + This violates OpenAPI spec - anyOf fields should not have null defaults. + """ + if isinstance(obj, dict): + # Check if this is a field definition with anyOf and default: null + if "anyOf" in obj and "default" in obj and obj["default"] is None: + # Remove the default: null to make the field optional + del obj["default"] + # Add nullable: true to indicate the field can be null + obj["nullable"] = True + + # Recursively process all values + for value in obj.values(): + _fix_anyof_with_null_defaults(value) + + elif isinstance(obj, list): + # Recursively process all items + for item in obj: + _fix_anyof_with_null_defaults(item) + + +def _fix_all_null_defaults(obj: Any) -> None: + """ + Recursively fix all field types that have default: null. + This violates OpenAPI spec - fields should not have null defaults. + """ + if isinstance(obj, dict): + # Check if this is a field definition with default: null + if "default" in obj and obj["default"] is None: + # Remove the default: null to make the field optional + del obj["default"] + # Add nullable: true to indicate the field can be null + obj["nullable"] = True + + # Recursively process all values + for value in obj.values(): + _fix_all_null_defaults(value) + + elif isinstance(obj, list): + # Recursively process all items + for item in obj: + _fix_all_null_defaults(item) + + def _sort_paths_alphabetically(openapi_schema: dict[str, Any]) -> dict[str, Any]: """ Sort the paths in the OpenAPI schema by version prefix first, then alphabetically. @@ -703,6 +1174,15 @@ def _filter_schema_by_version( filtered_schema["components"]["schemas"] = filtered_schemas + # Preserve $defs section if it exists + if "components" in openapi_schema and "$defs" in openapi_schema["components"]: + if "components" not in filtered_schema: + filtered_schema["components"] = {} + filtered_schema["components"]["$defs"] = openapi_schema["components"]["$defs"] + print(f"Preserved $defs section with {len(openapi_schema['components']['$defs'])} items") + else: + print("No $defs section to preserve") + return filtered_schema @@ -811,6 +1291,49 @@ def _filter_deprecated_schema(openapi_schema: dict[str, Any]) -> dict[str, Any]: return filtered_schema +def _filter_combined_schema(openapi_schema: dict[str, Any]) -> dict[str, Any]: + """ + Filter OpenAPI schema to include both stable (v1) and experimental (v1alpha, v1beta) APIs. + Excludes deprecated endpoints. This is used for the combined "stainless" spec. + """ + filtered_schema = openapi_schema.copy() + + if "paths" not in filtered_schema: + return filtered_schema + + # Filter paths to include stable (v1) and experimental (v1alpha, v1beta), excluding deprecated + filtered_paths = {} + for path, path_item in filtered_schema["paths"].items(): + # Check if path has any deprecated operations + is_deprecated = _is_path_deprecated(path_item) + + # Skip deprecated endpoints + if is_deprecated: + continue + + # Include /v1/ paths (stable) + if path.startswith("/v1/") and not path.startswith("/v1alpha/") and not path.startswith("/v1beta/"): + filtered_paths[path] = path_item + # Include /v1alpha/ and /v1beta/ paths (experimental) + elif path.startswith("/v1alpha/") or path.startswith("/v1beta/"): + filtered_paths[path] = path_item + + filtered_schema["paths"] = filtered_paths + + # Filter schemas/components to only include ones referenced by filtered paths + if "components" in filtered_schema and "schemas" in filtered_schema["components"]: + referenced_schemas = _find_schemas_referenced_by_paths(filtered_paths, openapi_schema) + + filtered_schemas = {} + for schema_name, schema_def in filtered_schema["components"]["schemas"].items(): + if schema_name in referenced_schemas: + filtered_schemas[schema_name] = schema_def + + filtered_schema["components"]["schemas"] = filtered_schemas + + return filtered_schema + + def generate_openapi_spec(output_dir: str, format: str = "yaml", include_examples: bool = True) -> dict[str, Any]: """ Generate OpenAPI specification using FastAPI's built-in method. @@ -835,12 +1358,63 @@ def generate_openapi_spec(output_dir: str, format: str = "yaml", include_example servers=app.servers, ) + # Debug: Check if there's a root-level $defs in the original schema + if "$defs" in openapi_schema: + print(f"Original schema has root-level $defs with {len(openapi_schema['$defs'])} items") + else: + print("Original schema has no root-level $defs") + # Add Llama Stack specific extensions openapi_schema = _add_llama_stack_extensions(openapi_schema, app) # Add standard error responses openapi_schema = _add_error_responses(openapi_schema) + # Ensure all @json_schema_type decorated models are included + openapi_schema = _ensure_json_schema_types_included(openapi_schema) + + # Fix $ref references to point to components/schemas instead of $defs + openapi_schema = _fix_ref_references(openapi_schema) + + # Debug: Check if there are any $ref references to $defs in the schema + defs_refs = [] + + def find_defs_refs(obj: Any, path: str = "") -> None: + if isinstance(obj, dict): + if "$ref" in obj and obj["$ref"].startswith("#/$defs/"): + defs_refs.append(f"{path}: {obj['$ref']}") + for key, value in obj.items(): + find_defs_refs(value, f"{path}.{key}" if path else key) + elif isinstance(obj, list): + for i, item in enumerate(obj): + find_defs_refs(item, f"{path}[{i}]") + + find_defs_refs(openapi_schema) + if defs_refs: + print(f"Found {len(defs_refs)} $ref references to $defs in schema") + for ref in defs_refs[:5]: # Show first 5 + print(f" {ref}") + else: + print("No $ref references to $defs found in schema") + + # Note: Let Pydantic/FastAPI generate the correct, standards-compliant schema + # Fields with default values should be optional according to OpenAPI standards + + # Fix anyOf schemas with type: 'null' to avoid oasdiff errors + openapi_schema = _fix_anyof_with_null(openapi_schema) + + # Fix path parameter resolution issues + openapi_schema = _fix_path_parameters(openapi_schema) + + # Eliminate $defs section entirely for oasdiff compatibility + openapi_schema = _eliminate_defs_section(openapi_schema) + + # Debug: Check if there's a root-level $defs after flattening + if "$defs" in openapi_schema: + print(f"After flattening: root-level $defs with {len(openapi_schema['$defs'])} items") + else: + print("After flattening: no root-level $defs") + # Ensure all referenced schemas are included # DISABLED: This was using hardcoded schema generation. FastAPI should handle this automatically. # openapi_schema = _ensure_referenced_schemas(openapi_schema) @@ -853,7 +1427,7 @@ def generate_openapi_spec(output_dir: str, format: str = "yaml", include_example # DISABLED: This was a hardcoded workaround. Using Pydantic's TypeAdapter instead. # _fix_malformed_schemas(openapi_schema) - # Split into stable (v1 only), experimental (v1alpha + v1beta), and deprecated specs + # Split into stable (v1 only), experimental (v1alpha + v1beta), deprecated, and combined (stainless) specs # Each spec needs its own deep copy of the full schema to avoid cross-contamination import copy @@ -862,6 +1436,16 @@ def generate_openapi_spec(output_dir: str, format: str = "yaml", include_example copy.deepcopy(openapi_schema), stable_only=False, exclude_deprecated=True ) deprecated_schema = _filter_deprecated_schema(copy.deepcopy(openapi_schema)) + combined_schema = _filter_combined_schema(copy.deepcopy(openapi_schema)) + + # Update title and description for combined schema + if "info" in combined_schema: + combined_schema["info"]["title"] = "Llama Stack API - Stable & Experimental APIs" + combined_schema["info"]["description"] = ( + combined_schema["info"].get("description", "") + + "\n\n**πŸ”— COMBINED**: This specification includes both stable production-ready APIs and experimental pre-release APIs. " + "Use stable APIs for production deployments and experimental APIs for testing new features." + ) # Sort paths alphabetically for stable (v1 only) stable_schema = _sort_paths_alphabetically(stable_schema) @@ -869,11 +1453,24 @@ def generate_openapi_spec(output_dir: str, format: str = "yaml", include_example experimental_schema = _sort_paths_alphabetically(experimental_schema) # Sort paths by version prefix for deprecated deprecated_schema = _sort_paths_alphabetically(deprecated_schema) + # Sort paths by version prefix for combined (stainless) + combined_schema = _sort_paths_alphabetically(combined_schema) # Fix schema issues (like exclusiveMinimum -> minimum) for each spec stable_schema = _fix_schema_issues(stable_schema) experimental_schema = _fix_schema_issues(experimental_schema) deprecated_schema = _fix_schema_issues(deprecated_schema) + combined_schema = _fix_schema_issues(combined_schema) + + # Validate the schemas + print("\nπŸ” Validating generated schemas...") + stable_valid = validate_openapi_schema(stable_schema, "Stable schema") + experimental_valid = validate_openapi_schema(experimental_schema, "Experimental schema") + deprecated_valid = validate_openapi_schema(deprecated_schema, "Deprecated schema") + combined_valid = validate_openapi_schema(combined_schema, "Combined (stainless) schema") + + if not all([stable_valid, experimental_valid, deprecated_valid, combined_valid]): + print("⚠️ Some schemas failed validation, but continuing with generation...") # Add any custom modifications here if needed if include_examples: @@ -887,8 +1484,60 @@ def generate_openapi_spec(output_dir: str, format: str = "yaml", include_example # Save the stable specification if format in ["yaml", "both"]: yaml_path = output_path / "llama-stack-spec.yaml" - with open(yaml_path, "w") as f: - yaml.dump(stable_schema, f, default_flow_style=False, sort_keys=False) + + # Use ruamel.yaml for better control over YAML serialization + try: + from ruamel.yaml import YAML + + yaml_writer = YAML() + yaml_writer.default_flow_style = False + yaml_writer.sort_keys = False + yaml_writer.width = 4096 # Prevent line wrapping + yaml_writer.allow_unicode = True + + with open(yaml_path, "w") as f: + yaml_writer.dump(stable_schema, f) + except ImportError: + # Fallback to standard yaml if ruamel.yaml is not available + with open(yaml_path, "w") as f: + yaml.dump(stable_schema, f, default_flow_style=False, sort_keys=False) + # Post-process the YAML file to remove $defs section and fix references + with open(yaml_path) as f: + yaml_content = f.read() + + if " $defs:" in yaml_content or "#/$defs/" in yaml_content: + print("Post-processing YAML to remove $defs section") + + # Use string replacement to fix references directly + if "#/$defs/" in yaml_content: + refs_fixed = yaml_content.count("#/$defs/") + yaml_content = yaml_content.replace("#/$defs/", "#/components/schemas/") + print(f"Fixed {refs_fixed} $ref references using string replacement") + + # Parse the YAML content + yaml_data = yaml.safe_load(yaml_content) + + # Move $defs to components/schemas if it exists + if "$defs" in yaml_data: + print(f"Found $defs section with {len(yaml_data['$defs'])} items") + if "components" not in yaml_data: + yaml_data["components"] = {} + if "schemas" not in yaml_data["components"]: + yaml_data["components"]["schemas"] = {} + + # Move all $defs to components/schemas + for def_name, def_schema in yaml_data["$defs"].items(): + yaml_data["components"]["schemas"][def_name] = def_schema + + # Remove the $defs section + del yaml_data["$defs"] + print("Moved $defs to components/schemas") + + # Write the modified YAML back + with open(yaml_path, "w") as f: + yaml.dump(yaml_data, f, default_flow_style=False, sort_keys=False) + print("Updated YAML file") + print(f"βœ… Generated YAML (stable): {yaml_path}") experimental_yaml_path = output_path / "experimental-llama-stack-spec.yaml" @@ -901,6 +1550,25 @@ def generate_openapi_spec(output_dir: str, format: str = "yaml", include_example yaml.dump(deprecated_schema, f, default_flow_style=False, sort_keys=False) print(f"βœ… Generated YAML (deprecated): {deprecated_yaml_path}") + # Generate combined (stainless) spec + stainless_yaml_path = output_path / "stainless-llama-stack-spec.yaml" + try: + from ruamel.yaml import YAML + + yaml_writer = YAML() + yaml_writer.default_flow_style = False + yaml_writer.sort_keys = False + yaml_writer.width = 4096 # Prevent line wrapping + yaml_writer.allow_unicode = True + + with open(stainless_yaml_path, "w") as f: + yaml_writer.dump(combined_schema, f) + except ImportError: + # Fallback to standard yaml if ruamel.yaml is not available + with open(stainless_yaml_path, "w") as f: + yaml.dump(combined_schema, f, default_flow_style=False, sort_keys=False) + print(f"βœ… Generated YAML (stainless/combined): {stainless_yaml_path}") + if format in ["json", "both"]: json_path = output_path / "llama-stack-spec.json" with open(json_path, "w") as f: @@ -917,6 +1585,11 @@ def generate_openapi_spec(output_dir: str, format: str = "yaml", include_example json.dump(deprecated_schema, f, indent=2) print(f"βœ… Generated JSON (deprecated): {deprecated_json_path}") + stainless_json_path = output_path / "stainless-llama-stack-spec.json" + with open(stainless_json_path, "w") as f: + json.dump(combined_schema, f, indent=2) + print(f"βœ… Generated JSON (stainless/combined): {stainless_json_path}") + # Generate HTML documentation html_path = output_path / "llama-stack-spec.html" generate_html_docs(stable_schema, html_path) @@ -930,6 +1603,10 @@ def generate_openapi_spec(output_dir: str, format: str = "yaml", include_example generate_html_docs(deprecated_schema, deprecated_html_path, spec_file="deprecated-llama-stack-spec.yaml") print(f"βœ… Generated HTML (deprecated): {deprecated_html_path}") + stainless_html_path = output_path / "stainless-llama-stack-spec.html" + generate_html_docs(combined_schema, stainless_html_path, spec_file="stainless-llama-stack-spec.yaml") + print(f"βœ… Generated HTML (stainless/combined): {stainless_html_path}") + return stable_schema @@ -968,9 +1645,55 @@ def main(): parser.add_argument("output_dir", help="Output directory for generated files") parser.add_argument("--format", choices=["yaml", "json", "both"], default="yaml", help="Output format") parser.add_argument("--no-examples", action="store_true", help="Exclude examples from the specification") + parser.add_argument( + "--validate-only", action="store_true", help="Only validate existing schema files, don't generate new ones" + ) + parser.add_argument("--validate-file", help="Validate a specific schema file") args = parser.parse_args() + # Handle validation-only mode + if args.validate_only or args.validate_file: + if args.validate_file: + # Validate a specific file + file_path = Path(args.validate_file) + if not file_path.exists(): + print(f"❌ File not found: {file_path}") + return 1 + + print(f"πŸ” Validating {file_path}...") + is_valid = validate_schema_file(file_path) + return 0 if is_valid else 1 + else: + # Validate all schema files in output directory + output_path = Path(args.output_dir) + if not output_path.exists(): + print(f"❌ Output directory not found: {output_path}") + return 1 + + print(f"πŸ” Validating all schema files in {output_path}...") + schema_files = ( + list(output_path.glob("*.yaml")) + list(output_path.glob("*.yml")) + list(output_path.glob("*.json")) + ) + + if not schema_files: + print("❌ No schema files found to validate") + return 1 + + all_valid = True + for schema_file in schema_files: + print(f"\nπŸ“„ Validating {schema_file.name}...") + is_valid = validate_schema_file(schema_file) + if not is_valid: + all_valid = False + + if all_valid: + print("\nβœ… All schema files are valid!") + return 0 + else: + print("\n❌ Some schema files failed validation") + return 1 + print("πŸš€ Generating OpenAPI specification using FastAPI...") print(f"πŸ“ Output directory: {args.output_dir}") print(f"πŸ“„ Format: {args.format}") diff --git a/scripts/run_openapi_generator.sh b/scripts/run_openapi_generator.sh new file mode 100755 index 000000000..c6c61453d --- /dev/null +++ b/scripts/run_openapi_generator.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. + +PYTHONPATH=${PYTHONPATH:-} +THIS_DIR="$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" + +set -euo pipefail + + +stack_dir=$(dirname "$THIS_DIR") +PYTHONPATH=$PYTHONPATH:$stack_dir \ + python3 -m scripts.fastapi_generator "$stack_dir"/docs/static + +cp "$stack_dir"/docs/static/stainless-llama-stack-spec.yaml "$stack_dir"/client-sdks/stainless/openapi.yml diff --git a/scripts/validate_openapi.py b/scripts/validate_openapi.py new file mode 100755 index 000000000..ddc88f0f8 --- /dev/null +++ b/scripts/validate_openapi.py @@ -0,0 +1,290 @@ +#!/usr/bin/env python3 +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. + +""" +OpenAPI Schema Validator for Llama Stack. + +This script provides comprehensive validation of OpenAPI specifications +using multiple validation tools and approaches. +""" + +import argparse +import json +import sys +from pathlib import Path +from typing import Any + +import yaml +from openapi_spec_validator import validate_spec +from openapi_spec_validator.exceptions import OpenAPISpecValidatorError + + +def validate_openapi_schema(schema: dict[str, Any], schema_name: str = "OpenAPI schema") -> bool: + """ + Validate an OpenAPI schema using openapi-spec-validator. + + Args: + schema: The OpenAPI schema dictionary to validate + schema_name: Name of the schema for error reporting + + Returns: + True if valid, False otherwise + """ + try: + validate_spec(schema) + print(f"βœ… {schema_name} is valid") + return True + except OpenAPISpecValidatorError as e: + print(f"❌ {schema_name} validation failed:") + print(f" {e}") + return False + except Exception as e: + print(f"❌ {schema_name} validation error: {e}") + return False + + +def validate_schema_file(file_path: Path) -> bool: + """ + Validate an OpenAPI schema file (YAML or JSON). + + Args: + file_path: Path to the schema file + + Returns: + True if valid, False otherwise + """ + try: + with open(file_path) as f: + if file_path.suffix.lower() in [".yaml", ".yml"]: + schema = yaml.safe_load(f) + elif file_path.suffix.lower() == ".json": + schema = json.load(f) + else: + print(f"❌ Unsupported file format: {file_path.suffix}") + return False + + return validate_openapi_schema(schema, str(file_path)) + except Exception as e: + print(f"❌ Failed to read {file_path}: {e}") + return False + + +def validate_directory(directory: Path, pattern: str = "*.yaml") -> bool: + """ + Validate all OpenAPI schema files in a directory. + + Args: + directory: Directory containing schema files + pattern: Glob pattern to match schema files + + Returns: + True if all files are valid, False otherwise + """ + if not directory.exists(): + print(f"❌ Directory not found: {directory}") + return False + + schema_files = list(directory.glob(pattern)) + list(directory.glob("*.yml")) + list(directory.glob("*.json")) + + if not schema_files: + print(f"❌ No schema files found in {directory}") + return False + + print(f"πŸ” Found {len(schema_files)} schema files to validate") + + all_valid = True + for schema_file in schema_files: + print(f"\nπŸ“„ Validating {schema_file.name}...") + is_valid = validate_schema_file(schema_file) + if not is_valid: + all_valid = False + + return all_valid + + +def get_schema_stats(schema: dict[str, Any]) -> dict[str, int]: + """ + Get statistics about an OpenAPI schema. + + Args: + schema: The OpenAPI schema dictionary + + Returns: + Dictionary with schema statistics + """ + stats = { + "paths": len(schema.get("paths", {})), + "schemas": len(schema.get("components", {}).get("schemas", {})), + "operations": 0, + "parameters": 0, + "responses": 0, + } + + # Count operations + for path_info in schema.get("paths", {}).values(): + for method in ["get", "post", "put", "delete", "patch", "head", "options"]: + if method in path_info: + stats["operations"] += 1 + + operation = path_info[method] + if "parameters" in operation: + stats["parameters"] += len(operation["parameters"]) + if "responses" in operation: + stats["responses"] += len(operation["responses"]) + + return stats + + +def print_schema_stats(schema: dict[str, Any], schema_name: str = "Schema") -> None: + """ + Print statistics about an OpenAPI schema. + + Args: + schema: The OpenAPI schema dictionary + schema_name: Name of the schema for display + """ + stats = get_schema_stats(schema) + + print(f"\nπŸ“Š {schema_name} Statistics:") + print(f" πŸ›£οΈ Paths: {stats['paths']}") + print(f" πŸ“‹ Schemas: {stats['schemas']}") + print(f" πŸ”§ Operations: {stats['operations']}") + print(f" πŸ“ Parameters: {stats['parameters']}") + print(f" πŸ“€ Responses: {stats['responses']}") + + +def main(): + """Main entry point for the OpenAPI validator.""" + parser = argparse.ArgumentParser( + description="Validate OpenAPI specifications", + formatter_class=argparse.RawDescriptionHelpFormatter, + epilog=""" +Examples: + # Validate a specific file + python validate_openapi.py docs/static/llama-stack-spec.yaml + + # Validate all YAML files in a directory + python validate_openapi.py docs/static/ + + # Validate with detailed statistics + python validate_openapi.py docs/static/llama-stack-spec.yaml --stats + + # Validate and show only errors + python validate_openapi.py docs/static/ --quiet + """, + ) + + parser.add_argument("path", help="Path to schema file or directory containing schema files") + parser.add_argument("--stats", action="store_true", help="Show detailed schema statistics") + parser.add_argument("--quiet", action="store_true", help="Only show errors, suppress success messages") + parser.add_argument("--pattern", default="*.yaml", help="Glob pattern for schema files (default: *.yaml)") + + args = parser.parse_args() + + path = Path(args.path) + + if not path.exists(): + print(f"❌ Path not found: {path}") + return 1 + + if path.is_file(): + # Validate a single file + if args.quiet: + # Override the validation function to be quiet + def quiet_validate(schema, name): + try: + validate_spec(schema) + return True + except Exception as e: + print(f"❌ {name}: {e}") + return False + + try: + with open(path) as f: + if path.suffix.lower() in [".yaml", ".yml"]: + schema = yaml.safe_load(f) + elif path.suffix.lower() == ".json": + schema = json.load(f) + else: + print(f"❌ Unsupported file format: {path.suffix}") + return 1 + + is_valid = quiet_validate(schema, str(path)) + if is_valid and args.stats: + print_schema_stats(schema, path.name) + return 0 if is_valid else 1 + except Exception as e: + print(f"❌ Failed to read {path}: {e}") + return 1 + else: + is_valid = validate_schema_file(path) + if is_valid and args.stats: + try: + with open(path) as f: + if path.suffix.lower() in [".yaml", ".yml"]: + schema = yaml.safe_load(f) + elif path.suffix.lower() == ".json": + schema = json.load(f) + else: + return 1 + print_schema_stats(schema, path.name) + except Exception: + pass + return 0 if is_valid else 1 + + elif path.is_dir(): + # Validate all files in directory + if args.quiet: + all_valid = True + schema_files = list(path.glob(args.pattern)) + list(path.glob("*.yml")) + list(path.glob("*.json")) + + for schema_file in schema_files: + try: + with open(schema_file) as f: + if schema_file.suffix.lower() in [".yaml", ".yml"]: + schema = yaml.safe_load(f) + elif schema_file.suffix.lower() == ".json": + schema = json.load(f) + else: + continue + + try: + validate_spec(schema) + except Exception as e: + print(f"❌ {schema_file.name}: {e}") + all_valid = False + except Exception as e: + print(f"❌ Failed to read {schema_file.name}: {e}") + all_valid = False + + return 0 if all_valid else 1 + else: + all_valid = validate_directory(path, args.pattern) + if all_valid and args.stats: + # Show stats for all files + schema_files = list(path.glob(args.pattern)) + list(path.glob("*.yml")) + list(path.glob("*.json")) + for schema_file in schema_files: + try: + with open(schema_file) as f: + if schema_file.suffix.lower() in [".yaml", ".yml"]: + schema = yaml.safe_load(f) + elif schema_file.suffix.lower() == ".json": + schema = json.load(f) + else: + continue + print_schema_stats(schema, schema_file.name) + except Exception: + continue + return 0 if all_valid else 1 + + else: + print(f"❌ Invalid path type: {path}") + return 1 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/src/llama_stack/apis/agents/openai_responses.py b/src/llama_stack/apis/agents/openai_responses.py index 69e2b2012..3febbb733 100644 --- a/src/llama_stack/apis/agents/openai_responses.py +++ b/src/llama_stack/apis/agents/openai_responses.py @@ -1309,6 +1309,7 @@ OpenAIResponseInput = Annotated[ register_schema(OpenAIResponseInput, name="OpenAIResponseInput") +@json_schema_type class ListOpenAIResponseInputItem(BaseModel): """List container for OpenAI response input items. diff --git a/src/llama_stack/apis/tools/tools.py b/src/llama_stack/apis/tools/tools.py index b13ac2f19..39706d2cb 100644 --- a/src/llama_stack/apis/tools/tools.py +++ b/src/llama_stack/apis/tools/tools.py @@ -99,6 +99,7 @@ class ListToolGroupsResponse(BaseModel): data: list[ToolGroup] +@json_schema_type class ListToolDefsResponse(BaseModel): """Response containing a list of tool definitions. diff --git a/uv.lock b/uv.lock index 32e2e4219..311c8fb02 100644 --- a/uv.lock +++ b/uv.lock @@ -1824,6 +1824,21 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/fe/54/c86cd8e011fe98803d7e382fd67c0df5ceab8d2b7ad8c5a81524f791551c/jsonschema-4.25.0-py3-none-any.whl", hash = "sha256:24c2e8da302de79c8b9382fee3e76b355e44d2a4364bb207159ce10b517bd716", size = 89184, upload-time = "2025-07-18T15:39:42.956Z" }, ] +[[package]] +name = "jsonschema-path" +version = "0.3.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pathable" }, + { name = "pyyaml" }, + { name = "referencing" }, + { name = "requests" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/6e/45/41ebc679c2a4fced6a722f624c18d658dee42612b83ea24c1caf7c0eb3a8/jsonschema_path-0.3.4.tar.gz", hash = "sha256:8365356039f16cc65fddffafda5f58766e34bebab7d6d105616ab52bc4297001", size = 11159, upload-time = "2025-01-24T14:33:16.547Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cb/58/3485da8cb93d2f393bce453adeef16896751f14ba3e2024bc21dc9597646/jsonschema_path-0.3.4-py3-none-any.whl", hash = "sha256:f502191fdc2b22050f9a81c9237be9d27145b9001c55842bece5e94e382e52f8", size = 14810, upload-time = "2025-01-24T14:33:14.652Z" }, +] + [[package]] name = "jsonschema-specifications" version = "2025.4.1" @@ -1903,6 +1918,38 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/89/43/d9bebfc3db7dea6ec80df5cb2aad8d274dd18ec2edd6c4f21f32c237cbbb/kubernetes-33.1.0-py2.py3-none-any.whl", hash = "sha256:544de42b24b64287f7e0aa9513c93cb503f7f40eea39b20f66810011a86eabc5", size = 1941335, upload-time = "2025-06-09T21:57:56.327Z" }, ] +[[package]] +name = "lazy-object-proxy" +version = "1.12.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/08/a2/69df9c6ba6d316cfd81fe2381e464db3e6de5db45f8c43c6a23504abf8cb/lazy_object_proxy-1.12.0.tar.gz", hash = "sha256:1f5a462d92fd0cfb82f1fab28b51bfb209fabbe6aabf7f0d51472c0c124c0c61", size = 43681, upload-time = "2025-08-22T13:50:06.783Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0d/1b/b5f5bd6bda26f1e15cd3232b223892e4498e34ec70a7f4f11c401ac969f1/lazy_object_proxy-1.12.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8ee0d6027b760a11cc18281e702c0309dd92da458a74b4c15025d7fc490deede", size = 26746, upload-time = "2025-08-22T13:42:37.572Z" }, + { url = "https://files.pythonhosted.org/packages/55/64/314889b618075c2bfc19293ffa9153ce880ac6153aacfd0a52fcabf21a66/lazy_object_proxy-1.12.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:4ab2c584e3cc8be0dfca422e05ad30a9abe3555ce63e9ab7a559f62f8dbc6ff9", size = 71457, upload-time = "2025-08-22T13:42:38.743Z" }, + { url = "https://files.pythonhosted.org/packages/11/53/857fc2827fc1e13fbdfc0ba2629a7d2579645a06192d5461809540b78913/lazy_object_proxy-1.12.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:14e348185adbd03ec17d051e169ec45686dcd840a3779c9d4c10aabe2ca6e1c0", size = 71036, upload-time = "2025-08-22T13:42:40.184Z" }, + { url = "https://files.pythonhosted.org/packages/2b/24/e581ffed864cd33c1b445b5763d617448ebb880f48675fc9de0471a95cbc/lazy_object_proxy-1.12.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c4fcbe74fb85df8ba7825fa05eddca764138da752904b378f0ae5ab33a36c308", size = 69329, upload-time = "2025-08-22T13:42:41.311Z" }, + { url = "https://files.pythonhosted.org/packages/78/be/15f8f5a0b0b2e668e756a152257d26370132c97f2f1943329b08f057eff0/lazy_object_proxy-1.12.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:563d2ec8e4d4b68ee7848c5ab4d6057a6d703cb7963b342968bb8758dda33a23", size = 70690, upload-time = "2025-08-22T13:42:42.51Z" }, + { url = "https://files.pythonhosted.org/packages/5d/aa/f02be9bbfb270e13ee608c2b28b8771f20a5f64356c6d9317b20043c6129/lazy_object_proxy-1.12.0-cp312-cp312-win_amd64.whl", hash = "sha256:53c7fd99eb156bbb82cbc5d5188891d8fdd805ba6c1e3b92b90092da2a837073", size = 26563, upload-time = "2025-08-22T13:42:43.685Z" }, + { url = "https://files.pythonhosted.org/packages/f4/26/b74c791008841f8ad896c7f293415136c66cc27e7c7577de4ee68040c110/lazy_object_proxy-1.12.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:86fd61cb2ba249b9f436d789d1356deae69ad3231dc3c0f17293ac535162672e", size = 26745, upload-time = "2025-08-22T13:42:44.982Z" }, + { url = "https://files.pythonhosted.org/packages/9b/52/641870d309e5d1fb1ea7d462a818ca727e43bfa431d8c34b173eb090348c/lazy_object_proxy-1.12.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:81d1852fb30fab81696f93db1b1e55a5d1ff7940838191062f5f56987d5fcc3e", size = 71537, upload-time = "2025-08-22T13:42:46.141Z" }, + { url = "https://files.pythonhosted.org/packages/47/b6/919118e99d51c5e76e8bf5a27df406884921c0acf2c7b8a3b38d847ab3e9/lazy_object_proxy-1.12.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:be9045646d83f6c2664c1330904b245ae2371b5c57a3195e4028aedc9f999655", size = 71141, upload-time = "2025-08-22T13:42:47.375Z" }, + { url = "https://files.pythonhosted.org/packages/e5/47/1d20e626567b41de085cf4d4fb3661a56c159feaa73c825917b3b4d4f806/lazy_object_proxy-1.12.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:67f07ab742f1adfb3966c40f630baaa7902be4222a17941f3d85fd1dae5565ff", size = 69449, upload-time = "2025-08-22T13:42:48.49Z" }, + { url = "https://files.pythonhosted.org/packages/58/8d/25c20ff1a1a8426d9af2d0b6f29f6388005fc8cd10d6ee71f48bff86fdd0/lazy_object_proxy-1.12.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:75ba769017b944fcacbf6a80c18b2761a1795b03f8899acdad1f1c39db4409be", size = 70744, upload-time = "2025-08-22T13:42:49.608Z" }, + { url = "https://files.pythonhosted.org/packages/c0/67/8ec9abe15c4f8a4bcc6e65160a2c667240d025cbb6591b879bea55625263/lazy_object_proxy-1.12.0-cp313-cp313-win_amd64.whl", hash = "sha256:7b22c2bbfb155706b928ac4d74c1a63ac8552a55ba7fff4445155523ea4067e1", size = 26568, upload-time = "2025-08-22T13:42:57.719Z" }, + { url = "https://files.pythonhosted.org/packages/23/12/cd2235463f3469fd6c62d41d92b7f120e8134f76e52421413a0ad16d493e/lazy_object_proxy-1.12.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:4a79b909aa16bde8ae606f06e6bbc9d3219d2e57fb3e0076e17879072b742c65", size = 27391, upload-time = "2025-08-22T13:42:50.62Z" }, + { url = "https://files.pythonhosted.org/packages/60/9e/f1c53e39bbebad2e8609c67d0830cc275f694d0ea23d78e8f6db526c12d3/lazy_object_proxy-1.12.0-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:338ab2f132276203e404951205fe80c3fd59429b3a724e7b662b2eb539bb1be9", size = 80552, upload-time = "2025-08-22T13:42:51.731Z" }, + { url = "https://files.pythonhosted.org/packages/4c/b6/6c513693448dcb317d9d8c91d91f47addc09553613379e504435b4cc8b3e/lazy_object_proxy-1.12.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8c40b3c9faee2e32bfce0df4ae63f4e73529766893258eca78548bac801c8f66", size = 82857, upload-time = "2025-08-22T13:42:53.225Z" }, + { url = "https://files.pythonhosted.org/packages/12/1c/d9c4aaa4c75da11eb7c22c43d7c90a53b4fca0e27784a5ab207768debea7/lazy_object_proxy-1.12.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:717484c309df78cedf48396e420fa57fc8a2b1f06ea889df7248fdd156e58847", size = 80833, upload-time = "2025-08-22T13:42:54.391Z" }, + { url = "https://files.pythonhosted.org/packages/0b/ae/29117275aac7d7d78ae4f5a4787f36ff33262499d486ac0bf3e0b97889f6/lazy_object_proxy-1.12.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:a6b7ea5ea1ffe15059eb44bcbcb258f97bcb40e139b88152c40d07b1a1dfc9ac", size = 79516, upload-time = "2025-08-22T13:42:55.812Z" }, + { url = "https://files.pythonhosted.org/packages/19/40/b4e48b2c38c69392ae702ae7afa7b6551e0ca5d38263198b7c79de8b3bdf/lazy_object_proxy-1.12.0-cp313-cp313t-win_amd64.whl", hash = "sha256:08c465fb5cd23527512f9bd7b4c7ba6cec33e28aad36fbbe46bf7b858f9f3f7f", size = 27656, upload-time = "2025-08-22T13:42:56.793Z" }, + { url = "https://files.pythonhosted.org/packages/ef/3a/277857b51ae419a1574557c0b12e0d06bf327b758ba94cafc664cb1e2f66/lazy_object_proxy-1.12.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c9defba70ab943f1df98a656247966d7729da2fe9c2d5d85346464bf320820a3", size = 26582, upload-time = "2025-08-22T13:49:49.366Z" }, + { url = "https://files.pythonhosted.org/packages/1a/b6/c5e0fa43535bb9c87880e0ba037cdb1c50e01850b0831e80eb4f4762f270/lazy_object_proxy-1.12.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:6763941dbf97eea6b90f5b06eb4da9418cc088fce0e3883f5816090f9afcde4a", size = 71059, upload-time = "2025-08-22T13:49:50.488Z" }, + { url = "https://files.pythonhosted.org/packages/06/8a/7dcad19c685963c652624702f1a968ff10220b16bfcc442257038216bf55/lazy_object_proxy-1.12.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fdc70d81235fc586b9e3d1aeef7d1553259b62ecaae9db2167a5d2550dcc391a", size = 71034, upload-time = "2025-08-22T13:49:54.224Z" }, + { url = "https://files.pythonhosted.org/packages/12/ac/34cbfb433a10e28c7fd830f91c5a348462ba748413cbb950c7f259e67aa7/lazy_object_proxy-1.12.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:0a83c6f7a6b2bfc11ef3ed67f8cbe99f8ff500b05655d8e7df9aab993a6abc95", size = 69529, upload-time = "2025-08-22T13:49:55.29Z" }, + { url = "https://files.pythonhosted.org/packages/6f/6a/11ad7e349307c3ca4c0175db7a77d60ce42a41c60bcb11800aabd6a8acb8/lazy_object_proxy-1.12.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:256262384ebd2a77b023ad02fbcc9326282bcfd16484d5531154b02bc304f4c5", size = 70391, upload-time = "2025-08-22T13:49:56.35Z" }, + { url = "https://files.pythonhosted.org/packages/59/97/9b410ed8fbc6e79c1ee8b13f8777a80137d4bc189caf2c6202358e66192c/lazy_object_proxy-1.12.0-cp314-cp314-win_amd64.whl", hash = "sha256:7601ec171c7e8584f8ff3f4e440aa2eebf93e854f04639263875b8c2971f819f", size = 26988, upload-time = "2025-08-22T13:49:57.302Z" }, +] + [[package]] name = "linkify" version = "1.4" @@ -1985,6 +2032,7 @@ dev = [ { name = "black" }, { name = "mypy" }, { name = "nbval" }, + { name = "openapi-spec-validator" }, { name = "pre-commit" }, { name = "pytest" }, { name = "pytest-asyncio" }, @@ -2132,6 +2180,7 @@ dev = [ { name = "black" }, { name = "mypy" }, { name = "nbval" }, + { name = "openapi-spec-validator", specifier = ">=0.7.2" }, { name = "pre-commit" }, { name = "pytest", specifier = ">=8.4" }, { name = "pytest-asyncio", specifier = ">=1.0" }, @@ -2985,6 +3034,35 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/14/f3/ebbd700d8dc1e6380a7a382969d96bc0cbea8717b52fb38ff0ca2a7653e8/openai-2.5.0-py3-none-any.whl", hash = "sha256:21380e5f52a71666dbadbf322dd518bdf2b9d11ed0bb3f96bea17310302d6280", size = 999851, upload-time = "2025-10-17T18:14:45.528Z" }, ] +[[package]] +name = "openapi-schema-validator" +version = "0.6.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "jsonschema" }, + { name = "jsonschema-specifications" }, + { name = "rfc3339-validator" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/8b/f3/5507ad3325169347cd8ced61c232ff3df70e2b250c49f0fe140edb4973c6/openapi_schema_validator-0.6.3.tar.gz", hash = "sha256:f37bace4fc2a5d96692f4f8b31dc0f8d7400fd04f3a937798eaf880d425de6ee", size = 11550, upload-time = "2025-01-10T18:08:22.268Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/21/c6/ad0fba32775ae749016829dace42ed80f4407b171da41313d1a3a5f102e4/openapi_schema_validator-0.6.3-py3-none-any.whl", hash = "sha256:f3b9870f4e556b5a62a1c39da72a6b4b16f3ad9c73dc80084b1b11e74ba148a3", size = 8755, upload-time = "2025-01-10T18:08:19.758Z" }, +] + +[[package]] +name = "openapi-spec-validator" +version = "0.7.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "jsonschema" }, + { name = "jsonschema-path" }, + { name = "lazy-object-proxy" }, + { name = "openapi-schema-validator" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/82/af/fe2d7618d6eae6fb3a82766a44ed87cd8d6d82b4564ed1c7cfb0f6378e91/openapi_spec_validator-0.7.2.tar.gz", hash = "sha256:cc029309b5c5dbc7859df0372d55e9d1ff43e96d678b9ba087f7c56fc586f734", size = 36855, upload-time = "2025-06-07T14:48:56.299Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/27/dd/b3fd642260cb17532f66cc1e8250f3507d1e580483e209dc1e9d13bd980d/openapi_spec_validator-0.7.2-py3-none-any.whl", hash = "sha256:4bbdc0894ec85f1d1bea1d6d9c8b2c3c8d7ccaa13577ef40da9c006c9fd0eb60", size = 39713, upload-time = "2025-06-07T14:48:54.077Z" }, +] + [[package]] name = "opentelemetry-api" version = "1.36.0" @@ -3221,6 +3299,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c6/ac/dac4a63f978e4dcb3c6d3a78c4d8e0192a113d288502a1216950c41b1027/parso-0.8.4-py2.py3-none-any.whl", hash = "sha256:a418670a20291dacd2dddc80c377c5c3791378ee1e8d12bffc35420643d43f18", size = 103650, upload-time = "2024-04-05T09:43:53.299Z" }, ] +[[package]] +name = "pathable" +version = "0.4.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/67/93/8f2c2075b180c12c1e9f6a09d1a985bc2036906b13dff1d8917e395f2048/pathable-0.4.4.tar.gz", hash = "sha256:6905a3cd17804edfac7875b5f6c9142a218c7caef78693c2dbbbfbac186d88b2", size = 8124, upload-time = "2025-01-10T18:43:13.247Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7d/eb/b6260b31b1a96386c0a880edebe26f89669098acea8e0318bff6adb378fd/pathable-0.4.4-py3-none-any.whl", hash = "sha256:5ae9e94793b6ef5a4cbe0a7ce9dbbefc1eec38df253763fd0aeeacf2762dbbc2", size = 9592, upload-time = "2025-01-10T18:43:11.88Z" }, +] + [[package]] name = "pathspec" version = "0.12.1" @@ -4378,6 +4465,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/1c/4c/cc276ce57e572c102d9542d383b2cfd551276581dc60004cb94fe8774c11/responses-0.25.8-py3-none-any.whl", hash = "sha256:0c710af92def29c8352ceadff0c3fe340ace27cf5af1bbe46fb71275bcd2831c", size = 34769, upload-time = "2025-08-08T19:01:45.018Z" }, ] +[[package]] +name = "rfc3339-validator" +version = "0.1.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "six" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/28/ea/a9387748e2d111c3c2b275ba970b735e04e15cdb1eb30693b6b5708c4dbd/rfc3339_validator-0.1.4.tar.gz", hash = "sha256:138a2abdf93304ad60530167e51d2dfb9549521a836871b88d7f4695d0022f6b", size = 5513, upload-time = "2021-05-12T16:37:54.178Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7b/44/4e421b96b67b2daff264473f7465db72fbdf36a07e05494f50300cc7b0c6/rfc3339_validator-0.1.4-py2.py3-none-any.whl", hash = "sha256:24f6ec1eda14ef823da9e36ec7113124b39c04d50a4d3d3a3c2859577e7791fa", size = 3490, upload-time = "2021-05-12T16:37:52.536Z" }, +] + [[package]] name = "rich" version = "14.1.0"